Script randomly killed on Shelly Plus 1PM

  • Hi,

    I'm using a Shelly Plus1PM to automate my pool pump

    I've created a script which performs the following actions:
    - listening a specific MQTT topic to retrieve the current water temperature

    - keeping the max temperature of the day, and for the previous day.

    - computing the needed filtering time, based on the current max temp

    - defining the schedule (start/stop time, in the morning and in the afternoon)

    - updating the Shelly On/Off schedule for the day.

    - filtering updates to max 1 per 10 minutes

    - filtering temperature update for 10 minutes after the pump has started (my sensor is located in the skimmer, so I often see a several °C spike when water starts to flow again).

    It's working perfectly well ! Shelly scripting is really a big plus. It avoids the automation to be dependent from other components: if I loose my home assistant instance, if my server burns in fire, if the internet connection is lost, ... my pumps will still continue to operate (on a fixed schedule).

    But... there's a caveat somewhere: the script is randomly killed several times a day and the only way I found to workaround is to send automated Script.Start command with API, which defeats the autonomous advantage above :(

    I've tried running a 2nd script to perform the same thing locally. It works... until this 2nd script gets killed too...

    Sometimes, not only the script is killed but the device is reset as well, and it looks like the script is not automatically restarted (even though the Enable Flag is set).


    There is no clear message in the logs. It does not happen when the pump is started/stopped, so it's unlikely to be a power issue.

    The only pattern I see is that the script is often killed when the WiFi is disconnected. My Shelly is located in a concrete shelter quite far the house and the WiFi reception is quite flaky and the devices loses connections several times per day (I might upgrade it to a Shelly PRO1PM with Ethernet and CPL when it will be available).

    I have a 2nd Shelly Plus1PM I use for tests. It runs the same script, receives the same MQTT messages. the only difference is that there's nothing plugged on the relay and it is located on my desk with excellent WiFi coverage. The script has been running flawlessly without having been killed for more than 1 week.

    Did anybody experience the same behavior ? Is it a known issue ? Is there any known solution ?

    As a side band note, it would be cool to have local storage for script, to not lose max temp when script is restarted ;)

    Thanks,

    Gilles.

  • Dieses Thema enthält 8 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.