Page 1 of 1

Watermeter number scale

Posted: Friday 07 October 2022 13:34
by Eraser
I'm developing a plugin for my new HomeWizard Wi-Fi Watermeter. I already have a device working for the (live) waterflow but I'm having some problems with the device that shows the daily usage and totals. I'm using the "Counter" (113) device type with Subtype 0 and Switchtype 2. My watermeter exposes the total value with 3 decimals, so like 123.456 m3. This means that in this number 456 can be seen as liters. For some odd reason I have to multiply my value by 100 to get the actual m3 value correctly in the Domoticz Counter device. This works well but now my used liters value for today is rounding up by 10 instead of 1. So if I used 0.456 m3 today Domoticz calculates it as 450 liters instead of 456 liters.

I think it has something to do with the reason why I have to multiply the value by 100 but I can't figure out why this is required. Am I using the wrong device type?

Re: Watermeter number scale

Posted: Friday 07 October 2022 16:47
by FireWizard
Hi, @Erasor,

Check your settings in "Meters/Counters".
For "Water" the default divider is 100, but you can change that.

See: https://www.domoticz.com/wiki/Application_Settings

Regards

Re: Watermeter number scale

Posted: Wednesday 12 October 2022 14:18
by Eraser
FireWizard wrote: Friday 07 October 2022 16:47 Hi, @Erasor,

Check your settings in "Meters/Counters".
For "Water" the default divider is 100, but you can change that.

See: https://www.domoticz.com/wiki/Application_Settings

Regards
Thanks! Never knew that there was a setting for this.

Do you also know how to read that setting from a Python plugin? Because I need to know this setting to report the correct value.
In the documentation I see that I could simply use

Code: Select all

Settings["Language"]
. But what would be the correct name for the divider value. Would it be "WaterDivider"?

Re: Watermeter number scale

Posted: Wednesday 12 October 2022 14:26
by FireWizard
Hello @Eraser

I'm sorry, I have no experience and do not use any Python plugin.
But there are a lot of Python users on this forum, so maybe one of them can answer your question.

Regards

Re: Watermeter number scale

Posted: Wednesday 12 October 2022 15:18
by Eraser
FireWizard wrote: Wednesday 12 October 2022 14:26 Hello @Eraser

I'm sorry, I have no experience and do not use any Python plugin.
But there are a lot of Python users on this forum, so maybe one of them can answer your question.

Regards
I found it. For anyone looking for the same value, it's "MeterDividerWater".
You don't need to restart the plugin when changing the settings in Domoticz. This value always represents the actual settings.