I am new to Open HAB and I’d like to do the following:
I have some data on my raspberry pi, stored in files (measurement data in ascii format). I want to read this with open hab (to store it using persistency).
My question is: is it necessary to write a new binding or are there some features, which enable my to achieve my planned task?
You need to give executeCommandLine a timeout. Without the timeout it runs the script in the background and immediately returns without giving you the result of the script. The timeout is ni milliseconds.
executeCommandLine("script to run", 1000)
I neglected to include the timeout in my example above.
This is a HABPanel question. I don’t use HABPanel. But it does look like the text is center justified. Yoo might try left justification which might be easier to read.
The last line isn’t truncated, it wraps to the next line. The first part of that line is on the previous line.
The “correct” approach would probably be to use the snmp binding.
The easiest would be to use the Network binding with a servicedevice Thing to ping port 1883 (or whatever port your MQTT broker uses. If the service goes down the Switch will go OFF.
Beyond that, you would use the Exec binding and parse the output.