So there was a thread in the Feature Requests forum to create a bot for Telegram that would allow querying HASS from inside Telegram, and also controlling it.
To that end I’ve created the HASS TeleBot as a base on which to build.
Currently it doesn’t do much apart from allow you to set a list of entities you care about and want to see the states of, and commands to allow the controlling of the Manual Alarm Control Panel component.
But it’s a good base on which to start! Feel free to suggest additions, discuss how it could be improved, or submit pull requests It’s my first public project so please go easy on me!
Thanks to @koen01 for his initial POC, some of which survives
Currently I’m figuring out how to parse the domain and service list from the API so I can present that via the bot.
Have added a /domains command which lists the available HASS domains, and /browsedomains which returns the list as keyboard buttons. This could be the start of dynamically navigating the available services.
First off: Great work!
I’m not on a machine where I can in an easy way create a PR but you should add a requirements.txt to ease the installation of requirements (like teleport)
Cool project! A slightly different approach would be to turn it into a custom notify platform in home assistant and use the internal core API instead. That would make it easier to create a PR if/when you want to merge it upstream with home assistant.
Yes definitely. I was thinking at some stage of perhaps merging it into the main Telegram component. But for now I just want to explore what’s possible and work on functionality without getting into the hard process of contributing to HASS itself.
Ah, thanks, I am trying to make it where it can log into slack/hangouts, and others at the sime time. I have an xmpp bot written in python that works well. I just have to tie it in.
Well things move fast! My bot has been picked up by of the core HASS devs, and looks like we might be building this as a new bot component for HASS More news later…
I’m still using my own bot, but looking forward to using the new and improved carnation
i’m was hinking about trying to add support for grabbing screenshots of the camera devices and get them sent as a picture by the bot. (or triggering a notify with url grab).
First of all thank you for sharing your work. However, it has been more than 4 months and I still don’t see any news on this. Any idea how is the progress?
I think it dose not mater because you are makeing a call to an API ( HA API ) via host name ( or domain or IP) ha_url
2)yes. The 3 and 3.5 will use the same setup
3) I personally have putt it one directory above the HA because i have collect all my other scripts there.
4) no clue i didnt use it
5) look here https://stackoverflow.com/questions/8339555/how-to-run-a-script-at-the-start-up-of-ubuntu
is more less universal on all the Linux systems … i personally have made a bash script and am calling it from /etc/rc.local
script: tmux new -d -s my-Sensors '/path/to/folder/; ./hass-telebot.py hass-telebot.cfg'
i currently have a complicated setup and i was getting many error like yours and i decide to call the interpreter of the file rather than letting the file do it.
p.s. i also having problems with the ssl at the moment .
i have a local CA and the python refuse to use the Linux trusted CA’s (i have add mine there ). if any one have any suggestions…
p.s.2 if you want to call the file as an executable you can edit the file and replace the first line with this #!/usr/bin/python3