base_topic
Closed this issue · 3 comments
Having recently been tinkering with Zigbee, mqtt and assorted sensors with Python scripts, I chanced on this project and thought I'd give it a try despite the complexity of adding another new, to me, system, node-RED. Easy enough to install node-RED on my R Pi and follow the instructions here to import the node-RED flow, graphics etc.
However, it doesn't work at present, clicking on the UI part of Pive does not change the Hive controller, possibly as I have zigbee2mqtt base_topic set as the default zigbee2mqtt. I'm reluctant to change this as I have all my other devices working with the default. The excellent MQTT Explorer shows another topic pive2mqtt at the same level as zigbee2mqtt, with pive2mqtt showing mqtt messages. So, I'm nearly there; a bit more to learn.
Anyway, certainly an interesting project for which many thanks. It seems a little strange tinkering with the central heating control in a UK heat wave, although perhaps that is the best time 😄
Hi @Chiny91.
I did most of my testing back in the late autumn/winter, so I was very unpopular every time I messed up the heating. So maybe Summertime is the best time! At least you can switch the boiler off and just watch the Hive LEDs switch on/off?
You can change occurrences of pive2mqtt to zigbee2mqtt in the NodeRed flow if you wish. You might want to find every occurrence of pive2mqtt in the flow by searching for pive2mqtt on the NR info tab... which will list every node containing that base topic. Then modify the base topic to be your existing zigbee2mqtt in all of the NR nodes and deploy again. That should do it.
Here's an example screenshot for my test 2.15 version of the flow... note that the info tab is selected, pive2mqtt is entered into search, and every node containing that string is returned in the list below. Just click on each result to open that node and edit then save each modified node. You'll see that the base topic is referenced mostly in the MQTT input/output nodes - HOWEVER - there may be occurrences where the topic is defined in something like a change node, then 'passed' to the MQTT node.
I'm sure you'll work it out. Node-red is a lot of fun and very powerful when you can get your head around programming in flows. Enjoy, and remember to leave the windows open when the CH switches on!
Thanks for tip; being unfamiliar with node-red, I downloaded the file and hacked it with a text editor before importing it. Inelegant perhaps but it worked. Then I had to await the arrival of my eBay SLT3 to complement my existing eBay SLR2b; somewhere along the way, my Zigbee system threw a wobbler and every device (about 10) needed re-pairing, one bricked itself. Anyway, it all now appears to work on the bench with the hardware/web controls doing what I think they should.
Only outstanding issue is the SLT does not show in the MQTT Explorer app; it shows in the zigbee2mqtt config file and the associated graphical web page. I suspect that my Zigbee system is a bit flaky, maybe the cheapskate CC2531 is not up to the job. Certainly not the moment to connect to my boiler without more work - early days.
Sounds like you are making solid progress! No problem with the text editor hack. A quick editor search/replace certainly does the trick.
With regard to the Zigbee re-pairing. Been there, done that :(
In my experience, it will be worth you moving on from the CC2531 very soon as your Zigbee network expands. After changing to the ZZH stick (also from a CC2531), my Zigbee network became very reliable. No more restarting zigbee2mqtt every few days. I now have 35 devices and my Zigbee network is solid. I would certainly recommend going with the improved ZZH device (or similar) before connecting your system up to your boiler.
I have been controlling my Hive SLR/SLT since last December now with my RPi running Domoticz, switching the SLR with MQTT publishes from Domoticz, see https://github.com/roadsnail/Hive-SLR2-SLT2-Zigbee2MQTT-with-node-RED . (The Pi-ve project came later).
As for SLT messages not showing in MQTT Explorer, I think that is because the SLR device seems to do all of the MQTT pub/sub handling for both devices. I wouldn't suspect any issues with your Zigbee system. There appears to be some very tight integration between the SLT and SLR, but the only topics you need to worry about all appear in MQTT explorer.