I couldn't find a convenient way to write logs from the Elevation to a local file on a PC, so I've built a very simple command-line utility which connects to logsocket and eventsocket, formats the live logs for human readability, and writes them to stdout for your piping or grepping pleasure.
I've published it on GitHub as helog.
You'll need a Java 11 runtime installed. Download helog-v1.0.0.tar or helog-v1.0.0.zip and uncompress the archive. The executables are in the bin directory. You can then run:
-
helog events 192.168.1.200to streameventsocket -
helog log 192.168.1.200to streamlogssocket
...substituting the IP address for that of your own hub. As I understand it, eventsocket and logsocket aren't actually supported by Hubitat, so this tool might break at any time!
Sample output:
> bin/helog log 192.168.1.200
Connected to ws://192.168.1.200/logsocket
2022-12-29T11:15:58.226Z info dev 36 Bathroom Underfloor Heating Bathroom Underfloor Heating temperature 18.5 C
2022-12-29T11:16:24.804Z info dev 36 Bathroom Underfloor Heating On command, lastRunningMode: heat
2022-12-29T11:16:24.911Z info dev 36 Bathroom Underfloor Heating Bathroom Underfloor Heating is on
2022-12-29T11:16:25.200Z info dev 36 Bathroom Underfloor Heating Bathroom Underfloor Heating temperature 18.5 C
2022-12-29T11:16:34.911Z info dev 36 Bathroom Underfloor Heating Bathroom Underfloor Heating heating on
> bin/helog events 192.168.1.200
Connected to ws://192.168.1.200/eventsocket
2022-12-29T11:15:58.226Z DEVICE 36 Bathroom Underfloor Heating: temperature 18.5 C
2022-12-29T11:15:58.482Z DEVICE 36 Bathroom Underfloor Heating: thermostatMode heat On
2022-12-29T11:15:58.490Z DEVICE 36 Bathroom Underfloor Heating: switch true On
2022-12-29T11:16:25.910Z DEVICE 36 Bathroom Underfloor Heating: temperature 18.5 C
2022-12-29T11:16:34.911Z DEVICE 36 Bathroom Underfloor Heating: heating on
It can also filter by specific devices and apps, and write the output in CSV or raw JSON format. Run helog --help for details.
I hope this of use to the community. There are a few additional features I'm hoping to add as and when I get time, but let me know if there's a feature that would be particularly useful to you.
(I did find this post by @JohnRob - I'm not particularly familiar with Node-RED so it may be that his is a better solution and I've been wasting my time!)
(Edited to update links and sample output to v1.0.0)
)