New Homebridge Plug-in via MakerAPI

you'll see the problem if there is one as soon as you share a device through makerapi then restart homebridge. The devices end up getting deleted then added back ...any new device

I just upgraded my hub to 2.2.6 while homebridge is running and it didn't blow up.

However, there is clearly something wrong as I can see the wrong device type in the logs posted above. I am still poking at it

1 Like

One question, what operating system are you on? Linux, Windows, HOOBS?

linux

Iā€™m on HOOBS.

and you are sure that you deleted the homebridge files? It is important that homebridge is not running when you do that. The one file that keeps all of these cache entries is a file called "cachedAccessories". It is in the folder ~/.homebridge/accessories

Can you stop homebridge, cd in that folder, delete that file, double check that it is really deleted (ls -l) and than restart homebridge?

yes deleted everything. If there really is a problem all you have to do to see what i'm talking about is go into MakerApi and add a device that has not been previously shared. Anything new gets the problem my 48 or so other devices had no problem until i started over completely. If your starting from scratch all devices will have a problem and get deleted then added back as soon as you have to restart homebridge.

I have created about 10 virtual devices by now trying to replicate your issue. So far, no luck, it get's added as it should. Still looking though...

1 Like

have you restarted homebridge?

Yes, I am rolling back my other hub to see if I can see a difference on the MakerAPI output, there is something somewhere...

2 Likes

I think I found something, stay tuned... need to think this through...

1 Like

image

I just published a new version 0.4.14
There is a new json variable on MakerAPI in 2.2.6 that caused this. A very unfortunate naming problem...

Give it a try. On first boot, the "faulty" additions will get removed but it should be fixed for all subsequent reboots

5 Likes

I will try it right away and report back.

@dan.t Do you know how to force an update in HOOBS? It's still listed as 0.4.13 but npm is 0.4.14...

image

Sometimes it just takes some time until it is all replicated over the internet.

1 Like

But... but... but, I want to try the update NOW! :wink:

Thanks for taking the time to fix this Dan.t , was driving me :crazy_face:
at least i learned a lot and now have 2 different Homebridge's running

3 Likes

Crappy HOOBS that dosnt update the version numbers of the plugins. I too want this. Family is almost killing me by now. :slight_smile:
But at least I can let them know that if they let me live for another day or two, I will get things fixed...

2 Likes

I couldn't update to 0.4.14 yesterday and when I could this morning, I could not add Homebridge back to the Home app. I tried everything but nothing worked, so I decided to reinstall.
I switch over to Homebridge (from HOOBS) own image and everything is now working perfect again.

Great work @dan.t !!!

2 Likes

Upgraded to 2.2.6.139 yesterday and am seeing the following in the HB logs about every 5 minutes:

[4/8/2021, 7:56:49 AM] [Hubitat MakerAPI hhm:0.4.14] Received an error trying to get the device summary information from Hubitat. TypeError: Cannot read property 'deviceid' of undefined
at /usr/local/lib/node_modules/homebridge-hubitat-makerapi/index.js:376:71
at new Promise (<anonymous>)
at HE_ST_Platform.updateDevices (/usr/local/lib/node_modules/homebridge-hubitat-makerapi/index.js:371:16)
at /usr/local/lib/node_modules/homebridge-hubitat-makerapi/index.js:503:25
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
[4/8/2021, 7:56:49 AM] [Hubitat MakerAPI hhm:0.4.14] I am stopping my reload here and hope eveything fixes themselves (e.g. a firmware update of HE is rebooting the hub

Anyone else seeing this? Plug-in v0.4.14, using HB pre-configured image on RPi4. HE hub is C-5.

UPDATE: Restarting Homebridge seems to have fixed this. It's been 15 minutes since the restart and I'm not seeing this entry in the logs. :man_shrugging:t2: