DockerPi SensorHub and Dashboard

enter image description here I got the DockerPi Sensor Hub and I decided to port all the sesnors over to NodeRED.

Sesnors:

  • External Temperature Sensor -30℃~127℃
  • OnBoard Temperature DHT11 -20℃~60℃
  • P. Temperature Sensor -40℃~80℃.
  • Humidity detection 20% Rh ~ 95% Rh
  • Light intensity detection 0Lux~1800Lux
  • Pressure detection 300 Pa ~ 1100 hPa
  • Presence detection 100 degrees, the maximum distance of 12m

Get Your DockerPi Sensor Hub:

Other HATs:

Requirements

  • sudo apt-get install python3 python3-smbus
  • node-red-dashboard

More about me:

If you want to get the latest updates to this project you can follow me via your preferred social media:

And if you feeling like buying me a coffee or supporting me in a more continuous way:

I hope you have enjoyed the project!

[{"id":"17c2027d.db63ce","type":"tab","label":"Sensor Board","disabled":false,"info":"![enter image description here](https://notenoughtech.com/wp-content/uploads/2020/03/maxresdefault-12-980x551.jpg)\nI got the DockerPi Sensor Hub and I decided to port all the sesnors over to NodeRED.\n\n - [Complete instructions](https://notenoughtech.com/raspberry-pi/dockerpi-sensor-hub/)\n\n**Sesnors**:\n-    External Temperature Sensor -30℃~127℃\n-    OnBoard Temperature DHT11 -20℃~60℃\n-    P. Temperature Sensor -40℃~80℃.\n-    Humidity detection 20% Rh ~ 95% Rh\n-    Light intensity detection 0Lux~1800Lux\n-    Pressure detection 300 Pa ~ 1100 hPa\n-    Presence detection 100 degrees, the maximum distance of 12m\n\n## Get Your DockerPi Sensor Hub:\n\n-    [DockerPi Sensor Hub](https://www.seeedstudio.com/DockerPi-Sensor-Hub-Development-Board-p-4101.html)\n\n**Other HATs:**\n-    [Docker Pi Power Board](http://bit.ly/2mCctyV) [(review)](https://notenoughtech.com/review/52pi-power-board/)\n-    [Channel Relay HAT](http://bit.ly/2nciVwM) [(review)](https://notenoughtech.com/raspberry-pi/dockerpi-4-channel-relay/) \n-    [ICE Tower Cooler](http://bit.ly/2nciVwM) [(review)](https://notenoughtech.com/raspberry-pi/rpi-hat/how-cool-is-52pi-ice-cooling-tower/) \n-    [IoT Node (GPS, GSM, LoRa)](http://bit.ly/2mCI7fH) (review soon)\n-    [NightLigt HAT](http://bit.ly/2nhRkup) (review soon)\n-    [UPS Pro 18650 board](http://bit.ly/343OSYm) [(review)](https://notenoughtech.com/raspberry-pi/rpi-hat/ups-pro-hat/)\n\n## Requirements\n\n - sudo apt-get install python3 python3-smbus\n - node-red-dashboard\n\n\n \n ## More about me:\n\nIf you want to get the latest updates to this project you can follow me via your preferred social media:\n\n-   [Facebook](https://www.facebook.com/NotEnoughTECH/)\n-   [Twitter](https://twitter.com/NotEnoughTECH)\n-   [Instagram](https://www.instagram.com/notenoughtech/)\n-   [YouTube](https://www.youtube.com/user/Polepositionpage)\n\nAnd if you feeling like buying me a coffee or supporting me in a more continuous way:\n\n-   [Paypal](https://www.paypal.me/notenoughtech)\n-   [Patreon](https://www.patreon.com/NotEnoughTECH)\n\nI hope you have enjoyed the project!"},{"id":"4b8247ce.b0e5b8","type":"exec","z":"17c2027d.db63ce","command":"python3 /home/pi/sensorhub.py","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Sensorhub","x":170,"y":260,"wires":[["971d9fa0.a506d"],[],[]]},{"id":"a5300d3.9bcc8f","type":"inject","z":"17c2027d.db63ce","name":"every 5s","topic":"","payload":"","payloadType":"str","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":100,"wires":[["4b8247ce.b0e5b8"]]},{"id":"971d9fa0.a506d","type":"json","z":"17c2027d.db63ce","name":"","property":"payload","action":"","pretty":false,"x":330,"y":240,"wires":[["bcf9b7a.893f848","9b176dbf.76ef7","d59316a1.ac7ae8","80e4f7ab.d3ebe8","5b87df23.41d12","844c2d5f.03e98"]]},{"id":"f2d1f3e0.4df54","type":"ui_gauge","z":"17c2027d.db63ce","name":"intTemp","group":"dab7a3f4.bdfaf","order":1,"width":6,"height":4,"gtype":"gage","title":"intTemp","label":"ºC","format":"{{msg.payload.baroTemp}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1160,"y":360,"wires":[]},{"id":"bcf9b7a.893f848","type":"switch","z":"17c2027d.db63ce","name":"internalSensor","property":"payload.intSensor","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":520,"y":120,"wires":[["f2d1f3e0.4df54","2b7d68df.65f708","ab85853.6e81178"],[]]},{"id":"9b176dbf.76ef7","type":"switch","z":"17c2027d.db63ce","name":"baroSensor","property":"payload.baroSensor","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":180,"wires":[["9edb13f4.d6e2a","34579a45.1ab4f6","5d2e378f.89f1f8"],[]]},{"id":"9edb13f4.d6e2a","type":"ui_gauge","z":"17c2027d.db63ce","name":"baroTemp","group":"dab7a3f4.bdfaf","order":2,"width":6,"height":4,"gtype":"gage","title":"baroTemp","label":"ºC","format":"{{msg.payload.baroTemp}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1160,"y":400,"wires":[]},{"id":"d59316a1.ac7ae8","type":"switch","z":"17c2027d.db63ce","name":"extSensor","property":"payload.baroSensor","propertyType":"msg","rules":[{"t":"else"},{"t":"eq","v":"overrange","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":500,"y":240,"wires":[["63666293.e0de3c","638400e0.437b7"],[],[]]},{"id":"63666293.e0de3c","type":"ui_gauge","z":"17c2027d.db63ce","name":"extTemp","group":"dab7a3f4.bdfaf","order":4,"width":6,"height":4,"gtype":"gage","title":"extTemp","label":"ºC","format":"{{msg.payload.extTemp}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1160,"y":480,"wires":[]},{"id":"2b7d68df.65f708","type":"change","z":"17c2027d.db63ce","name":"set intTemp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.intTemp","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"IntTemp","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":540,"wires":[["299ecde3.e7c082"]]},{"id":"638400e0.437b7","type":"change","z":"17c2027d.db63ce","name":"set extTemp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.extTemp","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"extTemp","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":620,"wires":[["299ecde3.e7c082"]]},{"id":"34579a45.1ab4f6","type":"change","z":"17c2027d.db63ce","name":"set baroTemp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.baroTemp","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"baroTemp","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":580,"wires":[["299ecde3.e7c082"]]},{"id":"11e6c77b.3e9a39","type":"ui_gauge","z":"17c2027d.db63ce","name":"baroPressure","group":"dab7a3f4.bdfaf","order":5,"width":6,"height":4,"gtype":"gage","title":"baroPressure","label":"HPa","format":"{{msg.payload.baroPress}}","min":"900","max":"1100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1180,"y":440,"wires":[]},{"id":"5d2e378f.89f1f8","type":"function","z":"17c2027d.db63ce","name":"convert","func":"var x = msg.payload.baroPress / 100;\n\nmsg.payload = x;\nreturn msg;","outputs":1,"noerr":0,"x":760,"y":560,"wires":[["11e6c77b.3e9a39"]]},{"id":"ab85853.6e81178","type":"ui_gauge","z":"17c2027d.db63ce","name":"intHumid","group":"dab7a3f4.bdfaf","order":3,"width":6,"height":4,"gtype":"gage","title":"intHumid","label":"%","format":"{{msg.payload.intHumid}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1160,"y":320,"wires":[]},{"id":"c0be06ef.9ec4b8","type":"ui_button","z":"17c2027d.db63ce","name":"Process Motion ","group":"dab7a3f4.bdfaf","order":7,"width":0,"height":0,"passthru":false,"label":"{{msg.payload}}","tooltip":"","color":"","bgcolor":"{{msg.colour}}","icon":"","payload":"","payloadType":"str","topic":"","x":940,"y":600,"wires":[[]]},{"id":"80e4f7ab.d3ebe8","type":"function","z":"17c2027d.db63ce","name":"Motion","func":"var x = msg.payload.humanDet;\n\nif(x === \"true\"){\n    msg.payload = \"DETECTED\";\n    msg.colour = \"green\";\n}\nelse{\n    msg.payload = \"NO MOTION\";\n    msg.colour = \"red\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":750,"y":600,"wires":[["c0be06ef.9ec4b8"]]},{"id":"5b87df23.41d12","type":"ui_gauge","z":"17c2027d.db63ce","name":"brightness","group":"dab7a3f4.bdfaf","order":6,"width":6,"height":4,"gtype":"gage","title":"brightness","label":"lumens","format":"{{msg.payload.Brightness}}","min":0,"max":"1800","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1170,"y":280,"wires":[]},{"id":"a2e28653.348fd8","type":"comment","z":"17c2027d.db63ce","name":"Gauge","info":"","x":1130,"y":240,"wires":[]},{"id":"ad029d3e.acc4d","type":"comment","z":"17c2027d.db63ce","name":"Chart","info":"","x":1330,"y":540,"wires":[]},{"id":"fa74f5cc.afaee8","type":"comment","z":"17c2027d.db63ce","name":"Sensor Status","info":"","x":510,"y":60,"wires":[]},{"id":"844c2d5f.03e98","type":"debug","z":"17c2027d.db63ce","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":410,"y":420,"wires":[]},{"id":"299ecde3.e7c082","type":"ui_chart","z":"17c2027d.db63ce","name":"","group":"dab7a3f4.bdfaf","order":7,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"bezier","nodata":"","dot":false,"ymin":"0","ymax":"50","removeOlder":1,"removeOlderPoints":"100","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1350,"y":580,"wires":[[]]},{"id":"dab7a3f4.bdfaf","type":"ui_group","z":"","name":"Sensor Hub","tab":"fc570b24.17dae8","order":1,"disp":true,"width":"12","collapse":false},{"id":"fc570b24.17dae8","type":"ui_tab","z":"","name":"SensorBoard","icon":"dashboard","order":8,"disabled":false,"hidden":false}]

Flow Info

Created 4 years, 5 months ago
Rating: not yet rated

Actions

Rate:

Node Types

Core
  • change (x3)
  • comment (x3)
  • debug (x1)
  • exec (x1)
  • function (x2)
  • inject (x1)
  • json (x1)
  • switch (x3)
Other
  • tab (x1)
  • ui_button (x1)
  • ui_chart (x1)
  • ui_gauge (x6)
  • ui_group (x1)
  • ui_tab (x1)

Tags

  • DockerPi
  • SensorHub
  • RaspberryPi
  • HAT
  • Sensors
  • Temperature
  • Dashboard
  • Pressure
  • human
  • detection
  • humidity
  • light
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option