diff --git a/README.md b/README.md index efb6385..37965f8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ # weather-streamoverlay +## Requirements + +- raspberry pi +- sensor hub for raspberry pi +- nodejs + +## Install / Config + +### Config +Copy `config/config.example.js` to `config/config.js` and edit the file. +API key and City name from : https://openweathermap.org/ + +### Install dependencies +``` +npm install +``` + +## Run + +``` +node index.js +``` + +## Useage +Navigate in your browser to `http://:8989` or add a Browser source with the url in your streaming software like obs or so. +The webclient will get every 10 seconds data from the webserver, every 30 sec it will change from temperature to humidity and back. The outside weather data is cached and will be requested every 10 min, while the insidetemp is almost live data, cause of the 10 secods which I mentioned earlier. + +# IMG + +i = inside - o = outside + +temperature +![./img/1.png](./img/1.png) +humidity +![./img/2.png](./img/2.png) \ No newline at end of file diff --git a/controller/websocket.js b/controller/websocket.js index 444b6d2..e2ab5d4 100644 --- a/controller/websocket.js +++ b/controller/websocket.js @@ -19,7 +19,6 @@ export class WebSock { ws.on('close',()=>{ clearInterval(sendData); }) - ws.send('something'); }); this.wss = wss; diff --git a/img/1.png b/img/1.png new file mode 100644 index 0000000..e845406 Binary files /dev/null and b/img/1.png differ diff --git a/img/2.png b/img/2.png new file mode 100644 index 0000000..d3dab16 Binary files /dev/null and b/img/2.png differ diff --git a/static/index.html b/static/index.html index 1d3be3a..0d45144 100644 --- a/static/index.html +++ b/static/index.html @@ -37,17 +37,6 @@ } #box-top-left:after { - /* - content: ''; - width: 0; - height: 0; - border-style: solid; - border-width: 25px 0px 25px 25px; - border-color: transparent transparent #00aee7 transparent; - right: 0; - top: 0; - position: absolute; - */ content: ''; width: 0; height: 0;