If you want to have a more secure solution in your company or hotel, etc. You can make it with Turris MOX router and HARDWARIO IoT Kit. Make it change now and then with a simple Node-RED flow and show the generated QR code for simple access to the wifi just by scanning it.
If you don't have a device that can scan QR code you can simply switch the page on the LCD and show the information as plain text.
1. Build hardwareYou will need just the LCD Thermostat Kit from HARDWARIO IoT Kit, don't worry about the Thermostat part, we will fix that in next steps.
And Turris MOX router that will serve as a gateway and also as the provider of the internet connection.
For the assembly of LCD Thermostat Kit, you can watch the video below but it is really simple. Just put all the modules together.
Put all of that into the 3D-printed enclosure and you are done with the hardware for now.
The second part is the Turris router. It is simple to use, just plug it into the socket, connect the cable from your ISP to the WAN port and your computer to one of the LAN ports.
Connect to the router by IP address 192.168.1.1 and follow the installation guide, it is pretty simple.
2. Flash firmware- Download HARDWARIO Playground.
- You can see documentation page on how to flash the firmware with HARDWARIO Playground.
- You will need the bcf-radio-qr-wifi-terminal firmware for this project.
You need to pair the Core module with the Radio dongle that you are using, follow the instructions below to see how it is done.
- Connect your USB Radio Dongle to your computer.
- Open HARDWARIO Playground
- Click Start Pairing the LED on the dongle should start blinking
- Connect the device that you want to pair into your computer or insert the batteries.
- Wait for the device to appear in the table
- It should add the device with the Alias: qr-terminal:0
- Click Stop Pairing
After you did all this you can unplug the device from the computer and insert the batteries, it will run on them without a problem. Next steps will be done on the computer, so you can leave the device and focus on the NODE-Red.
4. Turris setupYou will need to do a little bit of work on the Turris to make this project work.
First, you need to set it up in the browser wizard so it is connected to the internet and running. You can check that in the browser environment.
After you have a stable internet connection you will need to download PuTTY.
Open the PuTTY and connect to your device with SSH. The IP address should be the same as in the Browser(Default: 192.168.1.1).
Log in as: root and password is the one that you did set up in the installation of the router. If not you should head to the Foris and check the Advanced administration part in the Password tab.
After you are successfully logged in the Terminal you will have to install some packages.
I will copy parts of code that is needed for all this to work, do it in the order and it will be fine.
First, update the packages.
opkg update
Install git so you can download repositories.
opkg install git-http
Now you will need to download and install Node-RED for the communication
opkg install node
git clone https://github.com/dceejay/openwrt-node-red.git node-red
cd node-red/dist
opkg install node-red_0.20.6.ipk
After all this is done, you should go to this page and follow their tutorial on how to configure Turis for the HARDWARIO IoT Kit USB Dongle.
The last thing to do is to reboot the device so all the changes are saved.
reboot
5. Import functionOpen Node-RED in the browser by typing the IP address of the device, it is the same again but with the port 1880(Default: 192.168.1.1:1880). Copy the Node-RED flow from the Attachments and paste it into the Menu -> Import -> Clipboard. Do not forget to hit "Deploy" in the top right corner to apply the changes.
This flow will get all the data from the router that are needed for the QR code and send it onto the QR-terminal.
Also, it will start to change the password every Sunday if you press the Injectnode. After each password change, it will commit to the uci and reboot the device. You can set your day and time of course.
6. Customize Node-RED flowYou might have to use another syntax of the command, but it is easy to get the information about what to use.
You will need to connect with PuTTY to the router and use this command:
uci show wireless
You will get output that will look kind of like this one
If you want to get any value in the Node-RED you will use uci get..........,
For setting values you will use uci set........, after this command, you should do uci commit and reboot the device.
You can get a lot more information from the uci show. Go to the /etc/config and list all of the content.
cd /etc/config ; ls
If you type uci show <content> you will see all the information about that specific device/service etc.
7. Test your deviceThe test is quite simple, you just have to press the left button on the LCD module and it will update the password and SSID due to the config of the router.
The device updates itself now and then by itself so you don't have to worry about that either.
If you want to change the page on the display, press the right button on the LCD, you can show QR code or the plain text information about the network.
SummaryPut these modules all over your Hotel or office building and you will not have to worry about changing all the papers in all the rooms, you will just change the configuration on the router and it will update automatically after some time.
You can make Node-Red flow that changes the password every few days or so. Or you can change any other thing on the router. Just use the UCI command and you can get or set anything that is configurable on the device.
Feel free to ask any questions about this project.
- Visit HARDWARIO page on hackster.io for more interesting projects or go directly to their website
- Go to HARDWARIO documentation to learn more about their modules and other possibilities of the platform.
- Try more firmware from HARDWARIO Playground or write your own, it is easy to start.
- Because everything is Open source you can get all firmware on GitHub, get some inspiration and try to make your own applications.
- Get your own HARDWARIO Hub to replace your computer in this project so you have always access to your applications.
- Check out more applications that can be used with HARDWARIO IoT Kit in Integrations section.
Comments