Page 1 of 1

Report state of NGMQTT device

PostPosted: Thu May 18, 2023 7:59 pm
by SMUSEBY
In my experience, the MQTT Broker / Connector breaks from time to time. For a critical (refrigerator) load, I would like to be able to test the condition, and send an email, or turn it on, etc. For an email, using the format, %%d:123456:some state%%, I have been unable to get the on state condition to report. Sending a status request for a device is not helpful, as there is nothing reported to the Event Log.
Is there a solution?

Re: Report state of NGMQTT device

PostPosted: Sun Aug 13, 2023 1:48 pm
by aaronlionsheep
Are you looking for the "on" state of the device, or the status of the MQTT Connector broker device connection?

Re: Report state of NGMQTT device

PostPosted: Mon Aug 14, 2023 12:26 pm
by SMUSEBY
I’m looking for the on State of the device.

Re: Report state of NGMQTT device

PostPosted: Wed Aug 16, 2023 6:34 pm
by aaronlionsheep
What Shelly model are you working with? A standard on/off device in Indigo will have a state called "onOffState" that is not shown in the device states list. Shelly relay devices all use this state and sensor devices will use "sensorValue".

You can right-click on the device in the devices list and choose "Print Device Details to Event Log". There will be an entry called "states" that includes the list of states for the device and their values.

Re: Report state of NGMQTT device

PostPosted: Thu Aug 17, 2023 4:19 pm
by SMUSEBY
I'm using the Shelly Plus1, - Plus1PM, and Plus2PM devices.
I can find the status of the device in the event log by right-clicking as you suggest, but that requires intervention. I would like to automate that process but don't know how to access that information in a trigger or schedule. I would like to do so to build redundancy into key relay/devices, such as for a refrigerator.

Re: Report state of NGMQTT device

PostPosted: Sat Aug 19, 2023 8:38 am
by aaronlionsheep
I guess I don't understand what you are trying to do. That onOff state is available in all the Indigo UI components for creating triggers and schedules.

You can trigger when the onOff state becomes a value or changes, and then act accordingly.
Screenshot 2023-08-19 at 10.33.54 AM.png
Screenshot 2023-08-19 at 10.33.54 AM.png (37.69 KiB) Viewed 1608 times


Or you can make a schedule that periodically runs and is conditional on the onOff state being some value, and then act accordingly.
Screenshot 2023-08-19 at 10.34.59 AM.png
Screenshot 2023-08-19 at 10.34.59 AM.png (47.32 KiB) Viewed 1608 times

Re: Report state of NGMQTT device

PostPosted: Sat Aug 19, 2023 11:22 am
by SMUSEBY
I am familiar with triggers in time date actions. I was unable to get them to work with the Shelly devices. It’s been awhile so I will try again as I don’t remember the specific issue that caused it to fail. Perhaps when the Shelly broker fails (which is the issue I’m attempting to deal with) it might result in the triggers failing to sense the on/off state..
I’ll experiment with this scenario.

Re: Report state of NGMQTT device

PostPosted: Tue Jan 30, 2024 3:22 pm
by SMUSEBY
The issue I'm trying to resolve is the periodic failure of Shelly MQTT devices to respond to a command. When this occurs, reloading the Broker plug-in and repeating the command resolves the issue.
For example, when an On command fails, the Indigo device status will indicate that it is ON, the Shelly Broker indicates "Connected 0", and right clicking on the device and selecting 'print device details to event log' also shows the incorrect device state.
However the correct status is available in MQTT Explorer. After experimenting, I have not discovered an instance when the MQTT Expoloer indicates an erroneous onState.
Is there a way to get the accurate device status into Indigo?
The solution to the periodic broker failure issue that might work would be to follow an Indigo command with a query as to the on state of the device; if wrong, reload the broker plug-in and repeat the device command.

Re: Report state of NGMQTT device

PostPosted: Tue Jan 30, 2024 3:41 pm
by FlyingDiver
You can try a different Broker and see if it's more stable.

Re: Report state of NGMQTT device

PostPosted: Tue Jan 30, 2024 3:49 pm
by SMUSEBY
Merrill Lynch had no idea how to help.
Suggestions?