fairecasoimeme / ZiGate

Zigate is an Universal Zigbee Gateway
http://zigate.fr
171 stars 59 forks source link

Support de la télécommande ikea Tradfri #64

Closed ChoOo7 closed 5 years ago

ChoOo7 commented 5 years ago

Bonjour

J'ai bien lu ton article https://faire-ca-soi-meme.fr/test/2017/06/06/ikea-tradfri-zigbee-3-0-compatibilite-zigate/

Ce que je cherche à faire, ce n'est pas d'associer ma télécommande à une lampe, mais à associer la télécommande à ma zigate, pour ensuite binder les événements sur le broker pour lancer diverses actions.

Je n'arrive pas à associer la télécommande à la zigate / à recevoir des evenements

Lorsque je tiens le bouton appuyé 10 seconde,s rien coté zigate

Et si je fias un factory reset, j'arrive à avoir des choses string(26) "zigate/device_changed/38b8" string(128) "{"endpoints": [], "addr": "38b8", "info": {"addr": "38b8", "ieee": "d0cf5efffe05aa5d", "mac_capability": "10000000", "rssi": 3}}" string(4) "XXXX" string(26) "zigate/device_changed/38b8" string(128) "{"endpoints": [], "addr": "38b8", "info": {"addr": "38b8", "ieee": "d0cf5efffe05aa5d", "mac_capability": "10000000", "rssi": 3}}"

Mais rien ensuite concernant les clics sur les boutons

Est-ce quelque chose de possible ?

Merci

pipiche38 commented 5 years ago

Decode80A7:

SQN int8 EP int8 ClusterID Int16 Cmd int8 Direction int8 ?? int16 + int8 ( most likely related to scene number) Source Address: int16

ISO-B commented 5 years ago

I couldn't figure what those extra values are so I left them undecoded.

uint8 u8Direction; uint8 u8Attr1; uint8 u8Attr2; uint8 u8Attr3;

pipiche38 commented 5 years ago

@ISO-B thanks for such work, this is really moving Zigate ahead

KiwiHC16 commented 5 years ago

Very good, all working this morning !!! The only thing I can't get the the hold state for Left and Right button (link to my remote firmware ?). Thanks a lot @ISO-B

pipiche38 commented 5 years ago

It does work, but still (with the early announcement version from @fairecasoimeme ), I do not get:

0x8060 when adding 0x0000 to a group

When requesting for Group Membership to 0x0000 , I'm getting 5 times 0xffff and not the network address which Zigate belongs too.

ISO-B commented 5 years ago

@KiwiHC16 Can you test with doudz python library? It should show left and right holds. If it doesn't then it is probably firmware related.

@pipiche38 latest release on Github v3.0f_PR doesn't have that fix. You can build binary from my fork if you are in hurry. I think that fairecasoimeme will test my PR before accepting it.

pipiche38 commented 5 years ago

@ISO-B I do confirm that hold left/right works with the version I've got from Akila.

The V3.0f I'm refering is one I got from Akila end of last week, and would tend to agree that your PR is not in, but must be in before a full release.

KiwiHC16 commented 5 years ago

@fairecasoimeme told me that he will look at the PR probably before releasing 3.0f. I can't see any message on air interface so I guess it's due to the ikea remote firmware. I will connect it to Ikea GW and see if an OTA will be done. If so I'll check again the hold button situation.

KiwiHC16 commented 5 years ago

I put the remote to the Ikea GW and no upgrade was done. I'm back on ZiGate and I have the hold as expected. I did probably shut my eyes yesterday when I was holding the buttons... So all perfect.

pipiche38 commented 5 years ago

Currently doing some implementation test, and I have some difficulties to decode the Left/Right Release message on message 0x80A7

As command is concerned I receive 0x09 - Which is inline with your work @ISO-B But as Direction and Unknown, this seems to be more challenging and not straightforward.

Like the Direction and Unknown value could be more related to the Time of the hold rather than if it was left or right.As well this message seems coming several time

ISO-B commented 5 years ago

I couldn't figure release message payload. I also tough time but values seemed to be all over place, like long press one time had big value and sometimes short. Release is always related to button that is last pressed, since you can only press on button. Maybe I need to switch release to use direction 2 so it would be unknown.

pipiche38 commented 5 years ago

Ok, so then we are on the same page !

lsteelandt commented 5 years ago

Hi @fairecasoimeme, in your comment below in bold, I don't know how to pair the ikea remote with Zigate.

.......

1- pair remote and outlet with zigate 2- add 0000 group to remote control 3- add 0000 group to outlet ......

Using Test_GUI (ZGWUI), I put the Zigate in PermitJoin (Blue led blinking). I hold the IKEA remote button (The square On/off one), see at one moment the red led slowly flashing but nothing seems to be receive by the Zigate (no mouvement on text box "Received Message).

Can you give some detail of how to pair the Ikea remote with the Zigate ?

Thanks, Luc

ISO-B commented 5 years ago

Put ZiGate to permit join mode and press 4 times Ikea remote touch link button within 5 seconds or so.

pipiche38 commented 5 years ago

Should be closed, as this is fixed since 3.0f