Announcement

Collapse
No announcement yet.

Using MQTT Event to Detect Failure and Configure Sonoff

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

  • 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:	13
Size:	29.4 KB
ID:	1295932

  • #2
    thanks for sharing, i experienced similar when i have a bunch of power fluctuations on a nodemcu
    HS3 Pro on Windows 8 64bit
    53 Z-wave nodes(46 devices, 7 remotes), 15 DS10a's, 10 ms16a's, 9 Oregon Sensors, W800, RFXCOMtrx433, Way2Call, 3 HSTouch Clients, 2xRussound CAS44, Global Cache GC100-12,10 Rollertrol blinds(+ zwave) ,3 Squeezebox Radios and 1 Squeezebox Boom,DMX Arduino via ethernet,Rain8Net,3x Echo Dot's


    Check out my electronics blog here:
    https://www.facebook.com/RaptorsIrrationalInventions

    Comment

    Working...
    X