Report state of NGMQTT device

Posted on
Thu May 18, 2023 7:59 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Report state of NGMQTT device

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?

Posted on
Sun Aug 13, 2023 1:48 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Report state of NGMQTT device

Are you looking for the "on" state of the device, or the status of the MQTT Connector broker device connection?

Posted on
Mon Aug 14, 2023 12:26 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Report state of NGMQTT device

I’m looking for the on State of the device.

Posted on
Wed Aug 16, 2023 6:34 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Report state of NGMQTT device

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.

Posted on
Thu Aug 17, 2023 4:19 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Report state of NGMQTT device

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.

Posted on
Sat Aug 19, 2023 8:38 am
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Report state of NGMQTT device

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 1504 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 1504 times

Posted on
Sat Aug 19, 2023 11:22 am
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Report state of NGMQTT device

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.

Posted on
Tue Jan 30, 2024 3:22 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Report state of NGMQTT device

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.

Posted on
Tue Jan 30, 2024 3:41 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Report state of NGMQTT device

You can try a different Broker and see if it's more stable.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Jan 30, 2024 3:49 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Report state of NGMQTT device

Merrill Lynch had no idea how to help.
Suggestions?

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests