-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiaomi aqara cube not functionning #111
Comments
@nx345 do you have the possibility to put the plugin in Debug mode ( Python only ) , and then it might be appropriate to attach the logfile . |
@pipiche38 How can in put the plugin in debug mode ? Is there any documentation on this ? |
@nx345, from Domoticz |
2018-08-06 08:49:32.759 (zigate) Envoie une demande Active Endpoint request pour avoir la liste des EP du device adresse : 402f |
Super ... Could you let me know what should be expected ? As from the source code I see that there is this value coming from Cube Xiaomi, but not expected ! Is one of them ?
|
When I flip the cube with 90 degrees it should trigger and http request that turn on a lamp. The http url has been tested successfully on a web browser. Then I added this url to the cube (flip 90). |
@nx345 could you have a look to the French forum. I have send you an email. I would you send you a revised version of the plugin. BTW, the problem you got with Debug mode is not the same as the 1st one :-( |
By chance, when you do it with the browser, do you have any values which might be return when doing this action ? For instance in that case the value was "0002" which was not expected in the plugin |
I found this interesting thread where I thing the Cube has been reverse-engineering dresden-elektronik/deconz-rest-plugin#138 (comment) I was as well. Let's renumber the sides, so opposite sides add up to 7 (and the opposite side can be computed by 7 - side). Taking a small sample of the dice I have at home, with 1 on top and 2 on front, 3 is on the right. So the numbers would become:
+---+---+---+ where side 2 holds the MI logo and side 6 has the battery door.
The cube doesn't know its orientation. It only knows that you flip to side 1 from side 3, which could be front, right, back, left, depending on the orientation.
Let's try that for now. We need to add 7000 for gestures where there's no side (shake, rotate). As for the action, I would use the previous side here, with 0 for push, the same side for double tap, the opposite side for 180° flip, and the other four sides for 90° flip. This leads to:
|
One more information from the net :
|
I ahve also investigated into domoticz and Xiaomi Gateway implements the Cube switch selector with those levels Which seems not be in sync with what the Zigate plugin implements ! |
I have created a development branch in order to work on that issue independently to the master. |
Fully implemented in developement branch a5cfad2 |
I have installed the latest version of domoticz-zigate and correctly added a xiaomi aqara cube under domoticz. When I want for instance to trigger an action with the cube at 90 degrees I have this error message in my logs :
2018-08-05 12:25:50.157 Error: (zigate) 'onMessage' failed 'KeyError'.
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 311 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function onMessage
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 118 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function onMessage
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 382 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function ZigateDecode
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 626 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function ZigateRead
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 808 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function Decode8102
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 1374 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function ReadCluster
2018-08-05 12:25:50.157 Error: (zigate) ----> Line 955 in /home/pi/domoticz/plugins/Domoticz-Zigate/plugin.py, function MajDomoDevice
Therefore this does not trigger the action I want.
It seems like there is a problem with the plugin at these line aforementioned.
The text was updated successfully, but these errors were encountered: