Sensor Multilevel Scale addition?

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Post Reply
Steve_Elves
Posts: 22
Joined: 07 Aug 2022 21:54

Sensor Multilevel Scale addition?

Post by Steve_Elves »

I'm building a Rain Gauge that will accumulate pulses from a "tipping bucket". I want to transmit analog values that will contain total rainfall in the current hour, previous hour, current day, and previous day, in units of "mm". Where are the Scale Unit definitions held?, and is it possible to edit/add a scale definition? Can I add a new Multilevel Type of "RAINFALL" - the only existing type I can find in ZUNO_Definitions.h called "RAIN_RATE" with a scale of "MILLIMETERS_PER_HOUR", which is not what I want.
The Scale units seem to come over to my Z-Wave master controller from the ZUNO (for instance, CELCIUS comes over as C), but I don't see where they originate....
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Sensor Multilevel Scale addition?

Post by PoltoS »

Those scales are defined in the protocol. Only those defined can be used.

You can check the full list here:
https://sdomembers.z-wavealliance.org/document/dl/917
[ Registries / Multilevel Sensor Command Class, list of assigned Multilevel Sensor types and scales.xlsx ]

There is a Rain rate type defined. This is exactly what you need.

Sensor type: Rain rate = 0x0C
Scale type: Millimeter/hour (mm/h) = 0x00

Then use the generic macro: https://z-uno.z-wave.me/Reference/ZUNO_ ... ULTILEVEL/ (precision and size are up to you)
Steve_Elves
Posts: 22
Joined: 07 Aug 2022 21:54

Re: Sensor Multilevel Scale addition?

Post by Steve_Elves »

Thank you for the information. In my case, I wanted not only the rain rate (mm per hour), but the accumulated rainfall in mm. The total rainfall in a given hour is in fact more useful that a rain rate, in that I can use it to decide if the garden has had enough rain in the past 8 hours, or do I need to turn the sprinklers on.
Steve_Elves
Posts: 22
Joined: 07 Aug 2022 21:54

Re: Sensor Multilevel Scale addition?

Post by Steve_Elves »

Am I reading this correctly, then - there is NO way for a user to add or modify the sensor types or scales used in the Zuno?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Sensor Multilevel Scale addition?

Post by PoltoS »

Well, none of controllers will decode this sensor defined by you, since this is not defined in the protocol. Except for... Z-Way ;)

Define your own value for the sensor type and scale and in Z-Way add in translations/Scales.xml the same type and scale. That could be any unused value
MicheleFleming
Posts: 1
Joined: 03 Aug 2023 06:18

Re: Sensor Multilevel Scale addition?

Post by MicheleFleming »

Scale unit definitions in Z-Wave devices are held in the device's configuration. To edit or add new definitions, you'll need to modify the device's firmware or configuration settings during development. Adding a new Multilevel Type like "RAINFALL" is technically possible but requires careful implementation to ensure compatibility with other devices and controllers. The ZUNO device translates raw data from the Rain Gauge into appropriate units before sending it to the Z-Wave network. Details can be found in ZUNO_Definitions.h and related code files.
Post Reply