nano temp.sh czy vi temp.sh i wklej tak jak tu
Kod: Zaznacz cały
#!/bin/sh
curl -u root:root "http://192.168.XX.XX/getregister.cgi?device=0&tkot_value" --silent --show-error --location | xmllint --xpath "string(//cmd/device/reg /@v)" - > /home/supla/supla-filesensors/tkot_value.txt
curl -u root:root "http://192.168.XX.XX/getregister.cgi?device=0&tpow_value" --silent --show-error --location | xmllint --xpath "string(//cmd/device/reg /@v)" - > /home/supla/supla-filesensors/tpow_value.txt
curl -u root:root "http://192.168.XX.XX/getregister.cgi?device=0&tpod_value" --silent --show-error --location | xmllint --xpath "string(//cmd/device/reg /@v)" - > /home/supla/supla-filesensors/tpod_value.txt
curl -u root:root "http://192.168.XX.XX/getregister.cgi?device=0&tcwu_value" --silent --show-error --location | xmllint --xpath "string(//cmd/device/reg /@v)" - > /home/supla/supla-filesensors/tcwu_value.txt
curl -u root:root "http://192.168.XX.XX/getregister.cgi?device=0&tsp_value" --silent --show-error --location | xmllint --xpath "string(//cmd/device/reg /@v)" - > /home/supla/supla-filesensors/tsp_value.txt
curl -u root:root "http://192.168.XX.XX/getregister.cgi?device=0&fuel_level" --silent --show-error --location | xmllint --xpath "string(//cmd/device/reg /@v)" - > /home/supla/supla-filesensors/fuel_level.txt
mało eleganckie, ale powinno działać
później daj
i sprawdź czy pliki jak wyżej się utworzyły, jeśli tak możesz sobie dodać je jako kanały do supli lub wyciąć co Ci faktycznie potrzebne