google-home / smart-home-java

Apache License 2.0
92 stars 47 forks source link

onExecute handling command OnOff causes Null pointer exception #8

Closed murilobaliego closed 4 years ago

murilobaliego commented 4 years ago

After trying to turn on switch on mobile app the command OnOf handling causes the fault below, any help is welcome.

command_OnOff_causing_NullPtrException

Fleker commented 4 years ago

Looks like it fails when Firestore tries to lookup the states.online property in the document. If that doesn't exist, it would throw the NullPointerException.

murilobaliego commented 4 years ago

Yes, that is exactly what happens :) thanks. I was using Postman to create the devices. Now I'm using front-end application and the data model is correct.