Hello everybody,
Due to problems with range I ended up using two BC USB dongle gateways, which are both connected to one Mosquitto instance. Everything worked just fine until I started using one climate module kit connected to one gateway and second climate module kit connected to the second gateway. The data are being mixed as there is no clear ID of the kit. How can I identify, which data are coming from which module?
Thanks in advance.
Hello,
I use the same two dongles topolgy and it is easy to fix.
First you have to rename the name
attribute of one gateway. Right now also the two gateways share the same name/topic. Just edit name
in the config file of one or both gateways to make it more clear: https://developers.bigclown.com/tools/bigclown-gateway#step-2-configuration-file-for-gateway-radio-dongle
You have to restart bcg
service (pm2 restart bcg-ud
) or reboot Rpi to update the name.
Our bc-raspbian and Devices
tab in web gui expects just a single gateway called usb-dongle
so to rename node on a different gateway you have to use MQTT commands. Luckily we have nice tool bch
which could be installed simply by pip if its not installed by default on Rpi
https://developers.bigclown.com/tools/bigclown-host-tool
It also has sub
and pub
command so you can troubleshoot what is giong on in MQTT broker/messages.
You install and run this tool on your machine where is MQTT broker installed, but you can run it anywhere and just set the MQTT broker in parameter --mqtt-host
.
bch
has rename command and expects that default name of gateway is usb-dongle
. If you would like to rename device on different gateway you apply parameter --gateway
.
Some tips:
You can list all your gateways so you know the names:
martin@nasbuntu:~$ bch gw list
usb-dongle {'version': 'v1.13.0', 'firmware': 'bcf-gateway-usb-dongle', 'id': '836d1983a46e'}
black-pi {'version': 'v1.12.0', 'firmware': 'bcf-gateway-usb-dongle', 'id': 'fffe5542d621'}
This is how I can list nodes on both of my gateways. I run the bch
command on my server where the MQTT is running locally, so the bch
is using localhost as a broker address.
martin@nasbuntu:~$ bch node list
id alias
=====================================
836d1983890a soil:0
836d1983075a bedroom
836d1983532f livingroom
...
b81dcc7a0440 motion-detector:0
294b9f639a4f motion-detector:1
martin@nasbuntu:~$ bch --gateway black-pi node list
id alias
==============================
836d19834e6d mailbox
836d19820d35 led-matrix:0
25d8f51aeeb3 shock-sensor:0
836d19830c54 soil-sensor:1
martin@nasbuntu:~$
Let me know if it worked for you.
2 Likes
Thanks a lot. It works great, I was hoping for something like this.
1 Like