Not including error in events.log

Tags: #<Tag:0x00007f616d874490> #<Tag:0x00007f616d8743c8>

I have a energy meter that send out json messages over MQTT. It sends out voltage and amps of all phases every 10 seconds and the total kWh every hour. But because all the vaules are sent out on the same MQTT topic i get an error in Openhab every time the total kWh value is not sent.

2019-04-13 17:43:42.240 [WARN ] [l.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path ‘$.data.caie’ in ‘{“dn”:“espams”,“up”:89607256,“data”:{“ls”:25,“lvi”:“Kamstrup_V0001”,“mid”:“123456789”,“mt”:“6841121BN243101040”,“t”:1555181020,“aip”:5495,“aep”:0,“rip”:0,“rep”:46,“al1”:11.61,“al2”:20.77,“al3”:13.11,“vl1”:232,“vl2”:232,“vl3”:230}}’

2019-04-13 17:43:42.248 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload ‘{“dn”:“espams”,“up”:89607256,“data”:{“ls”:25,“lvi”:“Kamstrup_V0001”,“mid”:“123456789”,“mt”:“6841121BN243101040”,“t”:1555181020,“aip”:5495,“aep”:0,“rip”:0,“rep”:46,“al1”:11.61,“al2”:20.77,“al3”:13.11,“vl1”:232,“vl2”:232,“vl3”:230}}’ not supported by type ‘NumberValue’

In this post there is someone having a similar error and @rlkoshak wrote " I don’t believe you can eliminate this error log statement without turning off logging for transformations entirely."

Can i edit the logging so the error i am getting is not included in my events.log? Is this done in the “org.ops4j.pax.logging.cfg” ? How do i go about doing this?

Thanks for any help :slight_smile:

You can always try it and see.:wink:

Here’s a link to show you how.

Welcome @elias.haaland.

You are not getting an error, it is just a warning.
Personally I would not suppress warn messages!

Are you able to control the output of your devices (I.e. can you change the content of the mqtt messages)?
Another way to prevent such messages would be something like:

  • Remove the channel linking from from the kwH item.
  • Create a rule that is triggered when one of the other item that get its state updated from that mqtt messages. In the rule postUpdate the new kwH value only if it is contained in the mqtt message.

Thank you both for your replies :slight_smile:

The MQTT message is sent from an ESP8266, so it is possible to edit the arduino sketch to split it into two topics, but i’m not very skilled with using the arduino IDE. That would be the best way to do it i suppose, so i will try to do that. But if I cant get that to work will create a rule as you suggested @opus :slight_smile:

1 Like

When you get some free time, google using Atom, Sublime, or even VSCode to write/create/edit your scripts.:wink: Way more intuitive than using the Arduino IDE.

Also, check out flashing EspEasy or Tasmota firmware for times when you don’t want to write a custom script.

1 Like