-
Notifications
You must be signed in to change notification settings - Fork 22
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
Stream temperature changes #6
Comments
See the BlazeWebSocketExample.scala from Http4s (server side). See react-webscoket for the client side On the server, could use java's
Raspbian supports
Looks like http4s doesn't support websockets from the client side, perhaps Async Http Client would be better? or nv-websocket-client? |
See issue_6 branch and issue_6_of_temperature_machine for the UI. Bit of a blocker: on the Pi, the sensor file's https://raspberrypi.stackexchange.com/questions/75167/ds18b20-w1-slave-file-stamp-doesnt-change |
This is basically done now. There are some caveats:
There may be weird behaviour when client machines drop in and out of the pool. It looked like when a new machine was added, the UI didn't update but I need to confirm if this is the case. |
Using
inotifywait
(), watch for file changes of the temperature sensor and send straight to the server.Update the sever to stream current temperatures via web sockets rather than HTTP GET.
Update the UI to respond reactively to streamed temperature changes. Potentially update the chart in real time.
Note that RRD has a rate limit of 1 second, so might need the debounce.
The text was updated successfully, but these errors were encountered: