Hi all,
in the past I thought I catched the problem see here, but there are still problem…
I am sharing my local detected weather data with my neighbor. I the past I handled this by updating my data to https://opensensemap.org. Since I got many error messages during data upload and my neighbor during getting the data I stopped to use the service. I create a user in my system who is able to read variables. On the neighbor system I created some Shellsensors like this:
{
"attributeName": "abruf-wetterdaten-aussentemperatur",
"attributeType": "number",
"attributeUnit": "°C",
"command": "timeout 10s sh /home/pi/Homation/abrufWetterdaten.sh temperatur",
"interval": 60000,
"echo": {
"additionalNames": []
},
"id": "abruf-wetterdaten-aussentemperatur",
"name": "Abruf Wetterdaten Außentemperatur",
"class": "ShellSensor"
}
The part for the temp looks like this within the script:
curl -s -u $user:$pwd $addr/api/variables/aussenbedingungen.temperatur | jq -r .variable.value
This solution works better now and as long as my system is reachable everything work fine, but if not (e.g. for maintenance reason on my system) the pimatic service of my neighbor still stops to work. I tried to handle it by testing if my system is reachable if curl -Is www.google.de | grep "200 OK" >/dev/null; then
before executing the curl to my api, but it ends in the same result -> death of his pimatic service.
I really have no idea what could be the problem. Hope you guys can help.
EDIT: I forgot something. By starting the system with sudo pimatic.js
the system stops to start with following entrie:
19:42:18.043 [pimatic-echo] started hue emulator on port 80
I doubt the echo plugin causing the problem, but something after this.
BTW, why the pimatic-daemon.log logs less than the terminal does? The pimatic-daemon.log logs only this during the restart procedure:
19:33:05.087 2019-03-11 Monday
19:33:13.892 [pimatic] info: Starting pimatic version 0.9.46
19:33:13.901 [pimatic] info: Node.js version 4.8.3
19:33:13.903 [pimatic] info: OpenSSL version 1.0.2k
19:33:18.920 [pimatic, ppm] info: 2.15.12
19:33:18.985 [pimatic] info: Loading plugin: "pimatic-echo" (0.5.3)
19:33:20.951 [pimatic] info: Loading plugin: "pimatic-cron" (0.8.8)
19:33:21.532 [pimatic] info: Loading plugin: "pimatic-mobile-frontend" (0.9.13)
19:33:22.419 [pimatic] info: Loading plugin: "pimatic-iframe" (0.3.1)
19:33:22.468 [pimatic] info: Loading plugin: "pimatic-sunrise" (0.9.3)
19:33:22.777 [pimatic] info: Loading plugin: "pimatic-gpio" (0.9.0)