💬 NRF51822 Livolo 1 channel 1 way EU switch(VL-C700X-1_Ver_C2)
openhardware.io last edited by openhardware.io
Thanks for your post! Just wondering why you opted for the nRF51 over the nRF52?
Thanks. Well because it was cheaper/smaller than all of the Aliexpress modules found so far and it's shielded also(talking about the PTR5518 module here). So I found it to be perfect for this solution when this project was created(almost 2 months ago). Other than that nrf51 even if it's older or not so powerful than its nrf52 counterpart I found it to be more "mature" when it comes to the software part - just like atmega328p is for the Arduino world. If I remember well it was among the first one supported in sandeepmistry's nrf5 core: https://github.com/sandeepmistry/arduino-nRF5 or any other Arduino core for the nrf5xx modules so I assume its software support should be more richer than nrf52xxx.
After a long time of development(both hw and sw) I finally managed to get to a final version and a stable one - production ready also. It's a mix of BLE and Mysensors(the switches are running the nordic ble stack wrapped using the sandeepmistry ble peripheral library) and a linux board running the ble central node and Mysensors integration over MQTT.
Now this seems like a complicate setup and extra components added but it's very stable so far and no more failures with the Livolo switches. The linux board has a web interface for configuring mqtt connections details, mysensors node id's, ble mac addresses and some statistics regarding connected nodes over ble and services status, mqtt connection status.
Maximum ble switches or peripherals that the central node can connect to is 5 or 6 - this is a limitation in the ble stack as far as I know but it's enough to cover one room or maybe two if there aren't too many walls or more than 15-20meters in open space. I tested using an Orico BTA-403 usb ble 4.0 dongle and it works very well even through one wall.
Here are some screenshots from the web panel used to configure the central node(linux board with usb ble dongle)
The code from the linux board(a nanopi duo from friendlyelec) runs custom python code made by me to maintain the ble connections and do the MySensors integration - it also provides failure handling and automatic reconnection for both BLE devices and mqtt broker.
Now the web interface is not very refined but it does its job very well(I'm using the great and almighty bootstrap framework for the UI). I also use flask for the python web server, ajax and other goodies to support all this.
Anyway there's a lot to publish and discuss about this project so I will do that on my blog when I have time: https://electronics-adventures.blogspot.ro/
I don't see a BOM, so: What kind of connector are you using as your J1 SWD ISP component?
For the swd connector - some simple wires soldered temporarily :simple_smile: and removed afterwards. The project doesn't support OTA - but can be added if desired as a DFU upload service - needs some extra work and research. But once the switches are flashed there's no need to reflash them as all the MySensors stuff is on the linux board node which can be reconfigured very easily through that web interface(the services behind it will restart automatically when the configuration file changes and the new settings are applied automatically also). I will prepare the required documentation about the whole system on my blog and there's a lot to write :simple_smile: .
@mtiutiu I'm impressed. I'll wait for your write-up with baited breath.