ORVIBO Zigbee SmartRelay support

Hi!
I have ORVIBO RL804QZB relay box, that I use with zigbee2mqtt gateway. Now I’m trying to get work this relay with Mozilla IOT Gateway, but without any luck. WebThings GW recognizes this device as single On/Off switch. So I can control just one of three relay outputs. From ZigBee side this device has three endpoints and each endpoint controls its own relay output.
I will appreciate any advice.
My HW setup:

  • Raspberry Pi 3 B+
  • ConBee ZigBee dongle

Here is zb-xxxxxxx.json part:

“00124b001854820f”: {
“addr64”: “00124b001854820f”,
“addr16”: “11d3”,
“activeEndpoints”: {
“1”: {
“profileId”: “0104”,
“deviceId”: “000b”,
“deviceVersion”: 0,
“inputClusters”: [
“0000”,
“0005”,
“0004”,
“0006”
],
“outputClusters”: [
“0000”
],
“classifierAttributesPopulated”: true
},
“2”: {
“profileId”: “0104”,
“deviceId”: “000b”,
“deviceVersion”: 0,
“inputClusters”: [
“0000”,
“0005”,
“0004”,
“0006”
],
“outputClusters”: [
“0000”
],
“classifierAttributesPopulated”: true
},
“3”: {
“profileId”: “0104”,
“deviceId”: “000b”,
“deviceVersion”: 0,
“inputClusters”: [
“0000”,
“0005”,
“0004”,
“0006”
],
“outputClusters”: [
“0000”
],
“classifierAttributesPopulated”: true
}
},
“properties”: {
“on”: {
“name”: “on”,
“value”: false,
“visible”: true,
“title”: “On/Off”,
“type”: “boolean”,
@type”: “OnOffProperty”,
“profileId”: 260,
“endpoint”: 1,
“clusterId”: 6,
“attr”: “onOff”,
“attrId”: 0,
“fireAndForget”: false,
“bindNeeded”: false,
“configReportNeeded”: true,
“initialReadNeeded”: true
}
},
“name”: “zb-00124b001854820f-onOffSwitch”,
“type”: “onOffSwitch”,
@type”: [
“OnOffSwitch”
],
“defaultName”: “zb-00124b001854820f-onOffSwitch”,
“extendedTimeout”: true,
“activeEndpointsPopulated”: true,
“nodeInfoEndpointsPopulated”: true,
“modelId”: “82c167c95ed746cdbd21d6817f72c593”,
“powerSource”: 1,
“rxOnWhenIdle”: 1
},

I’ll see what I can do to add support for this. I haven’t played with zigbee multiple output devices before.

It turned out to be pretty simple. Are you running on the raspberry pi? Are you comfortable with manually installing an updated zigbee adapter to test this out with? You’ll need to login to the raspberry pi using one of the methods described here: https://github.com/mozilla-iot/wiki/wiki/Logging-into-the-Raspberry-Pi (probably SSH). You can enable SSH using the gateway under Settings->Developer->Enable SSH

Hi, Dave!

Yes, I’m running Rasp. Pi 3. I’m ready to follow your instructions

The addon to test can be found here:
https://s3-us-west-2.amazonaws.com/mozilla-gateway-addons/builder/zigbee-adapter-0.7.7-pr-124-linux-arm-v8.tgz

On the Pi, cd into the /home/pi/.mozilla-iot/addons, and do the following:

sudo systemctl stop mozilla-iot-gateway
mv zigbee-adapter ../zigbee-adapter-orig
wget https://s3-us-west-2.amazonaws.com/mozilla-gateway-addons/builder/zigbee-adapter-0.7.7-pr-124-linux-arm-v8.tgz 
tar xf zigbee-adapter-0.7.7-pr-124-linux-arm-v8.tgz
mv package zigbee-adapter
sudo systemctl start mozilla-iot-gateway

The SmartRelay should show up with the usual On/Off control for the first switch and a boolean on/off control for each additional switch.

I’ve tested new zigbee-adapter today. It is possible to control every relay output now, but It works very strange.
After couple On/off actions the gateway stops to send request to zigbee devices (I don’t know about other types - I have zigbee only). I continue to click on/off for every relay output every second, but relay does not react. It looks like these actions are placed to some sort of queue and every 20-30 seconds gateway send bursts of on/off requests to the relay. When gateway is in such stalled state I cannot even add or delete Things. I updated my ConBee dongle to the latest firmware deCONZ_Rpi_0x26330500. I rolled back zigbee-adapter to the original version - problem persists. If I don’t switch on/of relay outputs (or remove relay from gateway) - problem does not appear.

Here is log in a time period, when I’m clicking On/Off every second.

May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.478 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZDO 0013 End Device Announcement (0x0013) status: success (0)
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.482 INFO : zigbee: Rcvd: Addr:00124b001854820f 0aa3 FFD:1 AC:1 rxOnWhenIdle:1
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.486 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff configReport **<--- this happens regularly.** **Looks like the relay does not answer to this request**
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.489 INFO : zigbee: Sent: payload: [ { direction: 0,
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.491 INFO : zigbee: attrId: 0,
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.494 INFO : zigbee: dataType: 16,
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.497 INFO : zigbee: minRepInterval: 1,
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.499 INFO : zigbee: maxRepInterval: 120,
May 28 09:02:42 gateway run-app.sh[535]: 2019-05-28 09:02:42.502 INFO : zigbee: repChange: 1 } ]
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.495 INFO : zigbee: Resending (2/3) ...
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.499 INFO : zigbee: ReSent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff configReport
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.501 INFO : zigbee: ReSent: payload: [ { direction: 0,
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.504 INFO : zigbee: attrId: 0,
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.507 INFO : zigbee: dataType: 16,
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.509 INFO : zigbee: minRepInterval: 1,
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.512 INFO : zigbee: maxRepInterval: 120,
May 28 09:02:52 gateway run-app.sh[535]: 2019-05-28 09:02:52.515 INFO : zigbee: repChange: 1 } ]
May 28 09:02:55 gateway run-app.sh[535]: 2019-05-28 09:02:55.968 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.505 INFO : zigbee: Resending (3/3) ...
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.509 INFO : zigbee: ReSent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff configReport
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.514 INFO : zigbee: ReSent: payload: [ { direction: 0,
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.518 INFO : zigbee: attrId: 0,
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.520 INFO : zigbee: dataType: 16,
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.523 INFO : zigbee: minRepInterval: 1,
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.526 INFO : zigbee: maxRepInterval: 120,
May 28 09:03:02 gateway run-app.sh[535]: 2019-05-28 09:03:02.529 INFO : zigbee: repChange: 1 } ]
May 28 09:03:11 gateway run-app.sh[535]: 2019-05-28 09:03:11.046 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response
May 28 09:03:26 gateway run-app.sh[535]: 2019-05-28 09:03:26.139 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response
May 28 09:03:41 gateway run-app.sh[535]: 2019-05-28 09:03:41.232 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.038 INFO : zigbee: setProperty property: on2 for: zb-00124b001854820f-Node profileId: 0104 endpoint: 3 clusterId: 0006 zcl: on value: true May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.040 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff on
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.043 INFO : zigbee: Sent: payload: []
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.046 INFO : zigbee: setProperty property: on for: zb-00124b001854820f-Node profileId: 0104 endpoint: 1 clusterId: 0006 zcl: on value: true
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.076 INFO : zigbee: setProperty property: on2 for: zb-00124b001854820f-Node profileId: 0104 endpoint: 3 clusterId: 0006 zcl: on value: true
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.130 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.134 INFO : zigbee: Rcvd: payload: { cmdId: 1, statusCode: 0 }
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.136 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff on
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.138 INFO : zigbee: Sent: payload: []
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.236 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.240 INFO : zigbee: Rcvd: payload: { cmdId: 1, statusCode: 0 }
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.243 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff on
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.246 INFO : zigbee: Sent: payload: []
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.325 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.330 INFO : zigbee: setProperty property: on2 for: zb-00124b001854820f-Node profileId: 0104 endpoint: 3 clusterId: 0006 zcl: off value: false
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.348 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.352 INFO : zigbee: Rcvd: payload: { cmdId: 1, statusCode: 0 }
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.355 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff off
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.358 INFO : zigbee: Sent: payload: []
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.460 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.465 INFO : zigbee: Rcvd: payload: { cmdId: 0, statusCode: 0 }
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.468 INFO : zigbee: setProperty property: on2 for: zb-00124b001854820f-Node profileId: 0104 endpoint: 3 clusterId: 0006 zcl: on value: true
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.472 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff on
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.474 INFO : zigbee: Sent: payload: []
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.572 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.576 INFO : zigbee: Rcvd: payload: { cmdId: 1, statusCode: 0 }
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.976 INFO : zigbee: setProperty property: on2 for: zb-00124b001854820f-Node profileId: 0104 endpoint: 3 clusterId: 0006 zcl: off value: false
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.979 INFO : zigbee: Sent: Explicit Tx 00124b001854820f ZHA 0006 genOnOff off
May 28 09:03:56 gateway run-app.sh[535]: 2019-05-28 09:03:56.981 INFO : zigbee: Sent: payload: []
May 28 09:03:57 gateway run-app.sh[535]: 2019-05-28 09:03:57.068 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:03:57 gateway run-app.sh[535]: 2019-05-28 09:03:57.073 INFO : zigbee: Rcvd: payload: { cmdId: 0, statusCode: 0 }
May 28 09:04:03 gateway run-app.sh[535]: 2019-05-28 09:04:03.486 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:04:03 gateway run-app.sh[535]: 2019-05-28 09:04:03.490 INFO : zigbee: Rcvd: payload: { cmdId: 1, statusCode: 0 }
May 28 09:04:04 gateway run-app.sh[535]: 2019-05-28 09:04:04.078 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:04:04 gateway run-app.sh[535]: 2019-05-28 09:04:04.082 INFO : zigbee: Rcvd: payload: { cmdId: 0, statusCode: 0 }
May 28 09:04:10 gateway run-app.sh[535]: 2019-05-28 09:04:10.816 INFO : zigbee: Rcvd: Explicit Rx 00124b001854820f ZHA 0006 genOnOff defaultRsp
May 28 09:04:10 gateway run-app.sh[535]: 2019-05-28 09:04:10.819 INFO : zigbee: Rcvd: payload: { cmdId: 0, statusCode: 0 }
May 28 09:04:11 gateway run-app.sh[535]: 2019-05-28 09:04:11.401 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response
May 28 09:04:26 gateway run-app.sh[535]: 2019-05-28 09:04:26.494 INFO : zigbee: Rcvd: Mac Poll (0x1c) Response

I made some experiments. When I set for this device fireAndForget = true, configReportNeeded = false, bindNeeded = true - everything works perfectly.

I’ll add a check in the classifier and set fireAndForget to true. That will cause configReportNeeded to be false, which will in turn cause bindNeeded to be false (binding is only need to receive the config reports).

I created a new version of the adapter which you can find here:
https://s3-us-west-2.amazonaws.com/mozilla-gateway-addons/builder/zigbee-adapter-0.7.8-pr-124-linux-arm-v8.tgz

It sets fireAndForget if it detects the ORVIBO.

Hi, Dave.
I installed new zigbee-adapter and the relay works fine as expected.
FYI, I have two ORVIBO relays and both of them have modelid == 82c167c95ed746cdbd21d6817f72c593.
Thanks a lot for your assistance.