Have done Openhab 2 file in rules or items or script

Hi

What would you like to do with the contents of the file?

It’s easy enough to use a CAT command in a Exec Binding thing to push the contents of the file into an openHAB2 Item.

cat \var\lib\openhab2\log_results.txt

You could even try to use the Regex feature to filter it (this isn’t something I’ve mastered yet).

It’s possible to trigger the Thing on demand, or set a polling interval.

Much like how I used the Exec binding to pull the results of the APCaccess command into openHAB2.

(Read to the end, as Rich gives some excellent advice on how to handle the results)

1 Like