Domi04151309 / HomeApp

HomeApp is a small and easy to use smart home app with a simple framework.
https://f-droid.org/packages/io.github.domi04151309.home/
GNU General Public License v3.0
106 stars 24 forks source link

[Feature Request] Tasmota support #4

Closed DocSniper closed 3 years ago

DocSniper commented 4 years ago

Support for Tasmota, an alternative firmware for ESP8266, would be nice. I use multiple devices with Tasmota installed (self-flashed), but there is no easy-to-use open source app to control them. I'm currently using a browser with saved links to change the state of the ESPs. I also installed and configured an MQTT broker and everything is going well, but there is no useful open source app for that either. A home automation system would surely be an exaggeration to control a handful of devices.

Your app looks promising, so it would be great if you could add Tasmota support. Here is a link to commands that can be issued: https://tasmota.github.io/docs/Commands/

Command examples for web requests: http://\<ip>/cm?cmnd=Power%20Toggle http://\<ip>/cm?cmnd=Power%20On http://\<ip>/cm?cmnd=Power%20Off http://\<ip>/cm?user=admin&password=joker&cmnd=Power%20Toggle

rendeko commented 4 years ago

I would also like to vouch for this. I was in the middle of writing a request for support for a different generic brand-name of ESP devices, when I found out about Tasmota and successfully flashed it onto my device.

With MQTT being, well, incredibly not-user friendly, and countless closed source apps existing for rebrandings of different smart devices, I think Tasmota support would help add a large amount of device support for the least work.

Domi04151309 commented 4 years ago

Looks interesting but that's a huge list of commands. I have to think of an easy way to implement this without adding an endless list.

DocSniper commented 4 years ago

It is a very powerful firmware, yes, but it would be worth supporting it. Anyway, thanks for your efforts. :-)

Domi04151309 commented 4 years ago

I implemented very basic support for Tasmota using web requests which will be available with the next release. I am leaving this issue open for feedback.

DocSniper commented 4 years ago

Thanks, will test it as soon as it's available on F-Droid.

DocSniper commented 4 years ago

Tested Tasmota support with my devices and everything seems to be working fine. Thanks a lot. :-)

Another question: is it possible to display the answer of the device? There should be a (JSON) return string like {"POWER": "ON"} or {"POWER": "OFF"}, which would be especially helpful when using "Power Toogle" to know what the state the device has now.

Domi04151309 commented 4 years ago

That would be possible. Would it be okay to display the json as toasts?

Domi04151309 commented 4 years ago

And is there any reference on what the response looks like?

DocSniper commented 4 years ago

Yes, that would be enough for now.

With http://tasmota-dev-1/cm?Cmnd=Power you can also query the status and e.g. represent in color.

The responses for power are exactly as previously written {"POWER": "ON"} or {"POWER": "OFF"} Here is a reference to the JSON status responses: https://tasmota.github.io/docs/JSON-Status-Responses/

Domi04151309 commented 3 years ago

You will be able to see the response with the next release. It will show a snack bar with a show button. When you click the show button a dialog with the response gets displayed.

DocSniper commented 3 years ago

Tested it and works fine. Thanks 😀