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!
Thatās obviously a good thing, but doubtless some other item at the bottom is now suffering
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!
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).
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
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((.*),.*,.*,.*,.*,.*,.*,.*,.*,.*,.*)]" }
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ā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)