Leiaz/python-awox-mesh-light

Unable to access functions or values in awoxmeshlight

Opened this issue · 4 comments

I have written some Python using awoxmeshlight, and can see that I can connect (I think!).
I used the function dir() to see the elements within awoxmeshlight, but if I try to call e.g. AwoxMeshLight.readStatus() then it crashes as does any other method- and if I try to get the value of e.g. red/ ... it crashes. However, I can read the password, mesh name and the mac address.
I could only get connect to work with retries.
I have looked for examples and found no examples using e.g. on/ off/ readStatus/ ...
Therefore, my only guide has been to look at the source, which is why I don't understand why I cannot access e.g. white_brightness/ turn the lamp on or off ....
Many thanks for any help.

The error I get when executing the method on() is
File "[path]/.local/lib/python3.10/site-packages/awoxmeshlight/__init__.py", line 300, in on self.writeCommand (C_POWER, b'\x01') File "[path]/.local/lib/python3.10/site-packages/awoxmeshlight/__init__.py", line 226, in writeCommand assert (self.session_key) AssertionError
I then tried to use the writeCommand using the parameters in the error, and got:-
File "[path]/.local/lib/python3.10/site-packages/awoxmeshlight/__init__.py", line 226, in writeCommand assert (self.session_key) AssertionError
Any help would be appreciated as to how to determine what I am doign wronmg.
Many thanks,

I have ensured that bluepy and pycryptodome are installed.
I have seen that before using connect or connectWithRetry, using mylight = awoxmeshlight.AwoxMeshLight (AWOX_EGLO_BUL_MAC, AWOX_USER, AWOX_PASS) it shows that the mesh pwd and mesh name are visible, but if I connect - there isn't an error, it merely returns "false" at best.
I am running the AWOX light on its own, without any home automation.
Any clues as to what I am doing wrong?
Many thanks,

Is anyone able to advise, as I cannot get this to work, and I would like to have it working...
Many thanks,