Send outside tempsensor value to Zwave

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
elmaco
Posts: 6
Joined: 19 Feb 2020 17:07

Send outside tempsensor value to Zwave

Post by elmaco »

I have a working DS18B20 tempsensor in a Pythonscript and i want to send the sensors value to Zwave.
How do i set up the script to send the value and how do i set up for an example Codedevice to collect those values?

Best regards/
Marcus

micky1500
Posts: 132
Joined: 07 Feb 2016 16:29

Re: Send outside tempsensor value to Zwave

Post by micky1500 »

Did you try a search in this forum ?
You are half way there with this !
https://forum.z-wave.me/viewtopic.php?f=3422&t=33319

Then my Arduino runs this, you could work out what it is doing and put that into a Python script.

void zwtemperature() //Tell zway the new temperature setting
{
zwaydevice=(F("HTTP_Device_switchMultilevel_276"));
zwaycommand=(F("exact?level="));
zwaycommand=zwaycommand+thermostat+'"';
zwayset();
}

void zwayset()
{
if (client.connect(server_zway, 8083)) //connect to zway
{
// client.print(F("GET /ZAutomation/api/v1/devices/ZWayVDev_zway_"));
client.print(F("GET /ZAutomation/api/v1/devices/"));
client.print(zwaydevice);
client.print(F("/command/"));
client.print(zwaycommand);
client.println(F(" HTTP/1.0")); // "on" or "off" or "update"
client.println(F("Authorization: Basic xxxxxxxxxxxxxxxxxx)); //BASE64 of username:password
client.println();
getresponse();
}
else
{
//Serial.println("connection to z-way failed");
}


I'm using HTTP Device, not Code Device this time.
screenshot of the settings
https://ibb.co/98kdrTX
Raspi 4(Buster), Zwave Version 3.0.6 x It's not my fault... I am not z-way team, just a user of a great system.

elmaco
Posts: 6
Joined: 19 Feb 2020 17:07

Re: Send outside tempsensor value to Zwave

Post by elmaco »

Hi and thanks for reply.
By using this formula i can change the level on a switchMultilevel to level 9:

Code: Select all

 /ZAutomation/api/v1/devices/HTTP_Device_switchMultilevel_44/command/exact?level=9
but when using the sensorMultilevel i cant change it with the same formula, i guess i should use a different formula for sensors, any idea?

Best regards/
Marcus

User avatar
PoltoS
Posts: 5524
Joined: 26 Jan 2011 19:36

Re: Send outside tempsensor value to Zwave

Post by PoltoS »

you can change a switch, but not a sensor. Sensor is a read-only feature. switch is an actor and you can modify it's state.

elmaco
Posts: 6
Joined: 19 Feb 2020 17:07

Re: Send outside tempsensor value to Zwave

Post by elmaco »

I see, thanks for clearing that out :)

Post Reply