-
nrf mesh to mqtt with tracing main steps
10/04/2019 at 20:04 • 0 commentsSerial output from the usb dongle
Dongle Firmware
https://github.com/nRFMesh/nRF52_Mesh/tree/master/applications/08_usb_dongle
cu can be used to check the output. Hint, stop serial with "~."
cu -l /dev/ttyACM0 -s 460800
Then start a python service to translate the serial to mqtt
Python script https://github.com/HomeSmartMesh/raspi/blob/master/py/nrf_mesh/nrf_mesh.py python3 py/nrf_mesh/nrf_mesh.py
mosquitto_sub -t 'nrf/#' -v | ts
The "| ts" is a pipe that adds timestamp
subscribing to the mqtt topic would then show an output format inspired from zigbee2mqtt that allows to mix the custom nrf devices into the rest of the automation chain
used sensors
more details about the RF and serial protocol in https://www.homesmartmesh.com/mesh/ -
Aqara and Eurotronics hand in hand to save energy
09/14/2019 at 10:44 • 0 commentsand make life more convenient for users. In this home automation section, aqara window contact sensors are used to send a window open alert to the Eurotronic thermostat, once the alert is disabled, the thermostat resumes the previously set temperature.
The Spriit (google "eurotronic thermostat zigbee" ) has the spirit of devices compatibility introducing a zigbee product, which support is added by the zigbee2mqtt community.
In this code section below, multiple windows contacts ("apertures") are aggregated and a notification is sent when the state changes, the full code is available here.
Down below, the "friendly names" used to filter the mqtt traffic coming from "zig/friendly name". Note that the code does mention sensor names and not ids, thus a better readability.
As conclusion, it is very challenging to program such an aggregation function using graphical tools such as nodered or any other high level automation language. Python is at the same time simple and powerful to allow such configurations.
-
nRF dongle brought to life with a pogo-pin adapter
05/15/2018 at 21:23 • 0 commentsThe pogo-pin adapter is successful
- 3d printed model available on Fusion 360
The used pogo-pins, not ideal, very thin, but all I got at the moment, can't wait.
during the testing all possible mistakes were obviously performed :
- SWDIO and SWDCLK have been inverted, the nrfjprog got thus an error, had to swap them to make it work
- Tx and Rx pin were confused between sender and receiver, so first attempt was silent
- At least the RF worked since the first attempt
Photos of the scene
Lack of helping hands and preliminary design not possible to put a holder on top or clip it to the DUT, anyway, at least the pogo-pins are matching.
It was very hard to get tiny holes on the 3d print, I had to set them much bigger around 1.3 mm diameter to get something where the 065 mm could pass, but not adjusted so had to set some glue.
Two first attempt failed because of holes diameter, then I abandoned the idea of having a ceiling holding the pins, after all some glue did the trick.
This nRF52 board will become the official dongle for the nRF52 Mesh project, given its cost and compacity, it makes it an ideal candidate.
I also figured out before flashing my own application that it had a bootloader, so I should probably start testing and using the serial bootloader to avoid mounting and dismounting every time. As this is already a serial USB adapter this concept fits perfectly.