Dummy Device - Sensor

This is a collection of wishes and needs for the next versions of Z-Way/Z-Cloud/Z-Box
Post Reply
topcatsss
Posts: 29
Joined: 24 Nov 2016 22:27
Location: West Sussex, GB

Dummy Device - Sensor

Post by topcatsss »

It would be nice to have a Dummy Sensor device
Either Binary on/off and/or Multi value say (1-100)

This could then be updated locally by manual input or remotely by a http push externally.
seattleneil
Posts: 210
Joined: 02 Mar 2020 22:41

Re: Dummy Device - Sensor

Post by seattleneil »

Why not use the HTTP Device app? It supports binary sensors and multilevel sensors.
topcatsss
Posts: 29
Joined: 24 Nov 2016 22:27
Location: West Sussex, GB

Re: Dummy Device - Sensor

Post by topcatsss »

the idea is to have it as a dummy device and accept push setting not pull
seattleneil
Posts: 210
Joined: 02 Mar 2020 22:41

Re: Dummy Device - Sensor

Post by seattleneil »

When a multilevel sensor HTTP virtual device is added to Z-Way, Z-Way will assign it a virtual device ID. Something like 'HTTP_Device_sensorMultilevel_23'. To push value=41.0 to the multilevel sensor virtual device with virtual device ID='HTTP_Device_sensorMultilevel_23', the following shell command should work:

Code: Select all

curl -s -u admin:[PASSWORD] --globoff "http://127.0.0.1:8083/JS/Run/controller.devices.get('HTTP_Device_sensorMultilevel_23').set('metrics:level',41.0)"
Note that the command shown above should work for any Z-Way device that has a metrics:level value (whether it's a Z-Wave real device, code device, etc.); you just need to specify the virtual device ID and value.

Alternatively, you can force a multilevel sensor virtual device to update it's value (i.e., you're not pushing the value directly, you're pushing a request to the virtual device to pull it's value). In the case of an HTTP virtual device configured to use the GET method, Z-Way will do a GET as configured for the HTTP Device. The following command should work:

Code: Select all

curl -s -u admin:[PASSWORD] --globoff "http://127.0.0.1:8083/ZAutomation/api/v1/devices/HTTP_Device_sensorMultilevel_23/command/update"
Please check out Z-Way documentation for more info:
https://z-wave.me/manual/z-way/Develop_Code_Z_Way.html
Post Reply