Smartmeter binding ignores refresh property

Hi all,

I finally have time to fix some smaller issues in my setup.

I’ve been using the SmartMeter binding for quite some time now. I use an USB IR reader and the binding with the following configuration:

smartmeter:meter:Stromzaehler "Stromzaehler" [
  port="/dev/ttyUSB0",
  mode="D",
  baudrate=9600,
  refresh=30
] {
  Type 1-0_1-8-0_255 : 1-0_1-8-0_255 // Zaehlerzustand zu +A, tariflos
  Type 1-0_2-8-0_255 : 1-0_2-8-0_255 // Zaehlerzustand zu -A, tariflos

  Type 1-0_16-7-0_255 : 1-0_16-7-0_255 // Leistung, Gesamt
}

It works, but the binding ignores the refresh time. I receive data every second which makes it hard to read the openHAB logs with all the meter values. Any idea how to make the binding respect the refresh time?

Thank you!

Sascha

This is my configuration from UI thing creation:

Konfiguration:
mode: SML
refresh: 60
baudrate: AUTO
conformity: NONE
port: /dev/ttyUSB0
baudrateChangeDelay: 0

Thank you for your reply.

I guess we have different meters. Changing the mode from D to SML leads to no values anymore. :frowning_face:

You can use the round profile or the state filter profile using a delta configuration to reduce how often the Item updates.

Or learn how to use your logs more dynamically (e.g. How to watch and look through logging).

You can turn off logging of Item changes entirely (only for all Items) by changing the logging level for openhab.event.ItemStateChangedEvent to ERROR.

You can turn off events.log entirely by setting the logging level for openhab.event to ERROR and removing/commenting out all the openhab.event.X lines in log4j2.xml.

You can set up a REGEX filter in the logging config to ignore this Item’s changes which will only remove this Item’s changes from events.log. Log filtering in OH 3 - #3 by markus7017

Hi Rich,

sorry for the late reply. I’m fine with the logging.

It’s more like - is the ignored refresh attribute a bug that should be reported?

I odn’t know this binding so I don’t know. I don’t even know if that value is in seconds or milliseconds.