Page 1 of 1

Can't set temprature via bash script

Posted: Tuesday 10 December 2019 13:39
by xxLeoxx93
Hello,

I'm trying to set the temprature of one dummy hardware temperature sensor.

Here's what I've so far:

Code: Select all

echo $MEASURED
curl 'http://127.0.0.1:8080/json.htm?username=XXX&password=XXX&type=command&param=udevice&idx=175&nvalue=0&svalue=$MEASURED'
Result looks like this:

Code: Select all

19.5
{
        "status" : "OK",
        "title" : "Update Device"
}
So as you can see my variable is filled corretly but the temperature is still 0 in domoticz (I've checked the IDX multiple times, it's correct and sensor type is Temp).

Any hints?

Re: Can't set temprature via bash script

Posted: Tuesday 10 December 2019 14:13
by waaren
xxLeoxx93 wrote: Tuesday 10 December 2019 13:39 I'm trying to set the temprature of one dummy hardware temperature sensor.
....
Any hints?
On my system no user/password is needed coming from my local network (as I defined it as such in [setup][settings][system] (Local Networks (no username/password):) but for other situations, the syntaxis is ( as described on this wiki page ) :

Code: Select all

curl 'http://<username>:<password@>127.0.0.1:8080/json.htm?type=command&param=udevice&idx=175&nvalue=0&svalue=$MEASURED'