Hi everyone.
I have a question. My Sonoffs are sending the tele messages every 5 minutes or so with information about temperature, contact information from my light switches and pir sensors. All this is fine and good. But it is also sending information about the status of the sonoff relay state itself.
How can I use this information to update the status of my switch in Pimatic?
The problem is that sometimes (not very often, but it happens) the state topic does not get received by pimatic. I believe the sonoff might loose the connection for a second to the mqtt server, while it is posting the state topic, and then the status of the switch in Pimatic is not correct compared to what the relay is on the sonoff.
This wrong setting can go on until a new state messages is issued by the sonoff or I switch the relay in Pimatic myself.
So my idea is to use the tele messages to update the status of the switches in Pimatic.
I just don’t know exactly how I should go on about this. Do I really need to make a extra dummy device for all my devices and then makes even more rules, or is there an easy way to use the tele messages from my Sonoff to make sure that the state in Pimatic is correct?
Thank you for your help.
Example of my tele messages from sonoff is:
16:24:27 MQT: stat/doorlockoutside/STATE = {“Time”:“2018-06-18T16:24:27”,“Uptime”:“2T01:30:16”,“Vcc”:3.451,“POWER”:“ON”,
Kind regards Simon