python-awox-mesh-light icon indicating copy to clipboard operation
python-awox-mesh-light copied to clipboard

setMesh(), light.off()... raises an Assertion Error

Open matthiaaas opened this issue 6 years ago • 7 comments

Hey Leiaz,

I get an error when I try to interact with my bulb. It works well to connect and disconnect but when I try to do setMesh(), light.off() or something else it raises an AssertionError and I've no idea why. Ignoring this and continuing executing the script doesn't work and the error still exists.

Help would be awesome.

Regards

matthiaaas avatar Mar 02 '19 18:03 matthiaaas

The complete error message would be helpful.

Leiaz avatar Mar 02 '19 18:03 Leiaz

Traceback (most recent call last):
	File "/home/pi/.../python-awox-mesh-light/main.py", line 17, in <module>
		mylight.setMesh("mesh_name", "mesh_pwd", "mesh_key")
	File "/home/pi/.../python-awox-mesh-light/awoxmeshlight/__init__.py", line 152, in setMesh
		assert (self.session_key)
	AssertionError

matthiaaas avatar Mar 02 '19 18:03 matthiaaas

It means there is no session_key . Did you check if connect returned True ?

Leiaz avatar Mar 02 '19 18:03 Leiaz

It's False. What's the problem?

matthiaaas avatar Mar 02 '19 19:03 matthiaaas

You can try to get more info with the debug messages see here.

Leiaz avatar Mar 02 '19 19:03 Leiaz

Yes, it raises and Auth error. Something is wrong with the password and/or the name of the bulb.

matthiaaas avatar Mar 03 '19 12:03 matthiaaas

If you used the AWOX app, you have to get the password from the app in some way, or reset the light to default password, if you don't want to keep using the app.

Some sniffed the packets sent by the app, if you have root access to your android device, with adb root for instance, you can try looking in the app config files (in /data/, although I didn't check).

Leiaz avatar Mar 03 '19 13:03 Leiaz