This project will allow to aggregate, process and visualise data collected from a network of wireless sensors. Main purpose of it is to use it as a base of my own smart home system.
Probably you are lost if you are reading this README. The project is still in a hacking phase. I check different possible solutions and ways to proceed. Don't expect anything.
Check Issues for TODO.
This README for now is just my notebook. It will get a shape later.
This project heavily utilizes RF24 libs.
MQTT usage is implemented with PubSubClient library.
- Prototype of a arduino-based hardware.
- Publishing of temperature and humidity data.
- Arduino can be configured over serial connection.
- BeagleBone Black with RF24Gateway properly transfers MQTT data from sensors to Mosquitto MQTT broker.
The system consists of:
-
Radio part
- Sensor layer
- RF24 Gateway
-
Cloud part
- MQTT Broker
- MQTT to DB bridge
- Database
- Presentation layer (WebUI)
Initially, sensor used MQTT subscriptions as alternative way to set configuration data. Unfortunatelly, RF24 Ethernet library is quite heavy for arduino in terms of code size.
Take a look at the RF24Ethernet issue #17 and PubSubClient issue #216. Probably arduino is not able to handle to many task at the same time - especially publishing and receiving notification about subscribed topics.
TODO: It should be checked whether similar problems are occuring when using ethernet shield.
Used library: https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib
r/l/<location: char[8]>/s/<id: uint8_t>/t - temperature
r/l/<location: char[8]>/s/<id: uint8_t>/h - humidity
r/l/<location: char[8]>/s/<id: uint8_t>/v - voltage
There are two types of commands which can be executed over serial console:
S,<name>,<value>
Modifies given variable in the system. Where <name>
is:
- id: uint8_t - sensor id
- loc: char8 - sensor location
- sip: ipaddress - sensor ip address
- gip: ipaddress - rf24 gateway ip address
- bip: ipaddress - MQTT broker ip address
G,<name>
Prints given variable. Where <name>
is:
- id: uint8_t - sensor id
- loc: char8 - sensor location
- sip: ipaddress - sensor ip address
- gip: ipaddress - rf24 gateway ip address
- bip: ipaddress - MQTT broker ip address
Python based bridge build with Paho-MQTT.