I plan to start with a small home automation project. Necessary skills for electronic and programming are available.
My plan was to use openHAB as central administration point in combination with Arduino / NodeMCU (ESP8266) boards, sensors and MQTT messaging.
In the future each room will get his own IOT Board + Sensors. For all applications I prefer to use an wired ethernet connection with tls secure communication.
Overview Hardware:
Raspberry Pi 3 B+ | Software: openHAB and Mosquitto MQTT Broker, tls enabled
Setup from openHAB and MQTT is already done and tested a secure tls connection to the MQTT broker via MQTT.FX testclient (Windows). I was able to subcribe and publish topics and update the information in openHAB.
Next I tried to write my first Arduino sketch and publish the values from my sensors to an topic on my MQTT broker. But I was not able to connect my Arduino Uno + Ethernet Shield with my MQTT broker.
Questions:
It seems that the Arduino + W5100 Shield doesn't support tls, correct?
Which combination of hardware can you suggest to reach my goal to have a wired and secure communication?
Is one IOT board for each room enough, or will I get problem with the cable length?
I don't like the idea to have an separate IOT board for each sensor and also not to have multiple IOT boards that I have to connect via wifi.
Any tips and experience are welcome. Thanks in advance.
If you want to use wired ethernet, why would you need tls. If somebody is in your house they will not try to crack your home automation system. Your home network is behind your router.
If it is just for learning on how to use TLS, I can understand. I have not done that on my system and wanted to look into this as well.
Regarding the cable length this should not be a problem. You are just sending small packages anyways. So if a package gets lost from time to time you will not notice, MQTT will make sure the package gets resend if you set it QOS correctly. So any cheap ethernet cable will do.
Regarding the Ethernet I would explore other options as well. Going wireless will allow you better placement options for your sensors. They need to be where you want to meassure and not where you can get a cable to. It will also force you to look for low power options.
One option is to have some simple 433 MHz sensors and collect the data with a small SDR dongle. These sensors need just a AAA rechargable battery for maybe 12 month runtime.
I have a Nooelec SDR USB dongle connected to my Raspberry Pi and collect data from some sensors I bought many years ago with a simple LCD weather station. I use a software called RTL_433 which can send MQTT packages. I collect the MQTT packages with mosquitto and node-red. Its just an experimental system but has been working fine for a couple of weeks now.
I was wondering if you have made any progress on this topic. It is a very relevant project. I'm planning a large scale home automation project and this looks like the best architecture to use.
OpenHab (running on my QNAP NAS)
MQTT client running on Arduino (perhaps Industruino)
Then multiple sensors and I/O
mostly 1-wire temp
also relays
power monitoring
For the power monitoring, I'm still not sure of the best solution. There are some reasonable power meters with pulse output which I could count with the Arduino but this would need persistence or some other form of logging?