Integration Solutions using MQTT

Actually, as I look closer at what you are trying to do, this won’t work since there is no way to SET the energy value. There is no ‘setenergy’ command available in the MQTT energy device capability. It doesn’t have the same set control as the temperature device does. The MQTT energy device also does not publish out values like the temperature device can.

This could be a feature I can look at adding if it is needed.

Thanks Todd, that was my assumption as the temp device is structured differently. I have 3 pieces of data I am trying to capture now that the Simple Google Sheets logger is deceased. Your Google Sheets replacement has helped with HVAC run time (adding a sheet-selection option would be terrific). I use a complicated setup to capture daily temp using Rules API, mqtt and node-red and the last bit is a snapshot of kwh at midnight. Was hoping to use mqtt for that as well. If the mqtt energy device can’t accept updates then I’m dead in the water. If it can be added to your extensive to-do list it would be greatly appreciated. If not, I understand.

I can add that capability. Give me a few days and I should have it done.

Hi - Sorry for the delay in responding…

Yes, that is the current situation!

My MQTT Devices driver might be of use to you, since it is geared more towards subscribing TO MQTT topics (i.e. updating SmartThings devices from MQTT). It supports a specific list of device types, but if you have a need that’s not met currently, just let me know and I can add it.

I can look at it. I’m afraid the audience for locally-run SmartApps is pretty small since not too many people want to bother with the setup. So the time I’ve spent on it has been pretty minimal. And I’ve been hosting my API Browser+ app on the same server and ngrok tunnel so I’ve been avoiding doing anything to disrupt that! However, I hope to get that web app moved to a proper AWS server soon, so that will give me more flexibility…

That’s fairly easy to do, let me know what a priority list would look like for you if you have anything else besides dimmers that would be critical.

In terms of additional device type support, I would say dimmer/brightness, water, and temp.

I have also tried getting the webapp to run on AWS. I’m pretty close - need to spend some time this weekend on it.

1 Like

Yesterday all MQTT ST devices stopped updating. Checked MQTT Creator and although all credentials were correct, it wouldn’t reconnect. Deleted and reinstalled Creator with same status. Checked MQTT Discovery, also not connecting. Tried deleting and reinstalling but scan won’t find MQTT Discovery. Checked channel and it is still listed there as installed. Anyway to get MQTT Discovery back?

Reboot your hub. It can help.

Haha, the old standby solution. That’s the first thing I tried. Unfortunately, no luck. I think I’ll try removing from channel and re-subscribing.

Well, that didn’t work either:
image

Update: Even though unsubscribing in the channel failed, it did allow me to scan and add MQTT Discovery but it won’t connect to mqtt once credentials added - status is blank.

Just so I’m clear, you are using both drivers?: MQTT Discovery and MQTT Devices?

And they both stopped working at the same time?!

When you say you deleted and reinstalled Creator - you just deleted the device itself and did an Add/scan device to get it recreated? You never uninstalled the driver, correct? Same with MQTT Discovery?

Newly added devices now seem to be put into whatever room your hub device is in (instead of ‘No room assign’ room). Did you look there for the MQTT Discovery device that you recreated?

Regarding not being able to connect to your broker - did anything change? Hub firmware update? Network configuration change? You sure your broker is running and connectable?

When I noticed mqtt devices not working I did the following:

  1. Rebooted ST - no change
  2. Checked the broker. Working well and all non-ST devices updating properly. No St devices working.
  3. Rebooted server running mqtt broker - no change
  4. Checked mqtt devices in ST. All not connected
  5. Checked mqtt device creator - not connected, no connected devices list. Uninstalled and re-installed device creator, still not connected.
  6. Checked Device Handler/Discovery - not connected. Uninstalled and attempted re-install. Would not show on scan nearby.
  7. Verified enrollment in channel. Status = enrolled. Attempted un-subscribe and re-subscribe. Error message but was then able to add to ST through scan nearby.
  8. As of now, MQTT Creator connected and devices functioning. Mqtt Discovery not connected.
  9. Never touched any drivers. Apps and devices started showing up in other rooms about two weeks ago so I knew to search for them. ST maintenance update occurred today but this issue began yesterday.

Is it OK to continue with Mqtt Discovery unconnected? All else appears to be back.

I’m a little confused as to which driver you are actually using for your devices: MQTT Devices and MQTT Handler/Discovery are two different drivers with no relationship or dependence on each other.

So if you are only using MQTT Devices driver and its devices (that are created manually through the Creator device), then you may not even need the other driver unless you have different devices you had created and are using through THAT driver.

What action do you think got your MQTT Devices driver working again?

im having this same issue!

Initially when I first installed mqtt drivers for edge I was under the impression (misread) that MQTT Discovery was required for Mqtt Creator. I installed both. If Discovery not required for Device Creator, I will remove Discovery. Every effort (my list from above) I did to resolve did nothing. I have no idea what made it start working again but it was nothing I did. No “Aha” moment, sorry.

1 Like

Are you able to get some logs with the CLI?