Josar
(Josar)
January 10, 2018, 12:10pm
4
I am not sure what you want to do is possible. Maybe an example would help. Where does the bit value come from? How is it stored? Etc. Maybe we could suggest a solution.
As your question raises the need of more information I will post some information.
What i know of the regex-transformation-service is that:
I only used exec-retransformation to set the output argument to the command line to execute. Have a look in the example.
https://community.openhab.org/t/1-openhab-433mhz-radio-transmitter-tutorial-exec-binding-explained-in-detail/34977/20
Using transformation in the exec thing for example has the drawback that the result will always be a string.
I try to wrap my head around transformation and have some trouble getting it done.
As i try to read out GPU values explained here a had want to make the solution as neat as possible.
When i apply an Thing like this and add an Regex to get an jsonpath string containing { “temp” : <value> }.
Thing exec:command:gpuTemp [
command="/opt/vc/bin/vcgencmd measure_temp",
interval=10,
autorun=false,
transform="REGEX(s/(.*?)=(.*?)'C/{ \"$1\" : $2 }/g)"
]
And i s…
You may use a rule to make the transformation as shown here.
This tutorial is based on this , this , this and a lot of threads and tutorials i had to read till i got it working.
I try to give a step by step Tutorial how to get a temperature chart with OpenHAB2 and the ExecBinding 2 using the RRD4J database for persistency.
I will not explain everything in detail, please read this post to get an basic understanding of how OpenHAB works. And use the tutorials and the manual to get deeper insight of how the different parts work.
Now to read out the CPU temp…
Maybe with this information you could solve your problem or formulate example or question which explains what you try to do explicitly.