New Homebridge Plug-in via MakerAPI

Yes I did. And as I said. Everything is working fine and I can control all devices via the Home app. But when the Homebridge service is restarted, all devices has lost their rooms and are back in the default location within the Home app.
It’s like they are new devices in the Home app.

Do you have any old devices Associated with your iCloud account?

1 Like

I had this happen when I updated Homebridge the other day. I ended up having to restart the Linux Box, seems to have fixed the issue. looking at the log when homebridge was starting up it showed a few cache entries removed, whatever that means but before that i was getting an error in the log forgot what it was. Check your logs for errors.
Edit: I actually restarted HE and Linux box the error was something to do with getting something from maker API... if that helps

Well I restarted just to make sure it was really fixed and it wasn't. Remove stale cache device Sidewalk Contact sensor
Homebridge Version: 2.7
Plugin Version: 0.4.13
[3/28/2021, 11:00:18 AM] Registering platform 'homebridge-hubitat-makerapi.Hubitat-MakerAPI'
[3/28/2021, 11:00:18 AM] ---
[3/28/2021, 11:00:18 AM] Loading 2 platforms...
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI] Initializing Hubitat-MakerAPI platform...
[3/28/2021, 11:00:18 AM] [Config] Initializing config platform...
[3/28/2021, 11:00:18 AM] [Config] Running in Service Mode
[3/28/2021, 11:00:18 AM] Loading 1 accessories...
[3/28/2021, 11:00:18 AM] [security switch] Initializing DummySwitch accessory...
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Generic Z-Wave Contact Sensor) stored in cache, remove device Sidewalk Contact sensor
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Yale Zigbee Lock) stored in cache, remove device Back Door Lock on TheHill476
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Yale Zigbee Lock) stored in cache, remove device Side Door Lock on TheHill476
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Yale Zigbee Lock) stored in cache, remove device Front Door Lock on TheHill476
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Configuration of cached accessories not done, wait for a bit... 37
Preparing Advertiser for 'Homebridge 9729' using bonjour-hap backend!
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Remove stale cache device Back Door Lock
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Remove stale cache device Side Door Lock
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Remove stale cache device Front Door Lock
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Starting receiver

Device Added - Name Back Door Lock on
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Device Added - Name Front Door Lock on
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Device Added - Name Side Door Lock on
[3/28/2021, 11:00:20 AM] [Hubitat MakerAPI hhm:0.4.13] Device Added - Name Sidewalk Contact sensor
I switched my Door locks over to Zigbee few days back funny thing is that's not all the locks I switched. Never had this happen until last update to Homebridge and homebridge UI The locks are really annoying because notifications default to on
The 4 devices I'm having problems with were added after update to homebridge. Maybe the latest HE update broke something oh well

Reboot didn't help and I don't see any errors or issue in the Hombridge log.

Yes, 2.2.6 might have caused this issue. I had other strange Homebridge/MakerAPI issues after updateing to 2.2.6 but I started the move to my C7 so I didn't bother at the time.

1 Like

I'm willing to bet if anyone else is running Homebridge plug-in via makerAPI and they add a new device to homebridge they will get the same problem. I just added a another device and got the same issue. All devices that were previously added not having the problem with.

1 Like

I have probably arrange my device in the Home app 10 times now just to have them in the default room after a Homebridge service restart. I will NOT arrange them again until this have been looked into a bit more. :slight_smile:

Maybe @bravenel or @mike.maxwell have an idea?

1 Like

Sorry, missed your post. My devices isn't disappearing though but I will try to disable my ATV as hub and see whats happening.

UPDATR Did not help. Devices are back to default room even with the ATV Home hub turned inactive.

Also tagging @dan.t - it is his Homebridge plugin, after all!

2 Likes

I would suggest to reset homebridge completely once

Here are the steps:

  1. Go to the home app on your phone, go the the home settings and remove the bridge under "Hubs & Bridges"
  2. Stop homebridge
  3. Delete the folder ~/.homebridge/accessories (e.g. rm -rf ~/.homebridge/accessories ). This depends a bit on your installation, Windows differs from Linux differs from HOOBS..
  4. Delete the folder ~/.homebridge/persist (e.g. rm -rf ~/.homebridge/persist ). This depends a bit on your installation, Windows differs from Linux differs from HOOBS..
  5. Start Homebridge
  6. re-add the bridge to the home app (scan the barcode)

Once this is done, I would just move one device to a room, restart homebridge and see if that works

This has really nothing todo with Hubitat or even the plugin, I have seen the Homekit database getting messed up with unique IDs tons of times during development. I think I have moved all of my items at least 78 times.. The only way to fix that was doing a full reset like descried above

3 Likes

Thanks a lot! I will try your steps and report back.

1 Like

I'll wait for you to give it try want to make sure it works before a go resetting everything just for 4 devices. If i add new devices the new devices have the same problem so.....

Have you tried to add a new device to homebridge? If so did you have this problem?

Not sure if I can answer that as I don’t have problems at the moment, however, I have experienced that multiple times during development

All room assignments are stored in HomeKit. HomeKit has its own database and it stores things like, rooms, names for accessories, automations and room assignments in that database. There is no “API” to interact with that.

I have seen that HomeKit got its database messed up badly at times. You might be successful when adding a never before seen device but it could still occur with the other devices.

Best path here is always a clean slate unless you are in the business of losing hair. :wink:

2 Likes

Homebridge Version: 2.7
Plugin Version: 0.4.13
[3/28/2021, 11:00:18 AM] Registering platform 'homebridge-hubitat-makerapi.Hubitat-MakerAPI'
[3/28/2021, 11:00:18 AM] ---
[3/28/2021, 11:00:18 AM] Loading 2 platforms...
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI] Initializing Hubitat-MakerAPI platform...
[3/28/2021, 11:00:18 AM] [Config] Initializing config platform...
[3/28/2021, 11:00:18 AM] [Config] Running in Service Mode
[3/28/2021, 11:00:18 AM] Loading 1 accessories...
[3/28/2021, 11:00:18 AM] [security switch] Initializing DummySwitch accessory...
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Generic Z-Wave Contact Sensor) stored in cache, remove device Sidewalk Contact sensor
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Yale Zigbee Lock) stored in cache, remove device Back Door Lock on TheHill476
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Yale Zigbee Lock) stored in cache, remove device Side Door Lock on TheHill476
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Invalid Device Indentifier Type (Yale Zigbee Lock) stored in cache, remove device Front Door Lock on TheHill476
[3/28/2021, 11:00:18 AM] [Hubitat MakerAPI hhm:0.4.13] Configuration of cached accessories not done, wait for a bit... 37
Preparing Advertiser for 'Homebridge 9729' using bonjour-hap backend!
I thought the problem was with MakerAPi because i get this when I restart

Unfortunately that did not work. :frowning:

I didn't think it would

Did you delete both folders? Looks like there is still some data there

Yes, both.

that's a new device never shared with maker

hmmmm.....

Ok, can someone post a log of rebooting homebridge, the reboot of when the device moves back to the "default room"?