NullPointerException when using HPM

Ok cool, that confirms the location object is there but the hub part is empty.

I will try to get staff attention here.

Thanks ! !

This app saves, installs, and works. It pulls in data on each line like you indicate it should.

Not that I doubt your coding skills, just confirming for @racooke that the app works, and that they should be getting data without any errors.

They said above it errors as written. They have to comment out the location.hub part to avoid an error. Because it cannot traverse that object due to it being null.

Then like that it shows the top section and that location.hub is null.

I could add in a null check and have it print it fails and is null instead of tossing an error but would come to the same conclusion.

1 Like

@jtp10181, not sure what @neonturbo means 'that the app works' . I presume they mean your test app but it does not work when trying to access the properties of location.hub.
Surely he is not saying that location.hub should be null.

I see this is a lost cause and will 'soft reset' the database and start from scratch.

Jeff, thanks again for your input and help.

Noted. Not sure how, that shouldn't happen, like, ever.

Can you PM me the hub id? I'll take a look.

1 Like

I was confirming that the test app did not bomb out, and it did give valid information, 22 lines and 19 lines as Jeff indicated above.

All I am saying that I am getting what Jeff did, not what you did. In other words, it isn't his app, it is something particular to your hub. I was testing his code to verify that it could give valid data on my properly working hub but a different hub setup different from his (and yours).

I was not getting nulls anywhere in those lines of output in his app. Yours is misbehaving. I was not implying that null was normal, nor did I say that anywhere. Maybe I wasn't clear about that, but I did say it was working and giving valid data. Not sure how you came to the conclusion that I got any nulls, I surely would have mentioned that instead of saying It pulls in data on each line like you indicate it should.

Sorry for trying to help, I guess I won't give any further feedback.

I have no idea how the issue happened, but the next release will have a fix.

4 Likes

Yay, thanks. I was hoping that they saw your message before working on the reset and start over approach.

Thanks Victor, @gopher.ny

Looking forward to the fix.

1 Like

Victor @gopher.ny, I just updated this HUB to 2.4.2.118 and this problem is indeed fixed. Thanks.

Jeff @jtp10181 , thanks again for the diagnostic app that confirmed the problem in 'black and white' what was suspected from the behavior of HPM and other apps that needed location.hub properties. BTW, I do also now get 22 location properties and 19 location.hub properties returned from your test app :slight_smile:

Closing this issue.

3 Likes

Guys, I'm beginner in hubitat world, I get the same problem in C8, my firmware is 2.4.3.137.

Can U help me?

Can you post a screen shot of the error log?