Open WayneManion opened 4 years ago
I hacked up the code in gateway.py a little bit to get a better look at where things were getting stuck. I also commented out the lines 373 & 374 of gateway.py so the script doesn't just crash.
It seems like it takes a long time (over a minute) to perform the instruction (line 370):
result = e.wait(timeout)
inside the _DoCommand() function when command 5330 (payload 15) is issued.
Another quirk is that the result of command 532E is 21 sensors (the correct number), but after 5330 finally finishes executing, it gves a list with either 19 or 20 sensors in it. The number of sensors seems to bounce randomly between 19 and 20.
I've been playing with the sample.py script. I have a whole bunch of sensors, all but one of which reliably generate output like:
I keep getting this output when one of my sensors changes state:
When I change line 32 in sample.py from:
to:
The data in e.MAC is shown on screen as "u\x00\x00\x00\x00\x00\x00\x00\x00". I'm not really sure what this means. I changed the code in the unpair function (because it won't run unless given precisely eight digits) to just send "\x00\x00\x00\x00\x00\x00\x00\x00" to the hub and that seems to unpair the device. I can pair it up again just fine, but it still has that empty/nonsense MAC ID.
This misbehaving (?) sensor may have something to do with the issue I created earlier.