RFXCounter Decimals possible?

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
herm42
Posts: 6
Joined: Tuesday 31 January 2023 20:54
Target OS: Linux
Domoticz version:
Contact:

RFXCounter Decimals possible?

Post 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
Attachments
215772273-60bcfbc0-459c-4994-978b-4e9429beb01d.png
215772273-60bcfbc0-459c-4994-978b-4e9429beb01d.png (14.63 KiB) Viewed 1610 times
215772860-05e9111a-8c6b-4970-a645-1c67f5ee8024.png
215772860-05e9111a-8c6b-4970-a645-1c67f5ee8024.png (48.33 KiB) Viewed 1610 times
215831653-058dc342-09b7-44fd-9314-03043b11d970.png
215831653-058dc342-09b7-44fd-9314-03043b11d970.png (14.69 KiB) Viewed 1610 times
willemd
Posts: 628
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: RFXCounter Decimals possible?

Post 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.
User avatar
waltervl
Posts: 5371
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RFXCounter Decimals possible?

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
herm42
Posts: 6
Joined: Tuesday 31 January 2023 20:54
Target OS: Linux
Domoticz version:
Contact:

Re: RFXCounter Decimals possible?

Post 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
Attachments
Screenshot_20230201_134339.png
Screenshot_20230201_134339.png (9.81 KiB) Viewed 1584 times
Screenshot_20230201_134402.png
Screenshot_20230201_134402.png (92.94 KiB) Viewed 1584 times
Screenshot_20230201_134444.png
Screenshot_20230201_134444.png (48.85 KiB) Viewed 1584 times
herm42
Posts: 6
Joined: Tuesday 31 January 2023 20:54
Target OS: Linux
Domoticz version:
Contact:

Re: RFXCounter Decimals possible?

Post 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"
}
User avatar
waltervl
Posts: 5371
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RFXCounter Decimals possible?

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
herm42
Posts: 6
Joined: Tuesday 31 January 2023 20:54
Target OS: Linux
Domoticz version:
Contact:

Re: RFXCounter Decimals possible?

Post 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
User avatar
waltervl
Posts: 5371
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RFXCounter Decimals possible?

Post by waltervl »

I am pretty sure the default divider setting for Gas is 100. So somebody changed it in your environment.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
herm42
Posts: 6
Joined: Tuesday 31 January 2023 20:54
Target OS: Linux
Domoticz version:
Contact:

Re: RFXCounter Decimals possible?

Post 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?
User avatar
waltervl
Posts: 5371
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RFXCounter Decimals possible?

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
herm42
Posts: 6
Joined: Tuesday 31 January 2023 20:54
Target OS: Linux
Domoticz version:
Contact:

Re: RFXCounter Decimals possible?

Post 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
blueberryPie
Posts: 18
Joined: Sunday 19 November 2017 20:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RFXCounter Decimals possible?

Post 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
Counter.jpg (10.79 KiB) Viewed 1189 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests