Can't set temprature via bash script

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
xxLeoxx93
Posts: 16
Joined: Wednesday 22 March 2017 21:48
Target OS: Windows
Domoticz version:
Contact:

Can't set temprature via bash script

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Can't set temprature via bash script

Post 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'
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest