Is anyone using the Open Energy Monitor (emonPi)

Eureka!

I had my suspicions about my items file in that it is rather long (95 lines, 7,144 bytes) and so decided to put the GridPower item further up the file - and it started working! :blush:

Thatā€™s obviously a good thing, but doubtless some other item at the bottom is now suffering :confused:

Thanks to you both for your help!

1 Like

Thatā€™s an interesting one - what machine is it running on?
I have 124 items plus separate comment lines on a Pi2, and they all seem to work

Oops deleted the post by mistake. RPi 1 model B

Yeah I would be surprised if that made any difference. Theyā€™re only small text files, very efficient at storing characters. Itā€™s not like itā€™s a Word .doc!

AND Iā€™m running it all on the same box - EMONCMS has 44 feeds too. I keep thinking this little board will run out of power but it hasnā€™t so far :smile:

Yes Iā€™m down in New Zealand, GMT +12 and heading into summer

1 Like

Another Kiwi - nice to meet ya Kevin!

1 Like

Hey guysā€¦ reading your posts from yesterday, Iā€™d suggest you check out OpenHABs debug logging. You can start OpenHAB in debug mode using the debug start script found in the installation folder. Then when you tail (stream) the console log, youā€™ll see all sorts of information which will let you know where things may be going wrong (for example in the RegEx matching).

1 Like

TY Guys.
I was struggling with this from a few weeks.
Going to try tonight.

Greg, my debug mode never has worked although the debug logging does. Openhab is loaded in a non standard location on my setup which may be the cause. Is there anything special to launch it in this way?

I donā€™t know exactly how the debug start script works, but it is obviously passing in some different start parameters. You could have a look at the script to see what it is doing to have a better idea.

Alternatively, you can change the console logging from INFO to DEBUG in LOGBACK.XML.

Now that I mention it, it seems that there is a LOGBACK_DEBUG.XML file, so this debug start script is likley just passing this in to the runtime instead of the standard LOGBACK.XML file.

I wonā€™t get into itā€¦ but just to let you knowā€¦ the logging configuration is INCREDIBLY powerfull and configurable. Have a look around the forums and Google for info on how to set different log levels for various parts or destinations.

I already use logback_debug.xml and have a script on my desktop that copies between logback_debug and logback_normal as it can be changed on the fly. Iā€™ve never been able to get the console to display messages which would potentially be very useful.
Iā€™ll open the 2 startup scripts side by side and see if anything jumps out

In case itā€™s of use, thereā€™s now a blog post over at Open Energy Monitor with info (and config) showing how to get this up and running:

1 Like

Hi @jmoloney,

Thanks for that blogpost. Should be a big help in future. Looks like thereā€™s a similar problem to the missing asterisks we were having in posts above.

The MQTT REGEX looks like itā€™s missing the question marks after the asterisks:

>  For example the line in the items file to pull power 1 from emonhub MQTT is as follows:

> Number  emonpi_ct1       "Power 1 [%d W]"    { mqtt="<[mosquitto:emonhub/rx/5/values:state:REGEX((.*),.*,.*,.*,.*,.*,.*,.*,.*,.*,.*)]" }

Just to clarify in case the author gets the hump, it wasnā€™t me that wrote/posted the blog - I just spotted itā€¦

Ah, yeah, I assumed it was you whoā€™d written it, my bad.

I donā€™t use the console as my OH is running as a daemon. I just tail the openhab.log fileā€¦ which I think has the same settings as the consoleā€¦ but worth verifying.

I have experienced this with both MQTT and HTTP and RegExā€¦ I get the impression that it behaves inconsistently.

I tail openhab.log too, as I have OH running as a daemon too. Seems to work well for me.

Iā€™m getting the same impression as you about the REGEX thing too.

Iā€™ve been told that it works fine, and is documented, but have also then carefully read the documentation before setting up a binding only to find that it didnā€™t work as I expected it too. So itā€™s either a) the code, b) the documentation, c) or me !!

Iā€™m planning to broaden/enhance my OH1 system today and tomorrow, so will report back on further RegEx findings.

When I was originally getting REGEX to work it didnā€™t follow any of the examples I found on the internet and I was going down the road of getting MQTTWARN to do the translation before I had the Eureka moment. Since then its been fine albeit as long as I use the
(.*?,.*?,(.*?),.*?)
(thanks for the backslash before a star tip from several posts back btw)