We know how IoT:1 works and we know that it lacks any security. This time we will work on fixing this flaw.
It arrived, LCD 5″ with HDMI and touch via GPIOs! Our goal is to use it with Kivy without the X server. We checked earlier and we know that it is possible with the image but what about the touch panel?
(TL/DR) Yes, it is but requires some configuration.
Communication between nodes is based on a custom protocol. Its name is IoT:1. Maybe protocol is a too strong description, but sounds nice 😉
It takes a form o JSON encoded structure. It is not anything fancy but does its job. But there is one gotcha, it is not encrypted.
I have an implementation for both NodeMCU (in boilerplate) and Python (lib iot_protocol).
Time to handle a problem with relay refresh. If the state of relay changes, it should be broadcasted via message channel.states. So other nodes on the network will know about this.
To archive this we will use the handler callback concept in NodeMCU boilerplate.
Remember that we have a relay mounted in NodeOne? Let’s add support for it to the Google assistant.
The problem with performance on ILI9486 is something that is making me unhappy. I need at least 1fps but it is far from it. We even have written a lib in C to improve performance, in case of GPIO, it was a blast but SPI not so much. I do not want to use X server because I want as much power as possible for my usage.
That’s why I focused on SPI and GPIO LCDs but I think I found another option.
Let’s pause for a second and do some refactoring and cleaning. For example, I hopped for a thin storage service but I did something strange and scary :).
There is also a problem with translations – we have not implemented it 🙂
And anyone can call our endpoint, it is quite dangerous on the internet without any security.
Let’s return some real readings to Google Assistant. But to do this we need to get and store data on the backend. And to do this we need to write some code 🙂
I have the Doton wired with NodeOne sensors, relay control included. But let’s do something more and use Google Assistant to get data from NodeOne sensors. The node gives us info about temperature, humidity, movement and light. It has also a relay to control upper socket but let’s ignore it for now.
So this time we will try and get some basic understanding of Google Assistant.