Closed Terr4 closed 3 years ago
Please enable DEBUG logs for the binding and then ask for new discovery. Finally show your logs to us.
Hi! I have the exact same problem, but it do cause some issues for me. I raised a new issue report before I found this one, so please see https://github.com/openhab/openhab-addons/issues/8365 for description & DEBUG log. Hope you can help! :-)
@lolodomo, I was going to test this so I downloaded org.openhab.binding.mihome-2.5.10-SNAPSHOT.jar from https://ci.openhab.org/view/Integration%20Builds%20(2.5.x)/job/openHAB2.5.x-Addons/lastSuccessfulBuild/ the 4th of October. Should I expect this fix/workaround to be in that build? If not, can you please point me in the right direction?
Considering the date of the merge, I believe the fix is simply in the official 2.5.9 release.
@lolodomo, would you mind pointing me in the right direction for downloading this mihome 2.5.9 addon containing the workaround? I've tried to find it but I'm just about to give up. Any help would be very much appreciated :)
Just install/upgrade OH to 2.5.9 or 2.5.10 and you will get the fix.
The jar from the last snapshot build is also available here https://ci.openhab.org/job/openHAB2.5.x-Addons/ws/bundles/org.openhab.binding.mihome/target/org.openhab.binding.mihome-2.5.11-SNAPSHOT.jar
Thanks for your quick response @lolodomo . I stayed on openHAB 2.5.7 (don't want to upgrade unless necessary), but downloaded the 2.5.11 snapshot from your URL. I deleted the mihome GW and re-added it. Now it has the gateway ID twice in the thing ID and each channel, which looks very weird. And it doesn't seem to work to e.g. change the GW brightness & color using it.
Any idea? :)
@lolodomo now I removed both the mihome GW (had to click "Force remove") and the mihome bridge, restarted openHAB and Scanned for new mihome devices through Paper UI. Attaching a log containing "Start scan for bridges". Please have a look and see if it looks OK or not. Setting GW brightness and color still doesn't work :(
It seems I can't set the color & brightness on my other MiHome GW either anymore, so maybe it's a completely separate issue(?) and maybe the weird looking ID is still fine?
UPDATE: I guess this is the problem: No key set in the gateway settings. Edit it in the configuration. I'm sure I lost the gateway key when I upgraded to 2.5.7, so now I have to find out how I get it back but that's another question.. :)
UPDATE #2: I can confirm that the missing key was the reason for GW brightness/color didn't work. All fine for now :) Thanks!
Now it has the gateway ID twice in the thing ID
I think there was a change introduced at some point doing this. I use 2.5.9 and all new things I add through the binding have the gateway ID in the channel string as prefix, all things I added way before do not have the gateway string in the channel name but just the device id.
e.g. my temperature sensor had the ID "mihome:sensor_weather_v1:158d00025d8b50" but after re-adding it in 2.5.9 the channel string is now "mihome:sensor_weather_v1:7c49eb88b4e7:158d00025d8b50"
This is something that was probably fixed (not by myself).
Expected Behavior
Adding a Xiaomi Bridge with a leading zero ID should only display one Bridge entry and one Gateway entry in OpenHAB
Current Behavior
I have a Xiaomi Bridge with Serial ID "04cf8c8f9bcd" (MAC address 04:cf:8c:8f:9b:cd). This ID has a leading zero. OpenHAB discovers two entries for the Bridge and the Gateway: mihome:bridge:04cf8c8f9bcd mihome:bridge:4cf8c8f9bcd mihome:gateway:04cf8c8f9bcd mihome:gateway:4cf8c8f9bcd
Possible Solution
don't trim the leading zero or use a character prefix
Steps to Reproduce (for Bugs)
Context
I can delete the duplicate entries later in the things page or ignore it in PaperUI, it seems it has no negative impact except creating duplicate things and channels
Your Environment