Can anyone create a plugin???
I’m not good. My idea was put into practice by a coworker.
The idea came from:( http://www.instructables.com/id/Set-up-Telegram-Bot-on-Raspberry-Pi/?ALLSTEPS ) Step 6: What is a dicey clock?
Steps:
-
Create a ShellSensor device called “Telegram message”
{
“attributeName”: “message”,
“attributeType”: “string”,
“command”: “cat /home/pi/telereceive”,
“interval”: 6000,
“id”: “telegram-message”,
“name”: “Telegram message”,
“class”: “ShellSensor”
} -
Copy to home/pi diceyclock. py adjusted (Remember to insert your token into the bot’s code.)
https://www.dropbox.com/s/my90mb8sqxehrka/diceyclock.py?dl=0
-
Edit sudo nano /etc/rc.local and add the python /home/pi/diceyclock.py
fi
python /home/pi/diceyclock.py
exit 0 -
Restart Pi. After the restart check in home/pi is telereceive file