logo elektroda
logo elektroda
X
logo elektroda

[LN882H] OpenLN882H_1.18.292.bin - why are PingHost and PingInterval commands missing?

Chameleon_ 72 1
ADVERTISEMENT
  • #1 21922798
    Chameleon_
    Level 1  
    Posts: 1
    Hardware: generic AliExpress WiFi smart plug, Lightning LN882H chip
    Original firmware: stock Tuya, Smart Life app compatible
    Flashed to: OpenBeken via UART, version OpenLN882H_1.18.292.bin (today's build)

    What I am trying to do:
    I want a ping watchdog that continuously pings an external host (8.8.8.8), and if there is no reply for a longer period, cuts power to the relay for a short time, then restores it, basically an automatic router reboot using the smart plug the router itself is plugged into. I found the autoexecExamples.md ping watchdog samples and based my script on those.

    Pins are confirmed working, relay on pin 7 channel 65, button on pin 6 same channel, both verified through GPIO Doctor and manual testing already, this part is solid.

    The autoexec.bat code I am running:

    startDriver NTP
    startDriver SSDP

    PingHost 8.8.8.8
    PingInterval 60

    again:

    waitFor NoPingTime 600
    echo no ping reply for 10 cycles, cutting power to router
    delay_s 1
    SetChannel 65 0
    delay_s 20
    SetChannel 65 1
    echo router power restored, waiting before next check

    ClearNoPingTime
    delay_s 60

    goto again

    The error from the log on boot:

    Error:CMD:cmd PingHost NOT found (args 192.168.99.99)
    Error:CMD:cmd PingInterval NOT found (args 5)

    (this was during a shortened test version, same error happens with the real values too)

    secondsWithNoPing stays at -1 the entire time in the log, never initializes, which matches the commands not being recognized at all.

    Question: Is the ping watchdog feature (PingHost, PingInterval, NoPingTime) simply not compiled into the current LN882H build, even though it is documented in autoexecExamples.md and commands.md without any chipset restriction noted? Or am I missing some flag/prerequisite driver that needs to be started first before these commands become available? Any pointers appreciated, thanks.
  • ADVERTISEMENT
ADVERTISEMENT