Page 1 of 1
RFXCounter Decimals possible?
Posted: Tuesday 31 January 2023 21:17
by herm42
Hi everyone.
i have problems with my northQ Gas meter (via zwave-js mqtt). It is autodetect as RFXMeter by domotics mqtt autodiscovery ... so far so good, only problem is that i can't see decimals in the graphical log view, only Integers are shown. The value itself has decimals, so the transfer fromzwave-js to domoticzs seems to be fine.
Any idea how to fix this?
PS: i'm using the latest beta
Re: RFXCounter Decimals possible?
Posted: Tuesday 31 January 2023 21:45
by willemd
I have no experience with zwave mqtt or autodiscovery but do have RFX meters and they all show a counter divider that basically indicates the number of decimals. So the counter stores an integer but if the counter divider is 1000 it means that that value divided by 1000, so with 3 decimals, is the real number. Hit the EDIT button on the icon to see and adjust the divider.
You need to be careful then with updates since updateCounter(currentvalue*1000) basically sets the counter again to the same value. You need to include the divider in the update.
Re: RFXCounter Decimals possible?
Posted: Tuesday 31 January 2023 21:49
by waltervl
What are your counter divider settings in menu settings?
https://www.domoticz.com/wiki/Applicati ... ters_Setup
These devices normally need deciliters and with domoticz divider set to 100 for Gas this will be calculated to m3. so 58,9 deciiters should be recalculated to 0,589 m3
Re: RFXCounter Decimals possible?
Posted: Wednesday 01 February 2023 13:46
by herm42
Hi,
RFXCOunter divider for gas is set to 1
if i change to 100 it will render the logs this way ...
... all the values delivered by zwave-js would be wrong by the factor 100
Re: RFXCounter Decimals possible?
Posted: Wednesday 01 February 2023 13:54
by herm42
I switched from ozw to zwave-js ... my NorthQ Energy Meter was detected like on ozw ... but the NorthQ Gas Meter was recognized as RFXMeter ....
maybe the northx gas meter should be type "P1 Smart Meter" with subtype "Gas" like it was via ozw ?
zwave js payload ...
{
"type": "sensor",
"object_id": "gas_cubic_meters_value",
"discovery_payload": {
"value_template": "{{ value_json.value }}",
"unit_of_measurement": "Cubic meters",
"icon": "mdi:thought-bubble",
"device_class": "gas",
"state_topic": "zwave-mqtt/87/50/0/value/131073",
"json_attributes_topic": "zwave-mqtt/87/50/0/value/131073",
"device": {
"identifiers": [
"zwavejs2mqtt_0xe9a1d9f4_node87"
],
"manufacturer": "NorthQ",
"model": "NorthQ Gas Meter (NQ-9121)",
"name": "Erdgas",
"sw_version": "3.30"
},
"name": "Erdgas_gas_cubic_meters_value",
"unique_id": "zwavejs2mqtt_0xe9a1d9f4_87-50-0-value-131073"
},
"discoveryTopic": "sensor/Erdgas/gas_cubic_meters_value/config",
"values": [
"50-0-value-131073"
],
"persistent": false,
"ignoreDiscovery": false,
"id": "sensor_gas_cubic_meters_value"
}
Re: RFXCounter Decimals possible?
Posted: Wednesday 01 February 2023 21:17
by waltervl
Did you change that divider before or after the switch to zwavjsui? As default is 100.
As a workaround it perhaps is possible to have zwavejsui send 100* the value? I really do not know this is possible in settings of zwavejsui but it would be the easiest change.
Re: RFXCounter Decimals possible?
Posted: Thursday 02 February 2023 8:22
by herm42
Pretty sure it was at default as it was the first device recognized as rfxmeter.
let zwavejsui send the value*100 and divide it again in domotics may work ... but not really a clean solution ... will play around a bit
Re: RFXCounter Decimals possible?
Posted: Thursday 02 February 2023 12:14
by waltervl
I am pretty sure the default divider setting for Gas is 100. So somebody changed it in your environment.
Re: RFXCounter Decimals possible?
Posted: Friday 03 February 2023 14:41
by herm42
... have another domoticz running on an raspberry (version 2202.2) .. the default there was 100 ... after adding mqtt autodicover modules the NoprthQ sensor has been detected as RFXMeter, but it showed 122.2m³ ... when i change the divider to 1 the value is correct but rounded in the log graphs... as on the other system.
Why not allow the RFXMeter graph to use float, the value itself is obviously float too?
Re: RFXCounter Decimals possible?
Posted: Friday 03 February 2023 17:44
by waltervl
I am no developer. You are free to add it, it is open source software. I suppose In OZW there was some transformation done internally. Now over MQTT it seems not possible (yet).
Also according the manual (
https://www.northq.com/q-gas) you can set the impuls factor on the device to get higher values so that domoticz can divide it to lower values with decimals.
Re: RFXCounter Decimals possible?
Posted: Friday 03 February 2023 17:59
by herm42
the impuls factor is to adapt the number of impulses / 10m³ ... this has to be set to match the gas odometer ... again, the measurement on zwavejs is correct ... will dig into the code
Re: RFXCounter Decimals possible?
Posted: Tuesday 28 May 2024 18:54
by blueberryPie
Counters clearly do support decimals and even the daily display shows decimals yet the decimals for the daily display are just shown as zeros (instead of the actual decimals). See below.

- Counter.jpg (10.79 KiB) Viewed 1541 times
I understand if the value is scaled up by 1000 and then a divisor of 1000 is used then the display will show the decimals.
It just seems like unexpected behavior showing decimals as zero instead of showing the actual decimals.