Closed bucovaina closed 2 years ago
Try looking in telegram.items() to see if there's something its missing. Try coping pasting the output of the script here.
Its also possible that the dsmr_parser library doesnt support it or needs a newer version.
Hi @psy0rz : thanks for your help and time!
Sorry to ask this noob question, how do I look at telegram.items() ?
This is the output of the script:
{'fields': {'CURRENT_ELECTRICITY_DELIVERY': 0.663,
'CURRENT_ELECTRICITY_USAGE': 0.0,
'DEVICE_TYPE': 3.0,
'ELECTRICITY_DELIVERED_TARIFF_1': 4394.839,
'ELECTRICITY_DELIVERED_TARIFF_2': 1745.826,
'ELECTRICITY_USED_TARIFF_1': 2367.968,
'ELECTRICITY_USED_TARIFF_2': 3569.697,
'INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE': 0.663,
'INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE': 0.0,
'INSTANTANEOUS_CURRENT_L1': 3.25},
'measurement': 'P1 values'}
root@stats:~# pip index versions dsmr-parser
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
dsmr-parser (0.33)
Available versions: 0.33, 0.32, 0.31, 0.30, 0.29, 0.28, 0.27, 0.26, 0.25, 0.24, 0.23, 0.22, 0.21, 0.18, 0.17, 0.16, 0.15, 0.14, 0.13, 0.12, 0.11, 0.10, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1
INSTALLED: 0.33
LATEST: 0.33
root@stats:~#
Ah i see!
It will only send the differences of the gas reading, so it can take up to an hour before it sends the first value to influxdb.
Try adding this to the HOURLY_GAS_METER_READING if-statement to see it:
print(name, value.value)
I've been running it for months now. So if it only updates after a few hours, I should at least have a field key with gas data in them (since it's been running for months)
This is a look at the influxdb structure:
> show field keys from "P1 values"
name: P1 values
fieldKey fieldType
-------- ---------
CURRENT_ELECTRICITY_DELIVERY float
CURRENT_ELECTRICITY_USAGE float
DEVICE_TYPE float
ELECTRICITY_DELIVERED_TARIFF_1 float
ELECTRICITY_DELIVERED_TARIFF_2 float
ELECTRICITY_USED_TARIFF_1 float
ELECTRICITY_USED_TARIFF_2 float
INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE float
INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE float
INSTANTANEOUS_CURRENT_L1 float
>
ah ok..i'll reopen it, maybe someone else knows.
@psy0rz: thanks.
Just a wild guess, could it be that the script trips on the star (*) symbol? There are 22 "fields" in the input but only 10 fields are picked up by the script.
I finally found it. I'm from Belgium using a Fluvius meter. That should be reflected in the script:
serial_reader = SerialReader(
device=config.serial_port,
serial_settings=SERIAL_SETTINGS_V4,
telegram_specification=telegram_specifications.BELGIUM_FLUVIUS # <<<<<======
)
It was telegram_specifications.V4 by default. One needs to look here for all the available options: https://github.com/ndokter/dsmr_parser/blob/master/dsmr_parser/telegram_specifications.py .
Can this perhaps be added to the README? :) and/or maybe added to the config.py?
i'll add it to the readme for now :)
and thanks!
I'm using this script to my content in my home setup. The only thing missing for me is that it does not output gas data. Can someone let me know how I can do this on a Belgian DSMR meter?
This is what a data frame looks like to me: