"every" does not work
baiti opened this issue · 17 comments
I am trying to limit the frequency at which messages are sent to the MQTT broker .. no success. sml2mqtt sends messages 1/s no matter what I do. I have:
general:
Wh in kWh: true # Automatically convert Wh to kWh
republish after: 30 # Republish automatically after this time (if no other every filter is configured)
and in the measurements:
values:
0100100700ff:
mqtt:
topic: power
filters:
- every: 30
0100010800ff:
mqtt:
topic: energy
filters:
- every: 30
Further, I am unable to remap the topic names. The above, topic: power
does not do anything, The topics always look like this:
sml2mqtt//dev/ttyUSB0/0100010800ff 237.3668
sml2mqtt//dev/ttyUSB0/0100100700ff 176
I can hardly believe that these are programming bugs. Much more likely it is my lack of python skills understanding the source code and config meachanism. What is wrong with my config?
Forgot to mention: I tried all kinds of values in perc: xx
and diff: xx
too. Nothing made a difference. Messages are sent to the broker once per second.
You can test your configuration with the -a
command line switch.
There you should see your configured filters.
If you don't see them it might be another issue.
Do you see your entries in the output?
That is what I did in the first place. Here you go:
/opt/sml2mqtt# venv/bin/sml2mqtt -c config.yml -a
[2022-05-02 14:00:12,819] [sml ] INFO | Starting V1.0.1
[2022-05-02 14:00:12,853] [sml.mqtt.pub ] INFO | sml2mqtt/status: ONLINE (QOS: 0, retain: False)
[2022-05-02 14:00:12,935] [sml.ttyUSB0.status ] INFO | PORT_OPENED
[2022-05-02 14:00:13,362] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,363] [sml.ttyUSB0 ] INFO | Received Frame
[2022-05-02 14:00:13,365] [sml.ttyUSB0 ] INFO | -> b'7605004bf37b620062007263010176010105001951290b0a0149534b0005 020de27262016500194f586201631084007605004bf37c620062007263070177010b0a0149534b0005020de2070100620affff7262016500194f5875770701006 0320101010101010449534b0177070100600100ff010101010b0a0149534b0005020de20177070100010800ff65001c010401621e52ff6500247bc10177070100 020800ff0101621e52ff62000177070100100700ff0101621b520053080d01010163fdc0007605004bf37d620062007263020171016357f100'
[2022-05-02 14:00:13,367] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,377] [sml.ttyUSB0 ] INFO | <SmlMessage>
[2022-05-02 14:00:13,378] [sml.ttyUSB0 ] INFO | transaction_id: 004bf37b
[2022-05-02 14:00:13,380] [sml.ttyUSB0 ] INFO | group_no : 0
[2022-05-02 14:00:13,382] [sml.ttyUSB0 ] INFO | abort_on_error: 0
[2022-05-02 14:00:13,384] [sml.ttyUSB0 ] INFO | message_body <SmlOpenResponse>
[2022-05-02 14:00:13,385] [sml.ttyUSB0 ] INFO | codepage : None
[2022-05-02 14:00:13,387] [sml.ttyUSB0 ] INFO | client_id : None
[2022-05-02 14:00:13,389] [sml.ttyUSB0 ] INFO | req_file_id: 00195129
[2022-05-02 14:00:13,391] [sml.ttyUSB0 ] INFO | server_id : 0a0149534b0005020de2
[2022-05-02 14:00:13,392] [sml.ttyUSB0 ] INFO | ref_time : 1658712
[2022-05-02 14:00:13,394] [sml.ttyUSB0 ] INFO | sml_version: 1
[2022-05-02 14:00:13,395] [sml.ttyUSB0 ] INFO | crc16 : 4228
[2022-05-02 14:00:13,400] [sml.ttyUSB0 ] INFO | <SmlMessage>
[2022-05-02 14:00:13,401] [sml.ttyUSB0 ] INFO | transaction_id: 004bf37c
[2022-05-02 14:00:13,403] [sml.ttyUSB0 ] INFO | group_no : 0
[2022-05-02 14:00:13,405] [sml.ttyUSB0 ] INFO | abort_on_error: 0
[2022-05-02 14:00:13,407] [sml.ttyUSB0 ] INFO | message_body <SmlGetListResponse>
[2022-05-02 14:00:13,409] [sml.ttyUSB0 ] INFO | client_id : None
[2022-05-02 14:00:13,410] [sml.ttyUSB0 ] INFO | sever_id : 0a0149534b0005020de2
[2022-05-02 14:00:13,412] [sml.ttyUSB0 ] INFO | list_name : 0100620affff
[2022-05-02 14:00:13,413] [sml.ttyUSB0 ] INFO | act_sensor_time : 1658712
[2022-05-02 14:00:13,415] [sml.ttyUSB0 ] INFO | val_list:
[2022-05-02 14:00:13,417] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-02 14:00:13,419] [sml.ttyUSB0 ] INFO | obis : 010060320101 (1-0:96.50.1*1)
[2022-05-02 14:00:13,420] [sml.ttyUSB0 ] INFO | status : None
[2022-05-02 14:00:13,422] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-02 14:00:13,423] [sml.ttyUSB0 ] INFO | unit : None
[2022-05-02 14:00:13,425] [sml.ttyUSB0 ] INFO | scaler : None
[2022-05-02 14:00:13,427] [sml.ttyUSB0 ] INFO | value : ISK
[2022-05-02 14:00:13,428] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-02 14:00:13,430] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-02 14:00:13,431] [sml.ttyUSB0 ] INFO | obis : 0100600100ff (1-0:96.1.0*255)
[2022-05-02 14:00:13,433] [sml.ttyUSB0 ] INFO | status : None
[2022-05-02 14:00:13,435] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-02 14:00:13,437] [sml.ttyUSB0 ] INFO | unit : None
[2022-05-02 14:00:13,438] [sml.ttyUSB0 ] INFO | scaler : None
[2022-05-02 14:00:13,440] [sml.ttyUSB0 ] INFO | value : 0a0149534b0005020de2
[2022-05-02 14:00:13,441] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-02 14:00:13,443] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-02 14:00:13,445] [sml.ttyUSB0 ] INFO | obis : 0100010800ff (1-0:1.8.0*255)
[2022-05-02 14:00:13,446] [sml.ttyUSB0 ] INFO | status : 1835268
[2022-05-02 14:00:13,448] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-02 14:00:13,450] [sml.ttyUSB0 ] INFO | unit : 30
[2022-05-02 14:00:13,451] [sml.ttyUSB0 ] INFO | scaler : -1
[2022-05-02 14:00:13,453] [sml.ttyUSB0 ] INFO | value : 2390977
[2022-05-02 14:00:13,455] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-02 14:00:13,456] [sml.ttyUSB0 ] INFO | -> 239097.7Wh (Zählerstand Total)
[2022-05-02 14:00:13,458] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-02 14:00:13,460] [sml.ttyUSB0 ] INFO | obis : 0100020800ff (1-0:2.8.0*255)
[2022-05-02 14:00:13,462] [sml.ttyUSB0 ] INFO | status : None
[2022-05-02 14:00:13,463] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-02 14:00:13,465] [sml.ttyUSB0 ] INFO | unit : 30
[2022-05-02 14:00:13,467] [sml.ttyUSB0 ] INFO | scaler : -1
[2022-05-02 14:00:13,468] [sml.ttyUSB0 ] INFO | value : 0
[2022-05-02 14:00:13,469] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-02 14:00:13,471] [sml.ttyUSB0 ] INFO | -> 0.0Wh
[2022-05-02 14:00:13,472] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-02 14:00:13,473] [sml.ttyUSB0 ] INFO | obis : 0100100700ff (1-0:16.7.0*255)
[2022-05-02 14:00:13,474] [sml.ttyUSB0 ] INFO | status : None
[2022-05-02 14:00:13,475] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-02 14:00:13,476] [sml.ttyUSB0 ] INFO | unit : 27
[2022-05-02 14:00:13,478] [sml.ttyUSB0 ] INFO | scaler : 0
[2022-05-02 14:00:13,479] [sml.ttyUSB0 ] INFO | value : 2061
[2022-05-02 14:00:13,480] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-02 14:00:13,481] [sml.ttyUSB0 ] INFO | -> 2061W (aktuelle Wirkleistung)
[2022-05-02 14:00:13,482] [sml.ttyUSB0 ] INFO | list_signature : None
[2022-05-02 14:00:13,483] [sml.ttyUSB0 ] INFO | act_gateway_time: None
[2022-05-02 14:00:13,485] [sml.ttyUSB0 ] INFO | crc16 : 64960
[2022-05-02 14:00:13,488] [sml.ttyUSB0 ] INFO | <SmlMessage>
[2022-05-02 14:00:13,489] [sml.ttyUSB0 ] INFO | transaction_id: 004bf37d
[2022-05-02 14:00:13,491] [sml.ttyUSB0 ] INFO | group_no : 0
[2022-05-02 14:00:13,493] [sml.ttyUSB0 ] INFO | abort_on_error: 0
[2022-05-02 14:00:13,495] [sml.ttyUSB0 ] INFO | message_body <SmlCloseResponse>
[2022-05-02 14:00:13,497] [sml.ttyUSB0 ] INFO | global_signature: None
[2022-05-02 14:00:13,498] [sml.ttyUSB0 ] INFO | crc16 : 22513
[2022-05-02 14:00:13,500] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,505] [sml.values ] INFO | Creating default value handler for /dev/ttyUSB0/010060320101
[2022-05-02 14:00:13,507] [sml.mqtt.pub ] INFO | sml2mqtt//dev/ttyUSB0/010060320101: ISK (QOS: 0, retain: False)
[2022-05-02 14:00:13,509] [sml.values ] INFO | Creating default value handler for /dev/ttyUSB0/0100600100ff
[2022-05-02 14:00:13,512] [sml.mqtt.pub ] INFO | sml2mqtt//dev/ttyUSB0/0100600100ff: 0a0149534b0005020de2 (QOS: 0, retain: False)
[2022-05-02 14:00:13,514] [sml.values ] INFO | Creating default value handler for /dev/ttyUSB0/0100010800ff
[2022-05-02 14:00:13,516] [sml.mqtt.pub ] INFO | sml2mqtt//dev/ttyUSB0/0100010800ff: 239.0977 (QOS: 0, retain: Fals e)
[2022-05-02 14:00:13,518] [sml.values ] INFO | Creating default value handler for /dev/ttyUSB0/0100100700ff
[2022-05-02 14:00:13,521] [sml.mqtt.pub ] INFO | sml2mqtt//dev/ttyUSB0/0100100700ff: 2061 (QOS: 0, retain: False)
[2022-05-02 14:00:13,523] [sml.ttyUSB0.status ] INFO | OK
[2022-05-02 14:00:13,525] [sml.mqtt.pub ] INFO | sml2mqtt//dev/ttyUSB0/status: OK (QOS: 0, retain: False)
[2022-05-02 14:00:13,527] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,529] [sml.ttyUSB0 ] INFO | sml2mqtt//dev/ttyUSB0/010060320101 (010060320101):
[2022-05-02 14:00:13,530] [sml.ttyUSB0 ] INFO | raw value: ISK
[2022-05-02 14:00:13,532] [sml.ttyUSB0 ] INFO | pub value: ISK
[2022-05-02 14:00:13,534] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 14:00:13,536] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 14:00:13,538] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-02 14:00:13,539] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,541] [sml.ttyUSB0 ] INFO | sml2mqtt//dev/ttyUSB0/0100600100ff (0100600100ff):
[2022-05-02 14:00:13,543] [sml.ttyUSB0 ] INFO | raw value: 0a0149534b0005020de2
[2022-05-02 14:00:13,545] [sml.ttyUSB0 ] INFO | pub value: 0a0149534b0005020de2
[2022-05-02 14:00:13,546] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 14:00:13,547] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 14:00:13,548] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-02 14:00:13,548] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,549] [sml.ttyUSB0 ] INFO | sml2mqtt//dev/ttyUSB0/0100010800ff (0100010800ff):
[2022-05-02 14:00:13,550] [sml.ttyUSB0 ] INFO | raw value: 239.0977
[2022-05-02 14:00:13,551] [sml.ttyUSB0 ] INFO | pub value: 239.0977
[2022-05-02 14:00:13,552] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 14:00:13,553] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 14:00:13,554] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-02 14:00:13,555] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,556] [sml.ttyUSB0 ] INFO | sml2mqtt//dev/ttyUSB0/0100100700ff (0100100700ff):
[2022-05-02 14:00:13,557] [sml.ttyUSB0 ] INFO | raw value: 2061
[2022-05-02 14:00:13,557] [sml.ttyUSB0 ] INFO | pub value: 2061
[2022-05-02 14:00:13,558] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 14:00:13,559] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 14:00:13,560] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-02 14:00:13,561] [sml.ttyUSB0 ] INFO |
[2022-05-02 14:00:13,562] [sml.ttyUSB0.status ] INFO | SHUTDOWN
You can see that the topic rewrite didn't work either. And, the exclusion of messages neither. The skip
actually didn't skip anything. For reference, my config:
/opt/sml2mqtt# vi config.yml
logging:
level: INFO # Log level
file: sml2mqtt.log # Log file path (absolute or relative to config file)
mqtt:
connection:
client id: sml2mqtt
host: localhost
port: 1883
user: ''
password: ''
tls: false
tls insecure: false
defaults:
qos: 0
retain: false
last will:
topic: status
general:
Wh in kWh: true # Automatically convert Wh to kWh
republish after: 30 # Republish automatically after this time (if no other every filter is configured)
ports:
- url: /dev/ttyUSB0
timeout: 3
devices:
# Device configuration by OBIS value 0100000009ff or by url if the device does not report OBIS 0100000009ff
11111111111111111111:
mqtt:
topic: xxxx
skip:
- 010060320101
- 0100600100ff
values:
0100100700ff:
mqtt:
topic: power
filters:
- every: 30
0100010800ff:
mqtt:
topic: energy
filters:
- every: 30
Could you please replace
# Device configuration by OBIS value 0100000009ff or by url if the device does not report OBIS 0100000009ff
11111111111111111111:
with
/dev/ttyUSB0
since your device does not seem to report 0100000009ff
That made indeed a difference:
[2022-05-02 18:26:18,555] [sml.ttyUSB0 ] INFO |
[2022-05-02 18:26:18,556] [sml.ttyUSB0 ] INFO | sml2mqtt/enbw/010060320101 (010060320101):
[2022-05-02 18:26:18,557] [sml.ttyUSB0 ] INFO | raw value: ISK
[2022-05-02 18:26:18,558] [sml.ttyUSB0 ] INFO | pub value: ISK
[2022-05-02 18:26:18,559] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 18:26:18,560] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 18:26:18,561] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-02 18:26:18,561] [sml.ttyUSB0 ] INFO |
[2022-05-02 18:26:18,562] [sml.ttyUSB0 ] INFO | sml2mqtt/enbw/energy (0100010800ff):
[2022-05-02 18:26:18,563] [sml.ttyUSB0 ] INFO | raw value: 243.0863
[2022-05-02 18:26:18,564] [sml.ttyUSB0 ] INFO | pub value: 243.0863
[2022-05-02 18:26:18,565] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 18:26:18,566] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 18:26:18,567] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-02 18:26:18,567] [sml.ttyUSB0 ] INFO |
[2022-05-02 18:26:18,568] [sml.ttyUSB0 ] INFO | sml2mqtt/enbw/power (0100100700ff):
[2022-05-02 18:26:18,569] [sml.ttyUSB0 ] INFO | raw value: 232
[2022-05-02 18:26:18,570] [sml.ttyUSB0 ] INFO | pub value: 232
[2022-05-02 18:26:18,571] [sml.ttyUSB0 ] INFO | filters:
[2022-05-02 18:26:18,571] [sml.ttyUSB0 ] INFO | - <Every: 30>
[2022-05-02 18:26:18,572] [sml.ttyUSB0 ] INFO | - <OnChange>
However, the:
skip:
- 010060320101
- 0100600100ff
is not honored, those values still make it to the broker. And still, the messages come once per second.
update:
- diff: 1000
- every: 10
actually seems to work now. Since there is no diff
of 1000 in this time window, the every: 10
does the job for me.
So what remains is the skip
not being honored. This is howevcer ont a problem since I can make telegraf
ignoring it such that it doesn't pollute my influx.
Thx much for your help.
Could you please show me the output of -a
after your configuration change?
Maybe it's a bug but currently I think it should be working.
[2022-05-04 09:30:43,115] [sml ] INFO | Starting V1.0.1
[2022-05-04 09:30:43,149] [sml.mqtt.pub ] INFO | sml2mqtt/status: ONLINE (QOS: 0, retain: False)
[2022-05-04 09:30:43,230] [sml.ttyUSB0.status ] INFO | PORT_OPENED
[2022-05-04 09:30:44,507] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,509] [sml.ttyUSB0 ] INFO | Received Frame
[2022-05-04 09:30:44,510] [sml.ttyUSB0 ] INFO | -> b'760500531efa620062007263010176010105001bb4fe0b0a0149534b0005020de272620165001bb32e620163a71400760500531efb620062007263070177010b0a0149534b0005020de2070100620affff72620165001bb32e757707010060320101010101010449534b0177070100600100ff010101010b0a0149534b0005020de20177070100010800ff65001c010401621e52ff650026bea90177070100020800ff0101621e52ff62000177070100100700ff0101621b52005301100101016350ba00760500531efc6200620072630201710163ba1900'
[2022-05-04 09:30:44,511] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,518] [sml.ttyUSB0 ] INFO | <SmlMessage>
[2022-05-04 09:30:44,520] [sml.ttyUSB0 ] INFO | transaction_id: 00531efa
[2022-05-04 09:30:44,521] [sml.ttyUSB0 ] INFO | group_no : 0
[2022-05-04 09:30:44,521] [sml.ttyUSB0 ] INFO | abort_on_error: 0
[2022-05-04 09:30:44,522] [sml.ttyUSB0 ] INFO | message_body <SmlOpenResponse>
[2022-05-04 09:30:44,523] [sml.ttyUSB0 ] INFO | codepage : None
[2022-05-04 09:30:44,524] [sml.ttyUSB0 ] INFO | client_id : None
[2022-05-04 09:30:44,525] [sml.ttyUSB0 ] INFO | req_file_id: 001bb4fe
[2022-05-04 09:30:44,526] [sml.ttyUSB0 ] INFO | server_id : 0a0149534b0005020de2
[2022-05-04 09:30:44,527] [sml.ttyUSB0 ] INFO | ref_time : 1815342
[2022-05-04 09:30:44,528] [sml.ttyUSB0 ] INFO | sml_version: 1
[2022-05-04 09:30:44,529] [sml.ttyUSB0 ] INFO | crc16 : 42772
[2022-05-04 09:30:44,532] [sml.ttyUSB0 ] INFO | <SmlMessage>
[2022-05-04 09:30:44,533] [sml.ttyUSB0 ] INFO | transaction_id: 00531efb
[2022-05-04 09:30:44,534] [sml.ttyUSB0 ] INFO | group_no : 0
[2022-05-04 09:30:44,534] [sml.ttyUSB0 ] INFO | abort_on_error: 0
[2022-05-04 09:30:44,536] [sml.ttyUSB0 ] INFO | message_body <SmlGetListResponse>
[2022-05-04 09:30:44,536] [sml.ttyUSB0 ] INFO | client_id : None
[2022-05-04 09:30:44,537] [sml.ttyUSB0 ] INFO | sever_id : 0a0149534b0005020de2
[2022-05-04 09:30:44,538] [sml.ttyUSB0 ] INFO | list_name : 0100620affff
[2022-05-04 09:30:44,539] [sml.ttyUSB0 ] INFO | act_sensor_time : 1815342
[2022-05-04 09:30:44,540] [sml.ttyUSB0 ] INFO | val_list:
[2022-05-04 09:30:44,541] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-04 09:30:44,542] [sml.ttyUSB0 ] INFO | obis : 010060320101 (1-0:96.50.1*1)
[2022-05-04 09:30:44,543] [sml.ttyUSB0 ] INFO | status : None
[2022-05-04 09:30:44,543] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-04 09:30:44,544] [sml.ttyUSB0 ] INFO | unit : None
[2022-05-04 09:30:44,545] [sml.ttyUSB0 ] INFO | scaler : None
[2022-05-04 09:30:44,546] [sml.ttyUSB0 ] INFO | value : ISK
[2022-05-04 09:30:44,547] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-04 09:30:44,548] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-04 09:30:44,549] [sml.ttyUSB0 ] INFO | obis : 0100600100ff (1-0:96.1.0*255)
[2022-05-04 09:30:44,550] [sml.ttyUSB0 ] INFO | status : None
[2022-05-04 09:30:44,551] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-04 09:30:44,552] [sml.ttyUSB0 ] INFO | unit : None
[2022-05-04 09:30:44,552] [sml.ttyUSB0 ] INFO | scaler : None
[2022-05-04 09:30:44,553] [sml.ttyUSB0 ] INFO | value : 0a0149534b0005020de2
[2022-05-04 09:30:44,554] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-04 09:30:44,555] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-04 09:30:44,556] [sml.ttyUSB0 ] INFO | obis : 0100010800ff (1-0:1.8.0*255)
[2022-05-04 09:30:44,556] [sml.ttyUSB0 ] INFO | status : 1835268
[2022-05-04 09:30:44,557] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-04 09:30:44,558] [sml.ttyUSB0 ] INFO | unit : 30
[2022-05-04 09:30:44,559] [sml.ttyUSB0 ] INFO | scaler : -1
[2022-05-04 09:30:44,560] [sml.ttyUSB0 ] INFO | value : 2539177
[2022-05-04 09:30:44,560] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-04 09:30:44,561] [sml.ttyUSB0 ] INFO | -> 253917.7Wh (Zählerstand Total)
[2022-05-04 09:30:44,562] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-04 09:30:44,563] [sml.ttyUSB0 ] INFO | obis : 0100020800ff (1-0:2.8.0*255)
[2022-05-04 09:30:44,563] [sml.ttyUSB0 ] INFO | status : None
[2022-05-04 09:30:44,564] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-04 09:30:44,565] [sml.ttyUSB0 ] INFO | unit : 30
[2022-05-04 09:30:44,566] [sml.ttyUSB0 ] INFO | scaler : -1
[2022-05-04 09:30:44,566] [sml.ttyUSB0 ] INFO | value : 0
[2022-05-04 09:30:44,567] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-04 09:30:44,568] [sml.ttyUSB0 ] INFO | -> 0.0Wh
[2022-05-04 09:30:44,569] [sml.ttyUSB0 ] INFO | <SmlListEntry>
[2022-05-04 09:30:44,569] [sml.ttyUSB0 ] INFO | obis : 0100100700ff (1-0:16.7.0*255)
[2022-05-04 09:30:44,570] [sml.ttyUSB0 ] INFO | status : None
[2022-05-04 09:30:44,571] [sml.ttyUSB0 ] INFO | val_time : None
[2022-05-04 09:30:44,572] [sml.ttyUSB0 ] INFO | unit : 27
[2022-05-04 09:30:44,572] [sml.ttyUSB0 ] INFO | scaler : 0
[2022-05-04 09:30:44,573] [sml.ttyUSB0 ] INFO | value : 272
[2022-05-04 09:30:44,574] [sml.ttyUSB0 ] INFO | value_signature: None
[2022-05-04 09:30:44,575] [sml.ttyUSB0 ] INFO | -> 272W (aktuelle Wirkleistung)
[2022-05-04 09:30:44,575] [sml.ttyUSB0 ] INFO | list_signature : None
[2022-05-04 09:30:44,576] [sml.ttyUSB0 ] INFO | act_gateway_time: None
[2022-05-04 09:30:44,577] [sml.ttyUSB0 ] INFO | crc16 : 20666
[2022-05-04 09:30:44,578] [sml.ttyUSB0 ] INFO | <SmlMessage>
[2022-05-04 09:30:44,579] [sml.ttyUSB0 ] INFO | transaction_id: 00531efc
[2022-05-04 09:30:44,580] [sml.ttyUSB0 ] INFO | group_no : 0
[2022-05-04 09:30:44,580] [sml.ttyUSB0 ] INFO | abort_on_error: 0
[2022-05-04 09:30:44,581] [sml.ttyUSB0 ] INFO | message_body <SmlCloseResponse>
[2022-05-04 09:30:44,582] [sml.ttyUSB0 ] INFO | global_signature: None
[2022-05-04 09:30:44,583] [sml.ttyUSB0 ] INFO | crc16 : 47641
[2022-05-04 09:30:44,583] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,587] [sml.values ] INFO | Creating default value handler for /dev/ttyUSB0/010060320101
[2022-05-04 09:30:44,589] [sml.mqtt.pub ] INFO | sml2mqtt/xxxx/010060320101: ISK (QOS: 0, retain: False)
[2022-05-04 09:30:44,590] [sml.values ] INFO | Creating value handler from config for /dev/ttyUSB0/0100010800ff
[2022-05-04 09:30:44,591] [sml.mqtt.pub ] INFO | sml2mqtt/xxxx/energy: 253.9177 (QOS: 0, retain: False)
[2022-05-04 09:30:44,592] [sml.values ] INFO | Creating value handler from config for /dev/ttyUSB0/0100100700ff
[2022-05-04 09:30:44,593] [sml.mqtt.pub ] INFO | sml2mqtt/xxxx/power: 272 (QOS: 0, retain: False)
[2022-05-04 09:30:44,594] [sml.ttyUSB0.status ] INFO | OK
[2022-05-04 09:30:44,595] [sml.mqtt.pub ] INFO | sml2mqtt/xxxx/status: OK (QOS: 0, retain: False)
[2022-05-04 09:30:44,596] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,597] [sml.ttyUSB0 ] INFO | sml2mqtt/xxxx/010060320101 (010060320101):
[2022-05-04 09:30:44,598] [sml.ttyUSB0 ] INFO | raw value: ISK
[2022-05-04 09:30:44,599] [sml.ttyUSB0 ] INFO | pub value: ISK
[2022-05-04 09:30:44,600] [sml.ttyUSB0 ] INFO | filters:
[2022-05-04 09:30:44,600] [sml.ttyUSB0 ] INFO | - <Every: 7200>
[2022-05-04 09:30:44,601] [sml.ttyUSB0 ] INFO | - <OnChange>
[2022-05-04 09:30:44,602] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,603] [sml.ttyUSB0 ] INFO | sml2mqtt/xxxx/energy (0100010800ff):
[2022-05-04 09:30:44,604] [sml.ttyUSB0 ] INFO | raw value: 253.9177
[2022-05-04 09:30:44,604] [sml.ttyUSB0 ] INFO | pub value: 253.9177
[2022-05-04 09:30:44,605] [sml.ttyUSB0 ] INFO | filters:
[2022-05-04 09:30:44,606] [sml.ttyUSB0 ] INFO | - <AbsDiff: 10>
[2022-05-04 09:30:44,607] [sml.ttyUSB0 ] INFO | - <Every: 60>
[2022-05-04 09:30:44,607] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,608] [sml.ttyUSB0 ] INFO | sml2mqtt/xxxx/power (0100100700ff):
[2022-05-04 09:30:44,609] [sml.ttyUSB0 ] INFO | raw value: 272
[2022-05-04 09:30:44,610] [sml.ttyUSB0 ] INFO | pub value: 272
[2022-05-04 09:30:44,611] [sml.ttyUSB0 ] INFO | filters:
[2022-05-04 09:30:44,611] [sml.ttyUSB0 ] INFO | - <AbsDiff: 200>
[2022-05-04 09:30:44,612] [sml.ttyUSB0 ] INFO | - <Every: 10>
[2022-05-04 09:30:44,613] [sml.ttyUSB0 ] INFO |
[2022-05-04 09:30:44,614] [sml.ttyUSB0.status ] INFO | SHUTDOWN
[2022-05-04 09:30:44,614] [sml.mqtt.pub ] INFO | sml2mqtt/xxxx/status: SHUTDOWN (QOS: 0, retain: False)
[2022-05-04 09:30:44,616] [sml.serial ] INFO | Port /dev/ttyUSB0 was closed
[2022-05-04 09:30:44,618] [sml.ttyUSB0.status ] INFO | PORT_CLOSED
[2022-05-04 09:30:44,618] [sml.mqtt.pub ] INFO | sml2mqtt/xxxx/status: PORT_CLOSED (QOS: 0, retain: False)
Shutting down ...
[2022-05-04 09:30:44,886] [sml ] INFO | Shutting down ...
As far as I can see the skip
is properly honored.
Do you get the values even though it's not printed with a
?
It's about this sml2mqtt/xxxx/010060320101
it is printed in the -a
and it is sent to the broker. Even though I have:
skip:
- 010060320101
- 0100600100ff
Could you post your config under devices:
so I can try and reproduce the issue?
devices:
/dev/ttyUSB0:
mqtt:
topic: xxxx
skip:
- 010060320101
- 0100600100ff
values:
0100100700ff:
mqtt:
topic: power
filters:
- diff: 200
- every: 10
0100010800ff:
mqtt:
topic: energy
filters:
- diff: 10
- every: 60
Hm - If I run this locally the skip
entry gets respected properly.
Could you wrap the skip part with '' and see if that helps?
skip:
- '010060320101'
1.1.0 will issue an error if these entries have the wrong datatype.
Can you check and report back if the problem is fixed?
putting them in quotes actually fixes it! Even the yml parser in my vim
renders those values in different colors:
I am not too much into yml I am essentially using copy / paste on it.
Since it is now working with V1.0.1, would I even see a difference after updating to V1.1.0? If you want me to test something specifically, let me know and I will do and report back.
Since it is now working with V1.0.1, would I even see a difference after updating to V1.1.0?
No, it'll just issue an error message if you configure it as a number and not as a string.
That way the next guy doesn't face the same issue.
If all you're issues are resolved and you don't have any more questions you can close this issue. 😄
Thx much for your help.