Watermeter number scale

Moderator: leecollings

Post Reply
Eraser
Posts: 24
Joined: Friday 13 January 2017 9:24
Target OS: Windows
Domoticz version: 3.8153
Contact:

Watermeter number scale

Post 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?
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Watermeter number scale

Post 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
Eraser
Posts: 24
Joined: Friday 13 January 2017 9:24
Target OS: Windows
Domoticz version: 3.8153
Contact:

Re: Watermeter number scale

Post 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"?
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Watermeter number scale

Post 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
Eraser
Posts: 24
Joined: Friday 13 January 2017 9:24
Target OS: Windows
Domoticz version: 3.8153
Contact:

Re: Watermeter number scale

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest