How to prvent Invalid values from the Devolo Thermostat in the influx DB?

Is it possible to prevent openHAB to save irregular values in the persistence database in this case influx, or even better, is it possible to prevent the “MT02650 Devolo Thermostat (09356)” thermostats to send such irregular wrong values?

Platform information:

  • Hardware: Raspberry PI 3B+
  • OS: Raspbian GNU/Linux 10 (buster)
  • openHAB 2.5.2

For the explanation of the problem please see the following three pictures.

  1. Grafana graph
  2. Event log entries
  3. Query from the database


All three pictures are showing the same. A very high number “2115” instead of the value “21.15” as sensor temperature.

Any idea to prevent this issue?
It is not only the “Esszimmer” thermostat. Others have similar issues.
It is not only the sensor temperature having this issues. It is also the setpointHeating.

Thanks in advance.

Thanks! for providing the hints. If you know what to search for it’s easy :wink:
I’ll need some time figuring out the proxy items solution.
Better solution for me would be to fix the root cause (device providing the wrong values)
instead of creating a workaround. I know from experience that this is not always possible,
so I will try the workaround.

You should work back to that. There’s nothing yet to say that this isn’t some miscommunication problem rather than device.
Your next step might be to look at the actual updates in your events.log, to at least eliminate some persistence problem.

That’s a bit suspicious.

1 Like

Investigation in events.logs has not provided any further new information. But I will continue to investigate in it. In the meantime the idea is to use a transformation. All numbers above 1000 should be divided by 100. For this I need to implement a transformation script.
As of actual investigation the sateDescription / pattern need to be changed

from: “pattern”: “%.1f %unit”
to: “pattern”: “JS(temperatur_transf.js):%.1f %unit%”

“temperatur_transf.js” is the transformation script to correct the temperature if needed.
All my items are configured with Paper UI. All examples I saw are related to items-files.

Is there any way to do this change with RestAPI?
How does the body need to look like for the PUT?
Is there any other way to do this change (e.g. openhab-cli console)

Picture: The “pattern” need to be changed.

What binding is in use, does it support transforms?

The thermostat is a Z-Wave Device and I have the indication that the Z-Wave Binding is supporting transformations.

I didn’t think the zwave binding supports transforms, and that you will be stuck with the proxy item & rule method.
(Binding based transforms are applied at the channel level, “doing stuff” to raw data before it gets to the Item state.)

The “pattern” you are looking at is about display format. That does NOT affect Item state, which is the thing being persisted, which is what you are worried about.

Are you really confident this is just misplaced decimal? It seems an unlikely specific corruption. If other characters might be dropped, all your data is in doubt.

Perhaps we could summon @chris to see if any light could be thrown on that.

OK, my indication that Z-Wave binding is supporting transformation might be wrong.
Is there somewhere an overview about Bindings supporting it and not?
Or is this documented within the Binding information? I’m not really able to find something.

What I can see in event log (logging level INFO) and in the persistence (influx db) is a value 2115. See the pictures. Other values for the item in the DB are around 21.xx. For me this means a misplaced decimal.

I have switched the logging level of Z-Wave to DEBUG. I need to wait about a day to get some more wrong data for some further analyses.

Each binding docs will tell you how to apply user defined transforms, if supported. If it doesn’t tell you about transforms, they’re not supported.

Getting the debug log is good; I doubt this could be a binding issue but let’s make sure. It may be that there is some verification that the binding could do.

After switching on the DEBUG level for Z-Wave I notices two suspicious cases within the temperature registration of Devolo Thermostas.

WC Sensor Temperature

The first was registered a ~5:35 on 14th of March, where the Sensor Temperature went down from around 18,7 C down to 8 C and shortly after it back to the right value of about 18,7 C.

I have collected the events.log and openhab.log for both cases.
Event Log:

2020-03-14 05:30:59.663 [vent.ItemStateChangedEvent] - EsszimmerThermostat_SensorTemperature changed from 19.77 °C to 19.72 °C
2020-03-14 05:30:59.710 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node18' has been updated.
2020-03-14 05:31:01.564 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node18' has been updated.
2020-03-14 05:32:00.004 [vent.ChannelTriggeredEvent] - astro:sun:local:nauticDawn#event triggered START
2020-03-14 05:32:00.008 [vent.ChannelTriggeredEvent] - astro:sun:local:astroDawn#event triggered END
2020-03-14 05:32:03.595 [vent.ItemStateChangedEvent] - iPhoneUweMobileDevice_Online changed from ON to OFF
2020-03-14 05:32:47.304 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-14 05:35:30.408 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SensorTemperature changed from 19.33 °C to 19.34 °C
2020-03-14 05:35:30.449 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-14 05:35:32.100 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 18.74 °C to 0E+1 °C
2020-03-14 05:35:32.133 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-14 05:35:32.388 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 0E+1 °C to 18.74 °C
2020-03-14 05:35:33.874 [vent.ItemStateChangedEvent] - BadThermostat_SensorTemperature changed from 2E+1 °C to 19.96 °C
2020-03-14 05:35:33.923 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node15' has been updated.
2020-03-14 05:37:39.556 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-14 05:38:41.406 [vent.ItemStateChangedEvent] - StudioHaustuerThermostat_SensorTemperature changed from 18.56 °C to 18.53 °C
2020-03-14 05:38:41.446 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node21' has been updated.
2020-03-14 05:39:38.714 [vent.ItemStateChangedEvent] - iPhoneUweMobileDevice_Online changed from OFF to ON
2020-03-14 05:39:39.430 [vent.ItemStateChangedEvent] - iPhoneUweMobileDevice_LastSeen changed from 2020-03-14T05:30:55.748+0100 to 2020-03-14T05:39:38.658+0100
2020-03-14 05:40:23.843 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 18.74 °C to 18.73 °C
2020-03-14 05:40:23.888 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-14 05:40:24.392 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SensorTemperature changed from 19.34 °C to 19.33 °C
2020-03-14 05:40:24.539 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-14 05:40:44.532 [vent.ItemStateChangedEvent] - iPhoneUweMobileDevice_Online changed from ON to OFF
2020-03-14 05:42:04.075 [vent.ItemStateChangedEvent] - StudioTerrasseThermostat_SensorTemperature changed from 18.71 °C to 18.68 °C
2020-03-14 05:42:04.116 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node20' has been updated.
2020-03-14 05:42:31.796 [vent.ItemStateChangedEvent] - FlurEGThermostat_SensorTemperature changed from 18.12 °C to 18.09 °C
2020-03-14 05:42:31.830 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-14 05:45:15.064 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-14 05:45:17.715 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-14 05:47:24.124 [vent.ItemStateChangedEvent] - FlurEGThermostat_SensorTemperature changed from 18.09 °C to 18.1 °C
2020-03-14 05:47:24.174 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-14 05:50:06.292 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 18.73 °C to 18.71 °C
2020-03-14 05:50:06.350 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-14 05:50:11.282 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SensorTemperature changed from 19.33 °C to 19.3 °C
2020-03-14 05:50:11.483 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-14 05:50:42.863 [vent.ItemStateChangedEvent] - LocalWeatherAndForecast_Current_Aussentemperatur changed from 2.24 °C to 2.16 °C

OpenHAB Log:

openhab 20200314 0706 WC.log (108.4 KB)

The uploaded logs include a timeframe which should give good data to see what’s going on.
The WCThermostat is Node 17 in my network.
For me it looks like the exact time with the wrong number is at 05:35:32.072.

Wohnzimmer SetPoint Heating

The 2nd issue happened was 11:08 at the 15th of March. In this case it happened with the Setpoint heating at a time where the setpoint wasn’t chaned manually. At 11:08 a value 2100 C was posted (2.10€+3). Short time later the setpoint changed back to 21 C.

WohnzimmerThermostat is z-Wave Node 19.
Exact time of isse in openhab.log is 11:08:29.233

Event Log:

2020-03-15 11:01:20.908 [vent.ItemStateChangedEvent] - BueroThermostat_SensorTemperature changed from 20.88 °C to 21.37 °C
2020-03-15 11:01:20.960 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node13' has been updated.
2020-03-15 11:01:35.579 [vent.ItemStateChangedEvent] - StudioHaustuerThermostat_SensorTemperature changed from 18.83 °C to 18.84 °C
2020-03-15 11:01:35.622 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node21' has been updated.
2020-03-15 11:03:29.476 [vent.ItemStateChangedEvent] - FlurEGThermostat_SensorTemperature changed from 19.84 °C to 19.72 °C
2020-03-15 11:03:29.517 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-15 11:03:35.279 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SensorTemperature changed from 20.79 °C to 20.78 °C
2020-03-15 11:03:35.310 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-15 11:04:27.666 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 21.52 °C to 21.36 °C
2020-03-15 11:04:27.830 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-15 11:08:22.090 [vent.ItemStateChangedEvent] - FlurEGThermostat_SensorTemperature changed from 19.72 °C to 19.65 °C
2020-03-15 11:08:22.163 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-15 11:08:29.293 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SetpointHeating changed from 21 °C to 2.10E+3 °C
2020-03-15 11:08:29.370 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-15 11:08:42.074 [vent.ItemStateChangedEvent] - EsszimmerThermostat_SensorTemperature changed from 20.74 °C to 20.75 °C
2020-03-15 11:08:42.113 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node18' has been updated.
2020-03-15 11:09:19.579 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 21.36 °C to 21.13 °C
2020-03-15 11:09:19.632 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-15 11:11:56.985 [vent.ItemStateChangedEvent] - HaustuerDoorSensor_DoorSensor changed from CLOSED to OPEN
2020-03-15 11:13:15.483 [vent.ItemStateChangedEvent] - FlurEGThermostat_SensorTemperature changed from 19.65 °C to 19.28 °C
2020-03-15 11:13:15.511 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node16' has been updated.
2020-03-15 11:13:23.296 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SetpointHeating changed from 2.10E+3 °C to 21 °C
2020-03-15 11:13:23.327 [vent.ItemStateChangedEvent] - WohnzimmerThermostat_SensorTemperature changed from 20.78 °C to 20.7 °C
2020-03-15 11:13:23.367 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node19' has been updated.
2020-03-15 11:13:33.222 [vent.ItemStateChangedEvent] - StudioVentilator_ElectricMeterKWh changed from 28.67 to 28.69
2020-03-15 11:13:43.504 [vent.ItemStateChangedEvent] - BueroDR_CurrentTemperature changed from 23.0 °C to 22.5 °C
2020-03-15 11:14:11.507 [vent.ItemStateChangedEvent] - WCThermostat_SensorTemperature changed from 21.13 °C to 20.98 °C
2020-03-15 11:14:11.547 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:16e5f6eb994:node17' has been updated.
2020-03-15 11:14:12.570 [vent.ItemStateChangedEvent] - HaustuerDoorSensor_DoorSensor changed from OPEN to CLOSED

OpenHAB Log:
openhab 20200315 1229 Wohnzimmer.log (54.7 KB)

This information / date hopefully helps to identify if the issue is caused by the Z-Wave Binding or wrong values permitted by the device.