-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No support for MQTT management or discovery #22
Comments
Hello, To add support for MQTT, it requires user to install a MQTT broker. The purpose of this software is to provide a pure integration between Tasmota & SmartThings, i.e. the user doesn't have to install additional hardware or software. And for this to work correctly, it requires the Tasmota devices and SmartThings hub to be assigned with static IP addresses. If you prefer MQTT based solutions, I believe there are a few alternatives. |
I think it would still be worthwhile to put the possibility in of using an MQTT broker. You have 90% of the code there, it would be a matter of just adding the MQTT library, login credentials and address of the broker, and then subscribing to the topic. In the client, just look for the discovery information from the devices, and you have an auto-populated list of tasmota devices. If there is another smartthings app that does this already, I'll use that, but I don't know of one off the top of my head. Got a pointer? |
I believe there is still no MQTT client in SmartThings. MQTT based apps require a MQTT bridge, similar to this. Or you could also write custom firmware to communicate directly with ST platform over MQTT. Link Home automation (ST, HASS, Hubitat, etc) communities have more information/ideas on how to integrate Tasmota. |
This is incorrect. Tasmota discovery is handled via the HomeAssistant discovery tools - SetOption19 0 https://tasmota.github.io/docs/Home-Assistant/ :
I need to research some more what the state of the MQTT tools are, I am not sure the bridge is needed to get a discovery response from the app (since it's a synchronous query to MQTT - not a triggered event). I'll followup when I have more information. |
Because there is no MQTT client in SmartThings, ST smartapps which communicate over MQTT require a bridge (a MQTT client hosted outside of ST hub) to translate the messages between MQTT device/broker and ST. ST/Hubitat-Tasmota smartapps that do Tasmota discovery use custom Tasmota firmware, and they use HTTP/TCP to communicate with the hub, they do not use MQTT. |
I have been rolling Tasmota devices into my home network for a bit now, and was pleased to see that tasmota-connect allowed me to add a tasmota device to Smartthings. However, the code as it stands now does not support MQTT management of Tasmota devices. This is a serious limitation.
As it stands now, to add a new device, you use the app on the phone to add the devices fixed IP address, login information, and device type. This has a number of drawbacks:
Fortunately, Tasmota supports using MQTT for device management. This is not the 'bridge' model that is used by some interfaces to control devices via MQTT commands. Tasmota uses the pub/sub model to collect, query, and control devices via MQTT topics.
As noted here: https://tasmota.github.io/docs/MQTT/ "MQTT is the main protocol for controlling Tasmota devices"
For Tasmota-connect to scale properly, it needs to have MQTT support added. This would make management of devices infinitely easier, and would not require tremendous changes.
There are several examples on the net of using MQTT via Groovy to communicate with Tasmota devices. As a first easy-to-define function, I'd suggest looking at using the HomeAssistant discovery model to query MQTT to list Tasmota devices. Any devices that come back from that query get added to the device list in Tasmota connect. This would go a LONG way to making management easier.
Once discovery mode is enabled, command and control can shift from direct socket connect to the Tasmota device to sending / receiving commands via MQTT. This can be done after the discovery mode is implemented. Once this is complete, direct connect to the Tasmota devices will not be necessary from the smartthings hub. See https://tasmota.github.io/docs/Home-Assistant/ for details on how to use the Tasmota Integration in MQTT to discover devices.
Would this feature be possible to implement? Without it, I think tasmota-connect will not scale well.
The text was updated successfully, but these errors were encountered: