Hello all,
I recently started playing with the idea of creating a set of automated systems for my next (under construction) home.
I am fairly sure that not all the systems will be connected to the house power supply, and same applies for the possibility to physically connect them to a gateway, which is why I am wondering which solution might suit my needs best.
Here is a list of the ideas I got, that I might like to implement (with time!):
Electrical system management
Shutters automation
Watering system for flowers and/or herbs
Media centre
House heating/cooling management
Kitchen devices management
On top of it, it would be nice to be able to access the system from outside home.
Now, in order to connect the nodes to a gateway I have a few doubts:
Is the WiFi option to be excluded a priori? I compared the MRK1000 to MKR1300 for example, and noticed that the former needs higher capacity batteries (700 mAh at least) in order to work, which makes me think that it might not be a good solution without a stable power supply
If I went for WiFi, would a different communication system like MQTT mitigate the power consumption enough to make me forget about the low power wireless solutions?
If I had to go for low power wireless, I am undecided between LoRa and ZigBee. I'll list below pros and cons that I see
Is an hybrid system, using cables and wireless to connect different nodes to the gateway, feasible? For example, the electrycal system management could (and should) be fully cabled
About LoRa/ZigBee, for what I read this is how I might realise the components:
LoRa
ZigBee
Gateway
MKR1300 + Ethernet Shield or Raspberry Pi + LoRa shield
Arduino + Eth Shield + Wireless Shield + ZigBee or Raspberry Pi + ZigBee shield
Nodes
MKR1300 + Proto Shield or Relay Shield
Arduino + Wireless Shield + ZigBee + X
For a WiFi network, the MKR1000 would substitute the MKR1300 and a WiFi shield would substitute the LoRa/ZigBee Shield.
I quite like the compactness of the MKR1300 solution, compared to the ZigBee that would need 3 components for each node, plus maybe external relays where needed. I also found some tutorials where they explain how to create a LoRa gateway.
On the other hand, I am not sure that the LoRa technology is the most suited for a single house, where long range is not really needed.
The opposite considerations apply for ZigBee, with the addition that maybe there are more ready-to-use devices that I might connect to the hub.
Do you have anything more to weigh in? It would be very nice to hear the experience from people who already implemented (or at least tried) one of these solutions from the connectivity point of view.
Is there something important that I am overlooking or that I should consider?
Would a system like MKR1300 + Ethernet Shield work properly? Same question applies to the Arduino ZigBee gateway.
srnet:
Andreas is describing the installation of The Things Network (LoRaWAN) single channel gateway.
The Things Network is really a monitoring network for widely dispersed sensors and not really suitable for continuous home automation applications.
Yeah, I wasn't referring to the TTN part of the video, I just used it to be sure that there was a viable way to have a LoRa gateway without spending almost 200 €. At least at the moment I am not concentrating also on data storage, even if it might be done in a second time (not necessarily through TTN).
A system described in the video might be used to let the LoRa sensors and nodes communicate with an external device by means of the Etherned, does it?
Something on the line of this architecture where the Network Server is represented by a local interface (might be my laptop accessing the Gateway to read data, or something else). Am I wrong?
I have just started doing some testing with Lora and am using an ESP32 LoRa board like this to act as a bridge between my test LoRa sensor node (similar to this) and my WiFi network that uses a RPi Zero W as a simple server running MQTT and Node-Red. From this I push data out to a few free web based dashboards (testing) so I can see the data anywhere with an internet connection.
Cool!
Are you using a single node? Do you think that it would be feasible to add more nodes?
What worries me a bit is this page, where it is stated at the beginning that
This single channel LoRaWAN gateway is a proof-of-concept implementation,that can be used for development and node testing. It is not a replacement for a real multi channel/multi SF gateway! It supports some LoRaWAN features, but due to its static nature (single channel) it is not fullyLoRaWAN compatible (and will never be).
By default it works with the TTN backend, for testing and development.
Maybe the single channel prevents from using more than one node, if multiple nodes need to be able to switch channel until they find a free one?
Unless that is written having in mind a network that is not limited to a local one, but that has to be interfaced (and part of) TTN.
DavidePer:
Cool!
Are you using a single node? Do you think that it would be feasible to add more nodes?
I am also playing with LoRa. I have two ESP32 proto boards running Arduino and talking over LoRa (one as a single channel gateway and the other as a node). It does work. I see can see the data the node sends.
Regarding your question, a single channel gateway can communicate with many nodes; but, it can only deal with one at a time. LorRa is intended for small repeated data. If there was a collision, then it might miss that data point; but, it will catch it next time.
The comment you are quoting really aims to the intent of LoRaWAN/TTN (which is a bit different from LoRa). LoRa is just a communications interface The intent of a LoRaWAN gateway is to provide in-range LoRa nodes wide open/public connectivity to TTN. You can't accomplish with with a single channel. Single channel gateways are good for private or experimental use..
That said, I am thinking LoRa may not be the best fit for your project. Most of that probably depends on distance. LoRa is for low power and distance (a few miles). If you talking < a few hundred feet, maybe BLE would do.
DavidePer:
Are you using a single node? Do you think that it would be feasible to add more nodes?
A single LoRa node at the moment but expect to add a couple more if testing goes well. I also use ESP8622 modules (Wemos D1 Mini's) in my setup as they are in the house so can be powered & send/receive WiFi without problem but I want to use the LoRa modules outside so WiFi is not an option. Also battery life is important so the module spends most of its life sleeping but takes an averaging reading from a BME280 every 5 minutes and transmits the results once every half an hour. As this is my first test module this may change further to conserve battery life.
DavidePer:
What worries me a bit is this page, where it is stated at the beginning that
Maybe the single channel prevents from using more than one node, if multiple nodes need to be able to switch channel until they find a free one?
Unless that is written having in mind a network that is not limited to a local one, but that has to be interfaced (and part of) TTN.
As markshancock pointed out there is a difference between LoRaWan and LoRa in its implementation. You can setup several nodes using a single channels but will need to deal with possible message collisions. As I'm only transmitting for about 1 second once every 30 minutes I don't expect to many problems but to be safe I'm currently transmitting the same results 3 times in a row to hopefully reduce the chance of missed results.even more. Another option might be to transmit the results and then wait for an acknowledgement else send again but on battery that might kill its life quickly if no gateway replies so I'm currently just sending only.
Whilst LoRas main application is for long distance systems, because of its long distance capability at very short distances you only need to use minimal RF power, so LoRa sensors can be very battery friendly.
Ok, I read quite some stuff yesterday and I have things clearer now (I think :D).
Concerning the communication of a single channel gateway with one node per time, would it still be possible to implement a MQTT communication in this condition?
I suppose that my doubt comes from the fact that a client needs to be connected to the broker, in order to be able to publish its topics at any time. But if the gateway can accept only one connection per time, I am not sure that this would allow a timely forwarding by the broker (which would be installed on the same machine running the gateway).
Sorry if the question sounds naive, but I am not a great expert when it comes to networking, so I don't have proper command of the different definitions.
@markshancock I am not a great fan of BLE: not sure that it is so power saving, plus that would allow a single connection to the gateway per time (and BT doesn't look to me as having a quick response when it comes to disconnecting devices).
Thanks everybody for the feedback received up to now, this is a crytical choice and I want to be sure before ordering stuff and designing my sistem more in detail.