Using a Python script and Highcharts (Java) I’ve created a Frankenstein setup for reading a value from the core and writing an auto-refreshing HTML page containing a graph display. This requires running the script repeatedly in order to refresh the values and the HTML page - I’m using ‘watch’ on a linux server:
watch -n 2 python core_value_chart.py
Assuming the process is running and the core is online, you should be able to see the results here.
Apologies in advance for the state of the code. I’m sure it’s not pretty.
Some questions, since we’re on the topic here:
Is there a better way to do this? I’d prefer the web page caused the Python code to execute - instead of having the script re-run repeatedly. Having the page update without a hard refresh would also be nice. Any thoughts on simple ways to achieve those goals?
I’m guessing it would be pretty simple to modify this setup to write values from the core to a local file, then graph those over time - useful for the air quality monitor mentioned at the start of this thread.
Look forward to hearing feedback on this topic. My goal (as hinted by the page) is to create a remote monitor system for my sailboat - so I know battery voltage levels, bilge level, cabin temp, etc.
The voltage being displayed on the page is actual voltage being taken from the Core. The other two items in the graph are just hard-coded.