Smart and Secure WiFi Router with HARDWARIO IoT Kit

Make your own smart router with Turris MOX and HARDWARIO IoT Kit. You can make it change the password periodicaly and show it as a QR code.

IntermediateFull instructions provided2 hours1,152
Smart and Secure WiFi Router with HARDWARIO IoT Kit

Things used in this project

Hardware components

LCD Thermostat Kit
HARDWARIO LCD Thermostat Kit
×1
Radio Dongle
HARDWARIO Radio Dongle
×1
Turris MOX
×1

Software apps and online services

Node-RED
Node-RED
Playground
HARDWARIO Playground

Story

Read more

Code

NODE-Red flow

JSON
Flow that controls the Turris and sends informations into the HARDWARIO LCD kit
[{"id":"e7489bfb.e7ce08","type":"exec","z":"ada826c8.8f78f8","command":"uci get wireless.@wifi-iface[1].key","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":620,"y":200,"wires":[["66f9ac08.431d64"],[],[]]},{"id":"82640ec1.eee02","type":"mqtt in","z":"ada826c8.8f78f8","name":"","topic":"node/qr-terminal:0/thermometer/0:1/temperature","qos":"2","broker":"23774e14.c7e312","x":240,"y":360,"wires":[["fde843da.15755","e7489bfb.e7ce08","db088134.41b0d","d3c34164.23fe1"]]},{"id":"66f9ac08.431d64","type":"function","z":"ada826c8.8f78f8","name":"Password Saver","func":"msg.payload = msg.payload.substring(0, msg.payload.length - 1);\n\nflow.set(\"password\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":200,"wires":[["4d964f86.f8306"]]},{"id":"9725e8e7.d94af8","type":"function","z":"ada826c8.8f78f8","name":"SSID Saver","func":"msg.payload = msg.payload.substring(0, msg.payload.length - 1);\n\nflow.set(\"SSID\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":970,"y":260,"wires":[["e8b686b1.a8ef48"]]},{"id":"f51d7809.8d6ac8","type":"mqtt in","z":"ada826c8.8f78f8","name":"","topic":"node/qr-terminal:0/push-button/-/event-count","qos":"2","datatype":"auto","broker":"23774e14.c7e312","x":230,"y":320,"wires":[["e7489bfb.e7ce08","fde843da.15755","db088134.41b0d","d3c34164.23fe1"]]},{"id":"d3c34164.23fe1","type":"function","z":"ada826c8.8f78f8","name":"String builder","func":"msg.payload = \"\\\"\"\nmsg.payload = msg.payload + \"WIFI:S:\" + flow.get(\"SSID\") + \";T:\" + flow.get(\"encryption\") + \";P:\" + flow.get(\"password\") + \";;\\\"\";\nreturn msg;","outputs":1,"noerr":0,"x":750,"y":340,"wires":[["5d77aaf7.f589d4"]]},{"id":"5d77aaf7.f589d4","type":"mqtt out","z":"ada826c8.8f78f8","name":"","topic":"node/qr-terminal:0/qr/-/chng/code","qos":"","retain":"","broker":"23774e14.c7e312","x":1220,"y":340,"wires":[]},{"id":"4d964f86.f8306","type":"ui_text","z":"ada826c8.8f78f8","group":"1f3b5b8f.ae0e04","order":0,"width":0,"height":0,"name":"","label":"Password","format":"{{msg.payload}}","layout":"row-spread","x":1160,"y":200,"wires":[]},{"id":"fde843da.15755","type":"exec","z":"ada826c8.8f78f8","command":"uci get wireless.@wifi-iface[1].ssid","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":620,"y":260,"wires":[["9725e8e7.d94af8"],[],[]]},{"id":"e8b686b1.a8ef48","type":"ui_text","z":"ada826c8.8f78f8","group":"1f3b5b8f.ae0e04","order":0,"width":0,"height":0,"name":"","label":"SSID","format":"{{msg.payload}}","layout":"row-spread","x":1150,"y":260,"wires":[]},{"id":"db088134.41b0d","type":"exec","z":"ada826c8.8f78f8","command":"uci get wireless.@wifi-iface[1].encryption","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":640,"y":140,"wires":[["e7562993.ff1048"],[],[]]},{"id":"e7562993.ff1048","type":"function","z":"ada826c8.8f78f8","name":"Encryption Saver","func":"msg.payload = msg.payload.substring(0, msg.payload.length - 1);\nif(msg.payload == \"psk2\")\n{\n    msg.payload = \"WPA2\";\n}\nflow.set(\"encryption\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":140,"wires":[["9e9b567.33200a8"]]},{"id":"9e9b567.33200a8","type":"ui_text","z":"ada826c8.8f78f8","group":"1f3b5b8f.ae0e04","order":2,"width":0,"height":0,"name":"","label":"Encryption","format":"{{msg.payload}}","layout":"row-spread","x":1170,"y":140,"wires":[]},{"id":"23774e14.c7e312","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"1f3b5b8f.ae0e04","type":"ui_group","z":"","name":"Default","tab":"5944674.ab07498","disp":true,"width":"6","collapse":false},{"id":"5944674.ab07498","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Credits

Jakub Smejkal

Jakub Smejkal

79 projects • 14 followers
Martin Hubáček

Martin Hubáček

65 projects • 56 followers
Lukáš Fabik

Lukáš Fabik

43 projects • 12 followers
Alan Fabik

Alan Fabik

43 projects • 11 followers
Karel Blavka

Karel Blavka

9 projects • 8 followers
Pavel Hübner

Pavel Hübner

19 projects • 17 followers
I am a hardware engineer, firmware developer, and open-source enthusiast.

Comments