bradsjm / hubitat-public

My Published Hubitat Drivers. No longer actively maintained but pull requests accepted.
MIT License
23 stars 21 forks source link

Update to ratgdo driver breaks integration with hubitat #32

Open therealj4nd3rs0n opened 6 months ago

therealj4nd3rs0n commented 6 months ago

I originally installed the esphome and ratgod packages using HPM and they worked amazingly well, for which I am very grateful. I installed the most recent version as of 3/4/24 using Hubitat Package Manager and the integration broke completely. In 'events' for the device I get the error:

Garage Door is offline: Cannot invoke method multiply() on null object

Looking at the logs I see:

java.lang.NullPointerException: Cannot invoke method multiply() on null object on line 257 (method initialize)

I have not been able to find the exact source of the issue, but I can confirm that manually reverting to the original ratgdo driver by copying the code from the 6015892 commit and pasting it into the drivers code in hubitat solves the issue

bradsjm commented 6 months ago

Thanks, looks like when @ady624 did some refactoring the null checks were removed for some reason. I've added a null check for message.position back to hopefully fix your problem.

therealj4nd3rs0n commented 6 months ago

The fix you added did the trick, I copy/pasted your new version into hubitat and both my ratgdo openers are back in good working order. Thank you for the incredibly quick fix!