Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple remote sensors #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

andrzej-bieniek
Copy link

Hi,

Would you consider merging in remote sensors support?
It was tested with two remote sensors pushing temperature data with http GET call.
There is a bit more info in README.md file.

Thanks.

Log screenshot with two remote sensors:
tworemotesensors

Log screenshot with default data (after running ./build_example_database.sh)
defaultdbplot

No logic chages in the code.
What was done:
$ git clone https://github.com/einars/js-beautify.git
$ $ git describe
v1.4.2-11-gf416b0b
$ cd PiThermServer
$ ../js-beautify/python/js-beautify server.js > server.js.new
$ mv server.js.new server.js
It allows to run the server without local sensor.
(Error is printed to the console)
Script creates database with data from removed sample_dabatase.db
Sample data were dumped to text file with:
$ sqlite3 sample_database.db '.dump' > example_database.sql
No logic changes in the code.
$ html-beautify --version
1.4.2
$ html-beautify temperature_plot.htm > temperature_plot.htm.new
$ html-beautify temperature_log.htm > temperature_log.htm.new
$ mv temperature_plot.htm.new temperature_plot.htm
$ mv temperature_log.htm.new temperature_log.htm
It brings support for multiple remote sensors configured in database.
Local sensor support is not changed (sensor_id=0 is used for local sensor).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants