Running your script since one week now. It works so far. But I found a problem. After the ESP gets powerless -> cold reboot it seems not to work correct. It reboots one time per minute (approx). Pimatic is getting still the values, but not every 10 sec. due to the reboot. It is maybe 2-3 times.
I’m getting it back to proper work by changing to a native “protocol” like “standalone”, run it some time (round about 1 minute) and changing back to “Pimatic RestAPI”.
Do somebody else observed this behavior?