I have used similar watchdog but my watchdog time is 10 minutes.
Have you logged the driver using CLI command smartthings edge:drivers:logcat --hub-address=Your-Hub-IP-Address
You might find something in the log that would explain the problems.
I have used similar watchdog but my watchdog time is 10 minutes.
Have you logged the driver using CLI command smartthings edge:drivers:logcat --hub-address=Your-Hub-IP-Address
You might find something in the log that would explain the problems.
Thanks, didn’t know about that. I’ll try it.
Back from more testing. Thanks to @TapioX I managed to get the events and it seems that the driver script for reconnect wants first to close the connection (unsubscribe from topics) which of course it cannot do since it is disconnected. Strangely same behavior is observed even if I change the settings (like Ip or username), it does not try a new connection immediately since it considers it is still connected to the old broker and wants to unsubscribe first. This also explains why the status of main device MQTT Device Creator V1.9 shows Connected when in fact it isn’t. Below one example from logs. @TAustin, maybe when you have a chance you could help with this if you agree.
2024-09-28T14:14:02.816849420Z TRACE MQTT Devices V1.9 Received event with handler capability
2024-09-28T14:14:02.860996420Z INFO MQTT Devices V1.9 <Device: 558ccb9c-4158-491b-b52a-671c4473b3b2 (MQTT Device Creator V1.9)> received command: {“args”:{},“capability”:“partyvoice23922.refresh”,“command”:“push”,“component”:“main”,“positional_args”:{}}
2024-09-28T14:14:02.867238670Z TRACE MQTT Devices V1.9 Found CapabilityCommandDispatcher handler in MQTT Devices
2024-09-28T14:14:02.873755086Z INFO MQTT Devices V1.9 Refresh requested
2024-09-28T14:14:02.876717461Z INFO MQTT Devices V1.9 <Device: 558ccb9c-4158-491b-b52a-671c4473b3b2 (MQTT Device Creator V1.9)> emitting event: {“attribute_id”:“deviceType”,“capability_id”:“partyvoice23922.createmqttdev9”,“component_id”:“main”,“state”:{“value”:" "},“visibility”:{“displayed”:false}}
2024-09-28T14:14:02.898558336Z INFO MQTT Devices V1.9 <Device: 558ccb9c-4158-491b-b52a-671c4473b3b2 (MQTT Device Creator V1.9)> emitting event: {“attribute_id”:“status”,“capability_id”:“partyvoice23922.status”,“component_id”:“main”,“state”:{“value”:“Connecting…”}}
2024-09-28T14:14:02.912500503Z DEBUG MQTT Devices V1.9 Unsubscribing all and disconnecting current client…
2024-09-28T14:14:02.914173003Z ERROR MQTT Devices V1.9 Disconnect failed with err: network connection is not opened
2024-09-28T14:14:02.928317753Z DEBUG MQTT Devices V1.9 MQTT Device Creator V1.9 device thread event handled
All the best,
Vlad
Hi Todd (@TAustin )
I’m using the brilliant Discovery Driver which is working well for switches but I’m having an issue with a presence device. In particular setting it to not present.
I can create it
.\mosquitto_pub -h localhost -t “smartthings/presence/car/config” -m “create”
Which shows it as not present
Following the documentation for the states presence (presenceSensor): present | not present
I can set it to present
.\mosquitto_pub -h localhost -t “smartthings/presence/car2/config” -m “present”
Which works
But if I try
.\mosquitto_pub -h localhost -t “smartthings/presence/car2/state” -m “not present”
It doesn’t update the presence device and I see this in the logs:
2024-10-04T22:07:31.966044443Z INFO MQTT Handler V1 Received: PUBLISH{topic=“smartthings/presence/car2/state”, dup=false, payload=“not present”, retain=false, qos=0, type=3}
2024-10-04T22:07:31.980319943Z DEBUG MQTT Handler V1 Device name sent updated state value = “not present”
2024-10-04T22:07:31.982966359Z WARN MQTT Handler V1 Invalid state value [not present] received for presence
2024-10-04T22:07:45.837925694Z DEBUG MQTT Handler V1 driver device thread event handled
Any help appreciated
When I added a new presence sensor device in the settings, the default was that not present was written without a space.
Definitely worth a try. Thanks. Will let you know
@TAustin, you think we could add EV Charger device in the list of virtual device creation?
Has anyone heard from Todd - that is quite concerning. I notice his Github has not been updated since then either
I tried notpresent which didn’t work also with various spellings notPresent and NotPresent which didn’t work
2024-10-06T20:48:14.284016567Z INFO MQTT Handler V1 Received: PUBLISH{topic=“smartthings/presence/car2/state”, dup=false, payload=“notpresent”, retain=false, qos=0, type=3}
2024-10-06T20:48:14.296468443Z DEBUG MQTT Handler V1 Device name sent updated state value = “notpresent”
2024-10-06T20:48:14.299367443Z WARN MQTT Handler V1 Invalid state value [notpresent] received for presence
2024-10-06T20:48:18.622343818Z DEBUG MQTT Handler V1 driver device thread event handled
Guessing I may have to change to using a switch and getting it to trigger a virtual presence sensor
I heard from him a few weeks ago and he indicated he had/was moving away from ST development
That bad news especially considering the latest firmware update is breaking many lan drivers.
Very concerning. I think we all owe Todd a huge amount for what he brought to the platform. Let’s hope SmartThings can fix the issue with LAN drivers or someone can pick up Todd’s work.
Why did you use “car2/config” for presence and “car2/state” for absence ?
Shouldn’t it be “car2/config” for both ?
Sorry bad cut and paste. I used state for both. The config was setting up the control in smartthings
\mosquitto_pub -h localhost -t “smartthings/presence/car2/state” -m “present"
Does anyone know if someone is picking up work on MQTT Discovery support? I see “veon” has forked some of his repos and even published an “MQTT Handler v1.4”, but has not published an updated “MQTT Discovery” driver so the original one from Todd still uses his own “MQTT Handler v1”. I’d like to possibly contribute to some of this work, but I’m not sure who has picked up the ball or to whom Todd may have handed off his repos.
MQTT Devices’ Temperature Device has rounding problem in latest SmartThings App (at least Android version).
If I open Detail View ST App is making temperature value rounding.
ST App MQTT Temperature Tile before opening Detail View.
ST App MQTT Temperature Tile after closing Detail View.
MQTT Temperature Device is using slider and I think that this is general slider problem in ST App.
Maybe it’s same problem like this Heating Setpoint problem
Happening the same in iOS 1.7.26 since updated on 13/1
Hi!
I am working on a project to display a series of temperature sensors on ESP32-based oled displays. (So I can see outdoor temps at a glance.)
Rather than invent my own mechanism (which I was close to doing), I found this topic and even more specifically the publish command from the “MQTTDevices” driver.
toddaustin07/MQTTDevices: SmartThings driver for creating MQTT-connected devices
However, I am having a problem and not sure how to debug.
If I publish a rule that sends a static string / message on an interval, then the message comes through as expected, no problems.
However, if I “borrow” similarly expressed rules formats from this topic and elsewhere to “read” the temperature from another device, then nothing happens.
I have logcat running on the MQTTDevices driver as well, and it implies that the publish command is not even called at all when trying to specify the temperature device.
Any suggestions? I’ll provide the working and non-working json below to review.
Working Json, but with a static mqtt message:
{ "every": { "interval": { "value": { "integer": 3 }, "unit": "Minute" }, "actions": [ { "command": { "devices": [ "--mqtt--device--id--" ], "commands": [ { "component": "main", "capability": "partyvoice23922.mqttpublish", "command": "publish", "arguments": [ { "string": "stmqtt/temperatures/test-3min" }, { "string": "test message" }, { "integer": 1 } ] } ] } } ] } }
Non-Working Json – which is what I need though… reading the temperature every X min.
{ "every": { "interval": { "value": { "integer": 3 }, "unit": "Minute" }, "actions": [ { "command": { "devices": [ "--mqtt--device--id--" ], "commands": [ { "component": "main", "capability": "partyvoice23922.mqttpublish", "command": "publish", "arguments": [ { "string": "stmqtt/temperatures/test-3min" }, { "device": { "devices": [ "--temp--sensor--device--id--" ], "component": "main", "capability": "temperatureMeasurement", "attribute": "temperature" } }, { "integer": 1 } ] } ] } } ] } }
(Note: I have explicitly altered the device ids, but they are the correct guids from the advanced web interface)
Use this example and Temperature Device. When using AWA add only actions.
Temperature is number and you can’t use it like string (no automatic conversion in ST).