Question on a Supporting a Virtual Device

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
davidtheITGuy
Posts: 26
Joined: 24 Sep 2021 03:55

Question on a Supporting a Virtual Device

Post by davidtheITGuy »

Hi all,

I have a question about creating a "virtual device" on the Zuno2. According to the reference (as of this posting) the following device functionality is supported:

Code: Select all

ZUNO_SWITCH_BINARY()
ZUNO_SWITCH_COLOR()
ZUNO_SWITCH_MULTILEVEL()
ZUNO_SENSOR_BINARY()
ZUNO_SENSOR_MULTILEVEL()
ZUNO_METER()
ZUNO_BLINDS()
ZUNO_FLOWSTOP()
ZUNO_SIREN()
ZUNO_DOORLOCK()
ZUNO_THERMOSTAT()
But I have a requirement wherein I would potentially add to a custom value to a ZUNO_SENSOR_MULTILEVEL(). This value would be an "offset" value that can be set by the user. The offset value could have a range of say -10 to +10 (think of a humidifier sensor such as a DHT22).

My question is how can I get the Zuno2 to report up values I want to store via getters() and setters() that are say -10 to +10? There doesn't seem to be exposed device functionality to support this. Is this a ZWave limitation of the exposed devices or a Zuno2 issue?

Hope this makes sense and thanks for any help or direction on how to do this.
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Question on a Supporting a Virtual Device

Post by PoltoS »

ZUNO_SENSOR_MULTILEVEL supports negative values too.
davidtheITGuy
Posts: 26
Joined: 24 Sep 2021 03:55

Re: Question on a Supporting a Virtual Device

Post by davidtheITGuy »

Thank you for your reply very helpful. I’m still also struggling with wanting to have the ability to select (in a switch of some sort) a negative value on my GUI element that is returned to the Zuno as a setter value…
niom
Posts: 7
Joined: 24 May 2023 10:37

Re: Question on a Supporting a Virtual Device

Post by niom »

davidtheITGuy wrote:
09 May 2023 23:18
Thank you for your reply very helpful. I’m still also struggling with wanting to have the ability to select (in a switch of some sort) a negative value on my GUI element that is returned to the Zuno as a setter value…
Would you please describe a use case and scenarios on how would you see your system work.

Im not sure I understand a case but you can also use Arduino function

Code: Select all

map
if you need to map one value to another.
something like

Code: Select all

map(sensorValue, -10,10, 0,99)
davidtheITGuy
Posts: 26
Joined: 24 Sep 2021 03:55

Re: Question on a Supporting a Virtual Device

Post by davidtheITGuy »

Thanks for this helpful tip. The map() function might work. The use case on this incidentally is for adding an offset value to a DHT12 humidity sensor. I have two issues: 1) how to add a way for the Zuno to report an offset value to correct the output of the DHT12. The map() command might do the trick here. And 2) how to have the web GUI I am using send a value back to the Zuno to set the offset in the first place. This is not as simple as it sounds but perhaps a dimmer or slider that connects through a map() from the setter function may also do the trick. I will investigate. Thanks again
niom
Posts: 7
Joined: 24 May 2023 10:37

Re: Question on a Supporting a Virtual Device

Post by niom »

For the second part you can use parameters to set an offset
https://z-uno.z-wave.me/Reference/ZUNO_ ... ARAMETERS/
Although you will have to set the parameter manually
davidtheITGuy
Posts: 26
Joined: 24 Sep 2021 03:55

Re: Question on a Supporting a Virtual Device

Post by davidtheITGuy »

Yes I’ve looked into parameters but it’s not clear how to dynamically set them from a GUI (server) driven message.

Frankly, that’s the problem I think with the Zuno is that it implements several device classes (eg binary switch, dimmer, etc) but the device classes are slave to the ZWave specification which limits values that can be set/get.

I still think the ZUno would benefit tremendously to allow for a general purpose “virtual” device class with an open get/set capability. I would get this obviously if I used say the MQTT protocol for example, need this open/dynamic capability on the ZUno too!
niom
Posts: 7
Joined: 24 May 2023 10:37

Re: Question on a Supporting a Virtual Device

Post by niom »

IMHO, ZUno is basically an Arduino with ZWave. So all limitations come from there. Im sure you can connect ethernet shield to it although I think it would be quite cost ineffective. So switching to a pure Arduino-compatible device with a simple network in your case might be preferable

oh, by the way. I'm not affiliated with ZUno in any way except that I bought two devices for tests in my HA and short circuited one of them :roll:
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Question on a Supporting a Virtual Device

Post by PoltoS »

Z-Wave is a very well types protocol. You are confined to the existing types, but on the other side, you get compatibility across brands. This is worth the game!
davidtheITGuy
Posts: 26
Joined: 24 Sep 2021 03:55

Re: Question on a Supporting a Virtual Device

Post by davidtheITGuy »

Yes sir and the Zuno is a great product! Thank you
Post Reply