Announcement

Collapse
No announcement yet.

Using MQTT Event to Detect Failure and Configure Sonoff

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Raptor
    replied
    thanks for sharing, i experienced similar when i have a bunch of power fluctuations on a nodemcu

    Leave a comment:


  • Using MQTT Event to Detect Failure and Configure Sonoff

    One of my projects described in the mcsMQTT manual to turn on and off a garage light based upon a pair of light beam sensors and determination by Sonoff the direction of motion and hence if light should be turned on or off. It works extremely well, but every few days I get a fatal exception which appears to be an illegal instruction. Likely root cause is faulty flash memory. On the exception the Sonoff restarts.

    This would not be a problem except when it occurs the configuration settings are restored to the default and the Sonoff then no longer works as a motion direction detector. Since it does not happen often I don't want to replace the hardware. I am using HS MQTT event to detect the failure and then in the event action send the MQTT message to set the configuration back to one used for motion direction detection.

    While it is likely the others do not have this specific failure mode, the concept of this event may be useful for other situations.

    Click image for larger version

Name:	Capture.PNG
Views:	137
Size:	29.4 KB
ID:	1295932
Working...
X