Skip to content
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

Receiving commands from Sunricher Zigbee directly with ConBee II #5

Open
Wim-N opened this issue Jan 7, 2021 · 4 comments
Open

Receiving commands from Sunricher Zigbee directly with ConBee II #5

Wim-N opened this issue Jan 7, 2021 · 4 comments

Comments

@Wim-N
Copy link

Wim-N commented Jan 7, 2021

For an automation system I would like to receive commands from a Sunricher ZGRC-KEY-013 (firmware 2.5.3_r20) Zigbee remote control using a ConBee II (version 2.05.84 / 9/14/2020, firmware 26660700) on a Raspberry Pi 4 using Python 3. So I'm not using deCONZ.

I have found 'Serial protocol' version 1.14 (2019-05-25), but that seems to be a little outdated according to other topics. Do you have a newer version of the protocol?

Using deCONZ the remote control is linked to the ConBee II. When you open deCONZ both are visible and when you press a key a green line appears to the left off both connecting them.

Using some demo code I have written a Python program that can communicate with the ConBee II via the SLIP protocol and also full CRC support is implemented.

So far so good.

But when I press a key on the remote control the ConBee II sends a message and the program responds:

Rx: 29-10-2020 15:47:51.099 1C-03-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:51.102 0E-04-00-07-00-AA-00
Rx: Device state changed [0x0E]: Status: Success, Network: connected, APSE-DATA indication, APSE-DATA request free slots
Tx: APS_DATA_INDICATION request
Tx: C0-04-04-00-07-00-00-00-F1-FF-C0
Rx: 29-10-2020 15:47:51.105 1C-05-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:51.107 04-04-05-08-00-01-00-2A
Rx: Query Send Data State Response, short [0x04]; Status: Error
Tx: Read Received Data Request request
Tx: C0-17-04-00-08-00-01-DC-FF-C0
Rx: 29-10-2020 15:47:51.171 1C-05-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:52.083 0E-06-00-07-00-AA-00
Rx: Device state changed [0x0E]: Status: Success, Network: connected, APSE-DATA indication, APSE-DATA request free slots
Tx: APS_DATA_INDICATION request
Tx: C0-04-06-00-07-00-00-00-EF-FF-C0
Rx: 29-10-2020 15:47:52.086 1C-07-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:52.089 04-06-05-08-00-01-00-2A
Rx: Query Send Data State Response, short [0x04]; Status: Error
Tx: Read Received Data Request request
Tx: C0-17-06-00-08-00-01-DA-FF-C0
Rx: 29-10-2020 15:47:53.090 1C-07-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:54.193 0E-08-00-07-00-AA-00
Rx: Device state changed [0x0E]: Status: Success, Network: connected, APSE-DATA indication, APSE-DATA request free slots
Tx: APS_DATA_INDICATION request
Tx: C0-04-08-00-07-00-00-00-ED-FF-C0
Rx: 29-10-2020 15:47:54.195 1C-09-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:54.197 04-08-05-08-00-01-00-2A
Rx: Query Send Data State Response, short [0x04]; Status: Error
Tx: Read Received Data Request request
Tx: C0-17-08-00-08-00-01-D8-FF-C0
Rx: 29-10-2020 15:47:55.115 1C-09-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:56.217 1C-0A-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225
Rx: 29-10-2020 15:47:57.137 1C-0B-00-0C-00-05-00-02-0F-8B-FF-E1
Rx: MAC Poll Notification [0x1C]: Status: Success, NWK: 8B-0F, LQI = 255, RSSI = 225

The ConBee II reports an error at the [0x04] message so something is going wrong. And whatever key I press, I cannot find some info about what key was pressed on the remote control.

Is there a description about the sequence of messages needed while communicating with the ConBee II to get some info about the key being pressed?

This is the used configuration:

Host system: Raspberry Pi 4
Running method: Raspbian
Firmware version: (26660700) ConBee II (version 2.05.84 / 9/14/2020, firmware 26660700)
deCONZ version: (2.05.84)
Device: ConBee II and Sunricher ZGRC-KEY-013 (firmware 2.5.3_r20) Zigbee remote control
@Wim-N
Copy link
Author

Wim-N commented Jan 12, 2021

When I start my program I send a 0x07 message:
15:56:16.469 Tx: 00 DEVICE_STATE request [0x07] 15:56:16.470 Tx: RAW: C0-07-00-00-08-00-00-00-00-F1-FF-C0 15:56:16.573 Rx: Data: 07-00-00-08-00-A2-00-00 15:56:16.573 Rx: 00 Device state [0x07]: Status: Success, Network: connected, APSE-DATA request free slots

That seems to be ok.

When I press a key on the remote this happens:
15:56:21.586 Rx: Data: 1C-01-00-0C-00-05-00-02-7E-C7-FF-D7 15:56:21.586 Rx: 01 MAC Poll Notification [0x1C]: Status: Success, NWK: C7-7E, LQI = 255, RSSI = 215 15:56:21.588 Rx: Data: 0E-02-00-07-00-AA-00 15:56:21.588 Rx: 02 Device state changed [0x0E]: Status: Success, Network: connected, APSE-DATA indication, APSE-DATA request free slots 15:56:21.589 TX: 02 APS_DATA_INDICATION request [0x17] 15:56:21.589 Tx: RAW: C0-17-02-00-08-00-01-00-01-DD-FF-C0 15:56:21.591 Rx: Data: 1C-03-00-0C-00-05-00-02-7E-C7-FF-D7 15:56:21.592 Rx: 03 MAC Poll Notification [0x1C]: Status: Success, NWK: C7-7E, LQI = 255, RSSI = 215 15:56:21.598 Rx: Data: 17-02-00-2A-00-23-00-22-02-FD-FF-00-02-7E-C7-00-00-00-13-00-0C-00-C9-7E-C7-CE-09-15-FE-FF-81-8E-58-80-00-AF-FF-65-AD-19-00-D7 15:56:21.599 Rx: 02 Read Received Data Response [0x17]; Status: Success, Destination NWK = FF-FD:0, Source NWK = C7-7E:0, APS frame payload: C9-7E-C7-CE-09-15-FE-FF-81-8E-58-80, LQI = 255, RSSI = -41dBm 15:56:21.599 Rx: 02 ---- 0 80 15:56:21.599 Tx: 02 APS_DATA_CONFIRM [0x04] 15:56:21.599 Tx: RAW: C0-04-02-00-07-00-00-00-F3-FF-C0 15:56:21.599 Tx: 03 DEVICE_STATE request [0x07] 15:56:21.600 Tx: RAW: C0-07-03-00-08-00-00-00-00-EE-FF-C0 15:56:21.602 Rx: Data: 04-02-05-08-00-01-00-22 15:56:21.602 Rx: 02 Query Send Data State Response, short [0x04]; Status: Error

From previous discussions I understand that I can skip the 'MAC poll notification'.

First I get a 'MAC poll notification' and a 'Device state changed' which is to be expected. Then I try to get the data with an 'APS_DATA_INDICATION request'. Then I receive a 'Read Received data response'. One of the problems is how to find out what the payload means.
Then the programs responds with a 'APS_DATA_CONFIRM' for the received data.
But then the program receives an error status from the ConBee II, so what's wrong?

@Wim-N
Copy link
Author

Wim-N commented Jan 18, 2021

Also tried deConz with Home Assistant. The only info which I get from the remote control is the battery level. How can I get information about which key is being pressed so HA can respond to it??

@NickInManchester
Copy link

I've got 2 Sunricher LED strips working via Conbee II, to Phoscon to Home Assistant. But I also have a Sunricher wall switch which I either do not understand or deConz seems not to be able to talk to correctly.

I've tried, using Phoscon to pair it as a switch -> other; but the "Ready" button is not available. I also tried it as a light and as a sensor as, for example, my INNR time switches pair as lights not as switches but after pairing work perfectly from both Phoscon and Home Assistant.

The Sunricher switch is:

Sunricher ZIGBEE 4 Group RGBW Wall Panel White (Mains powered)
Product Code: SRZG9001T4RGBWWH
Bought from: https://www.ledtechnologies.co.uk/sunricher-4-group-rgbw-zigbee-wall-panel-white-mains-powered.html
** There are several similar Sunricher switches with slightly different capabilities **

I followed the pairing instructions and from the switch's perspective it appeared to pair by flashing its LED the right number of times. Nothing happens in Phoscon so I swapped to deConz which I have not used before and find confusing as a newbie to it. It did appear that there was a new non Sunricher node in the deConz diagram (I might be wrong here) as well as my 2 LED strips. I took some screenshots which are hopefully not giving away too much privacy information and are attached. These are of my Phoscon lights device page, the two SunRicher LED strips selected in deConz and what I think might be the new device after semi-pairing the Sunricher switch.

Can anybody tell me what I should do to try and get this switch paired and usable. It can be paired point-to-point with the led strips but I want to go via the Conbee II as everything else uses this successfully.

With thanks for any help/advice.

Nick
deConzScreenshot-Possibly-SunricherDevice
deConzScreenshot-Sunricher2ndLEDTape
deConzScreenshot-SunricherLEDTape
PhosconPairedLights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants