Have a sensor DHT22 over ESP8566 in the employment. Would like to read the data via php command and display in Pimatic as Temp and Hym sensor. The scipt works as far as, get via the command “php /home/pi/tcp.php 192.168.2.164 4x1” an output so-called “-999 | -999” The first value is temperature and the second humidity. How do I get the data in the shell sensor separately and assign attributes? Or maybe there is another possibility to display the data?
If I set “attributeType” as “number”, I get only the first value at time. As “string” shows -999 | -999, but I can not assign “attributeUnit”.
I found after many try a solution for ShellSensor.
php /home/pi/tcp.php 192.168.2.164 4x1 | cut -d “|” -f 1
php /home/pi/tcp.php 192.168.2.164 4x1 | cut -d “|” -f 2