Need examples for dashboards

Hi i want to design a dashboard in Node for IOT(Home use)

can anyone give me some examples for some slick design and code
i don't see any examples online but youtube videos

i am have switches that will go 1/0 , ON/OFF , and some that are just on
no dimmers

thanks!

Is it just the UI design that you want ideas on?

if you can give me also cool coding ideas

like how to coonect a number of lamps to one switch and that sort of stuff
or timres on UI

all this is cool :slight_smile:
thanks!

You are unlikely to get much help just asking general questions about how to code stuff, so best to ask spcific questions.
As to ask how to control a number of lights from one switch then just wire them all to the same pin.
I have little idea what you mean by timeres on the UI. Do you mean time resolution? Or are you asking about timers. If timers then again you need to say what you want to see on the UI and what you want the timer to do.

Here is an example of what you can do with the basic dashboard components, complete with animated icons when the appliances are moving.

For example:

[{"id":"225f531a.adf3ac","type":"ui_switch","z":"c35bb098.5d79b","name":"Washer Washing?","label":"Washer Current Action","tooltip":"","group":"b6ded3e3.ee1a8","order":2,"width":"6","height":"1","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-modx fa-spin","oncolor":"blue","offvalue":"false","offvalueType":"bool","officon":"clear","offcolor":"red","x":890,"y":1300,"wires":[[]],"info":"wi-wu-rain"},{"id":"b418a3a.55a926","type":"change","z":"c35bb098.5d79b","name":"WASHER_WASHING?","rules":[{"t":"set","p":"payload","pt":"msg","to":"WASHER_WASHING","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":1300,"wires":[["225f531a.adf3ac"]]},{"id":"91e98b72.5ca428","type":"ui_switch","z":"c35bb098.5d79b","name":"Washer On?","label":"Washer Switch","tooltip":"","group":"b6ded3e3.ee1a8","order":1,"width":"6","height":"1","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"flash_on","oncolor":"green","offvalue":"false","offvalueType":"bool","officon":"flash_off","offcolor":"red","x":870,"y":1260,"wires":[[]]},{"id":"e88040e4.67997","type":"change","z":"c35bb098.5d79b","name":"WASHER_SWITCH_ON?","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1260,"wires":[["91e98b72.5ca428"]]},{"id":"72133dbe.4e7c84","type":"ui_text","z":"c35bb098.5d79b","group":"b6ded3e3.ee1a8","order":3,"width":"6","height":"1","name":"Washer Watts","label":"Washer Watts","format":"{{msg.payload.get_realtime.power_watts}}","layout":"row-spread","x":880,"y":1340,"wires":[]},{"id":"fdc591df.37ad8","type":"function","z":"c35bb098.5d79b","name":"Calculate power_watts","func":"msg.payload.get_realtime.power_watts = Math.floor(msg.payload.get_realtime.power_mw / 1000);\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":1340,"wires":[["72133dbe.4e7c84"]]},{"id":"83b7dbd2.31ea48","type":"comment","z":"c35bb098.5d79b","name":"Washer Dashboard","info":"","x":650,"y":1220,"wires":[]},{"id":"1b910e4d.f191c2","type":"function","z":"c35bb098.5d79b","name":"Calculate how long since washing started","func":"var washerStartTime = global.get(\"WASHER_START_TIME\") || msg.payload;\nvar minutesDiff = (msg.payload - washerStartTime) / 60000;\nmsg.payload = Math.floor(minutesDiff);\nreturn msg;","outputs":1,"noerr":0,"x":1000,"y":1380,"wires":[["621f4cf7.2fa9c4"]]},{"id":"215a0df5.fb6262","type":"switch","z":"c35bb098.5d79b","name":"WASHER_WASHING?","property":"WASHER_WASHING","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":660,"y":1380,"wires":[["1b910e4d.f191c2"],["883f3074.4a777"]]},{"id":"883f3074.4a777","type":"change","z":"c35bb098.5d79b","name":"payload=100","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":1420,"wires":[["621f4cf7.2fa9c4"]]},{"id":"621f4cf7.2fa9c4","type":"ui_gauge","z":"c35bb098.5d79b","name":"Washer Progress","group":"b6ded3e3.ee1a8","order":4,"width":"6","height":"3","gtype":"donut","title":"","label":"Washer Mins","format":"{{value}}","min":0,"max":"100","colors":["#00ff00","#00ff00","#00ff00"],"seg1":"","seg2":"","x":1310,"y":1420,"wires":[]},{"id":"b6ded3e3.ee1a8","type":"ui_group","z":"","name":"Laundry","tab":"cf3c7e32.8cfb1","order":4,"disp":true,"width":"6","collapse":false},{"id":"cf3c7e32.8cfb1","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Happy to answer questions on any of the parts.

I have been using some global variables (anything in upper case in my flows is a global variable) to keep system wide totals that need to persist between reboots of Node Red.

1 Like