I have a ds18b20 on my Nodemcu on GPIO pin 2 to read the temperature and a relais on pin 15 to switch the heating on/off. The Esp Easy "website" simply shows me the right temperature.
I want to read/set the values from my linux server as well.
For reading the status of the on/off GPIO pin 2, I simply use something like:
Code: Select all
curl --silent --data 'cmd=status,gpio,15' http://192.168.178.241/control | grep state | awk {'print $2'}
Code: Select all
curl --silent --data 'cmd=gpio,15,1' http://192.168.178.241/control
Code: Select all
curl --silent --data 'cmd=gpio,15,0' http://192.168.178.241/control
But how do I read the value of the temperature of my ds18b20?
If I use the same command
Code: Select all
curl --silent --data 'cmd=status,gpio,2' http://192.168.178.241/control
Code: Select all
{
"log": "",
"plugin": 1,
"pin": 2,
"mode": "output",
"state": 0
}