Best sutable for Home Automation, IOT. You may think of it as Arduino Pro Mini plus all the items in the picture below:
Arduino IDE Settings
programming FTDI adapter connection
easyPIRmultisensorsBox.ino is the Arduino example sketch using MySensors API.
Controller Setup.
Burn the easyPIRmultisensorsBox.ino sketch into the board and it will became one of the MySensors home automation network Sensor's Node reporting Motion (PIR), Temperature , Humidity and Vsial light in Luxes to a smart-home controller.
To create the home automation network you need smart-home controller and at least two Nodes one as a Sensor node and the other one as the “Gateway Serial” connected to a smart-home controller. I personally love Domoticz as a smarthome controller. Please check this HowTo to install Domoticz.
No Controller setup. However, for no-controller setup, as example, you can use 3 nodes - first node as the “Gateway Serial”, second node as a Relay and last one as a PIR sensor for that a Relay. No controller needed then, keep the Switch and the Relay on the same address and the switch will operate the relay.
Things worth mentioning about the MySensors Arduino sketch:
Code | Description |
---|---|
Light meter BH1750 Library by Christopher Laws | MySensorsArduinoExamples BH1750 |
Temperature and humidity sensor Si7021 SparkFun Library | SparkFun_Si7021_Breakout_Library |
#define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RF69_433MHZ |
The easyPIRmultisensorsBox can use Hope RF RFM69CW or Nordic Semiconductor's NRF 24L01+ radios. Define which radio we use – here is RFM 69 with frequency 433 MHZ and it is HW type – one of the most powerful RFM 69 radios. |
#define MY_RADIO_NRF24 | Define which radio we use – here is Nordic Semiconductor's NRF 24L01+ |
#define MY_NODE_ID 0xE0 | Define Node address (0xE0 here). I prefer to use static addresses and in Hexadecimal since it is easier to identify the node address in Domoticz devices list after it will be discovered by controller ( Domoticz). However, you can use AUTO instead of the hardcoded number (like 0xE0) though. Domoticz will automatically assign node ID then. |
#define MY_OTA_FIRMWARE_FEATURE #define MY_OTA_FLASH_JDECID 0x0 |
Define OTA feature. OTA stands for “Over The Air firmware updates”. If your node does not utilize Sleep mode you can send new “firmware” (compiled sketch binary) by air. Here is the link on how to do it. Skip to the step "How to upload a new sketch just with OTA" as all initial steps have been completed in the easyPIRmultisensorsBox. For OTA we use JDEC Flash chip where the node stores new firmware and once it has been received and checksum (CRC) is correct it reboots and flashes your new code into the node controller. 0x2020 "Erase type" defined here for JDEC Flash chip . |
#define MY_SIGNING_ATSHA204 #define MY_SIGNING_REQUEST_SIGNATURES |
Define if you like to use Crypto Authentication to secure your nodes from intruders or interference. After that, you have to “personalize” all the nodes, which have those, defines enabled. How to “personalize” nodes with encryption key. You need both defines in the nodes you need to protect. The Gateway Serial could be with only one of those defines enabled - #define MY_SIGNING_ATSHA204 |
Connect the Node to FTDI USB adaptor, Select Pro Mini 8MHz board in Arduino IDE and upload the easyPIRmultisensorsBox.ino sketch.
Done
The board designed by Koresh