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

Axis Gear Zigbee Shade is not supported #3057

Closed
seafoodrice opened this issue Jul 19, 2020 · 66 comments · Fixed by #3120
Closed

Axis Gear Zigbee Shade is not supported #3057

seafoodrice opened this issue Jul 19, 2020 · 66 comments · Fixed by #3120

Comments

@seafoodrice
Copy link

seafoodrice commented Jul 19, 2020

Appreciated if deconz can support Axis Gear Zigbee shade device.
Node Info
image

Device
Screenshots

@Smanar
Copy link
Collaborator

Smanar commented Jul 19, 2020

Hello, when you have created the issue, you haven't see a part called "Device Request" in the 3 choice proposed ?

We need some more information > https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Request-Device-Support

@seafoodrice
Copy link
Author

Thanks for provide the doc for requesting device support page. I have captured all available cluster info as below. Please let me know if I can assist in anyway. Thanks in advance.

Basic Cluster Info
image

Windows Covering Cluster Info 1
image

Windows Covering Cluster Info 2
image

Windows Covering Cluster Info 3
image

Poll Control Cluster Info
image

Power Config Cluster
image

OTAU
image

@Mimiix
Copy link
Collaborator

Mimiix commented Jul 20, 2020

@seafoodrice I am really tempted on closing this issue right away and having you to open a new one, following the correct format as stated in the Issue template.

I'll ask @Smanar to confirm if the above screenshots are okay. If he say's they are not, i'm going to close this and ask you to open a Device Request
This will automatically assign a label too.

@seafoodrice
Copy link
Author

seafoodrice commented Jul 20, 2020 via email

@Mimiix
Copy link
Collaborator

Mimiix commented Jul 20, 2020

@seafoodrice Hi!
Thanks for your reply. We have enabled issue templates upon creating items.

Do you have more info on that issue workflows? It might be something helpful for us :)

@Smanar
Copy link
Collaborator

Smanar commented Jul 20, 2020

I m seing your device support level control AND window covering.

Do you know wich one is used to make it moving ? You can make tries using deconz, if you select cluster 0008 or 0102 you will have some command to test.

Your device is not just an up/down device, but support position control ?

@seafoodrice
Copy link
Author

seafoodrice commented Jul 21, 2020 via email

@Smanar
Copy link
Collaborator

Smanar commented Jul 22, 2020

Tell me if you have problem to try command, I just need to be sure your device use window covering device and not the level control one.

@seafoodrice
Copy link
Author

seafoodrice commented Jul 24, 2020 via email

@seafoodrice
Copy link
Author

seafoodrice commented Jul 24, 2020 via email

@seafoodrice
Copy link
Author

@Smanar , I replied via email, somehow the screenshot are not showing up on the thread. :(
Let me know if I should resend the screen shots....

@Smanar
Copy link
Collaborator

Smanar commented Jul 24, 2020

No it s good I don't need capture, don't worry.
So you device use window coivering cluster without something special, but I don't undersand what the level control cluster is for ? It a sort of double command ? so we can ignore it ?

all commands response as is what's the command names as

I don't understand this phrase

@seafoodrice
Copy link
Author

seafoodrice commented Jul 24, 2020 via email

@Smanar
Copy link
Collaborator

Smanar commented Jul 24, 2020

Ok so first try:

  • added the device in whitelist
  • make it reconised as light
  • disable reporting for all clusters except windows covering

To compile it replace the step 1 by
git clone --banch axis https://github.com/Smanar/deconz-rest-plugin.git

(and you can ignore "git checkout -b mybranch HEAD")

I haven't asked, what are you using as app with deconz ? Else you have api command here #3063

@seafoodrice
Copy link
Author

Hi Smanar,
Thanks for reply.

I am using Hassio Deconz add-on, and I afraid I wont't be able to the step mentioned above. I can try to compile branch build using Win 10 on my laptop instead.
For compile the branch in step 3- qmake && make -j2, what should I run if I want to compile on Win 10?

@Smanar
Copy link
Collaborator

Smanar commented Jul 25, 2020

Har, so we have a problem ^^.
You can compile only on linux machine.

@seafoodrice
Copy link
Author

seafoodrice commented Jul 27, 2020 via email

@Mimiix
Copy link
Collaborator

Mimiix commented Jul 27, 2020

@seafoodrice If you have another SD card around, that is a good option too 👍

@seafoodrice
Copy link
Author

@Smanar, was too busy at work and unable to get back to this till now. While I am getting a pi to test the branch build. Can you
provide some guidance on these as I am new?

  • added the device in whitelist
  • make it reconised as light
  • disable reporting for all clusters except windows covering

For the app, as I was using HA, I believe I can use postman to send request and test out the api? Am I on correct path?

Ok so first try:

  • added the device in whitelist
  • make it reconised as light
  • disable reporting for all clusters except windows covering

To compile it replace the step 1 by
git clone --banch axis https://github.com/Smanar/deconz-rest-plugin.git

(and you can ignore "git checkout -b mybranch HEAD")

I haven't asked, what are you using as app with deconz ? Else you have api command here #3063

@Smanar
Copy link
Collaborator

Smanar commented Aug 1, 2020

Ok, as you are using HA, better to use the second raspberry, and if possible use a Desktop version.

All was done by the code (If I m right) you just need to install deconz on the raspberry, like a normal installation and follow the instruction on github page

https://github.com/dresden-elektronik/deconz-rest-plugin at "Install deCONZ development package (optional, Linux only)", just follow the step, and replace the step 1 by
git clone --banch axis https://github.com/Smanar/deconz-rest-plugin.git

You can skip too "git checkout -b mybranch HEAD"

After that just include the device on deconz.

If you want to use your old network in same time, you can use the Phoscon feature in "gateway", to make a backup/restore to clone your previous network on the new one (and ofc configure HA to use it)

@Smanar
Copy link
Collaborator

Smanar commented Aug 1, 2020

"5": {
        "etag": "87269755b9b3a046485fdae8d96b252c",
        "hascolor": false,
        "lastannounced": null,
        "lastseen": "2020-08-01T16:22:05Z",
        "manufacturername": "AXIS",
        "modelid": "Gear",
        "name": "Window covering device 5",
        "state": {
            "bri": 0,
            "lift": 0,
            "on": false,
            "open": false,
            "reachable": true
        },
        "swversion": "100-5.3.5.1122",
        "type": "Window covering device",
        "uniqueid": "00:24:46:00:00:12:48:df-01"
    }

open the device
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"open": true}'
close the device
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"open": false}'
stop the device
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"stop": true}'
set a level (50%)
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"lift": 50}'

Need to test too state return.
IDK if this device can be used with a command, or with your smartphone using BT, but if you use it, the value in deconz need to be updated (in the Json)
Same in the Json the field "lift" need to be updated, other values too ofc.

To get device JSON
http://192.168.1.182/api/8C2FF47893/lights/5

for the battery I need the cluster 0x0001 like previous, but you haven't pressed the "read" button" (and make the device awake), because all values are empty.

@ebaauw
Copy link
Collaborator

ebaauw commented Aug 1, 2020

lift should run from 0 to 100 (%).

@seafoodrice
Copy link
Author

Please see the power config cluster as below. thanks.
image

@seafoodrice
Copy link
Author

"5": {
        "etag": "87269755b9b3a046485fdae8d96b252c",
        "hascolor": false,
        "lastannounced": null,
        "lastseen": "2020-08-01T16:22:05Z",
        "manufacturername": "AXIS",
        "modelid": "Gear",
        "name": "Window covering device 5",
        "state": {
            "bri": 0,
            "lift": 0,
            "on": false,
            "open": false,
            "reachable": true
        },
        "swversion": "100-5.3.5.1122",
        "type": "Window covering device",
        "uniqueid": "00:24:46:00:00:12:48:df-01"
    }

open the device
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"open": true}'
close the device
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"open": false}'
stop the device
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"stop": true}'
set a level (50%)
curl http://192.168.1.182/api/8C2FF47893/lights/5/state -X PUT -d '{"lift": 50}'

Need to test too state return.
IDK if this device can be used with a command, or with your smartphone using BT, but if you use it, the value in deconz need to be updated (in the Json)
Same in the Json the field "lift" need to be updated, other values too ofc.

To get device JSON
http://192.168.1.182/api/8C2FF47893/lights/5

for the battery I need the cluster 0x0001 like previous, but you haven't pressed the "read" button" (and make the device awake), because all values are empty.

Test findings:

  • state change 'put' api lights/5/state
    body: {"on":true} - it closed the shade, supposed to open the shade?
    body: {"on":false} - it opened the shade, supposed to close the shade?

body: {"lift": 100} - fully closed the shade, should it be the other way around?
body: {"lift": 80} - closed 80% of the shade
body: {"lift": 25} - closed 25% of the shade

body: {"stop":true} - worked as expected.

  • State return: The json state attributes does NOT change (all values remained the same) after I sent different commands to operate the shade (open/close/lift).
    "state": {
    "bri": 0,
    "lift": 0,
    "on": false,
    "open": false,
    "reachable": true
    },

Thanks.

@seafoodrice
Copy link
Author

missing 2 test cases for state changes.

state change 'put' api lights/5/state
body: {"open":true} - working as expected
body: {"open":false} - working as expected

@ebaauw
Copy link
Collaborator

ebaauw commented Aug 2, 2020

Best not use on nor bri; they’ve been deprecated and will be removed.

The API plugin needs to setup attribute reporting for Current Position Lift Percentage. Do the resource attributes update when you read this Zigbee attribute in the GUI?

There’s no way to expose the battery on a /lights resource, so this needs to be expose as a separate ZHABattery /sensors resource, cf the IKEA FYRTUR and KADRILJ.

@Smanar
Copy link
Collaborator

Smanar commented Aug 2, 2020

I have added the ZHABattery for battery, to use the use tha attribute 0x0021.

For reporting, I have updated the code, removed a part where I m ignoring the cluster 0008 to use only the 0102.

If it still don't work, as have said ebaauw, move your shutter at 50%, and on deconz check if the value are updated in those both cluster. If yes, can you check if the reporting and binding is working using deconz too ?

@Smanar
Copy link
Collaborator

Smanar commented Nov 18, 2020

Ok, sorry, was not sure understand, so we need a return, any of them.
So now it s possible to have log in phoscon (I hope you haven't too much device), can you show us the log after a command (on pastebin clone), or just check if you have something about the device ?
Else you realy need to enable a bind and a reporting from one of thoses attribute

0x0006 : attribute 0x0000
0x0008 : attribute 0x0000
0x0102 : attribute 0x0008 > return NOT_FOUND, so not this one

@seafoodrice
Copy link
Author

seafoodrice commented Nov 19, 2020

As I said earlier, I have binded already and it shown binded successfully..
image

After I send command to change the blind position. There is nothing shown up on Phoscon log. ONLY AFTER I did a forced read. The following showed up in the log.

12:24:01:595 binding for cluster 0x0102 of 0x0024460000145410 exists (verified by reporting)
12:24:01:596 skip configure report for cluster: 0x0102 attr: 0x0008 of node 0x0024460000145410 (seems to be active)
12:24:03:523 Bind response success for 0x0024460000145410 ep: 0x01 cluster: 0x0006
12:24:03:525 skip configure report for cluster: 0x0006 attr: 0x0000 of node 0x0024460000145410 (wait reading or unsupported)
12:24:03:733 Bind response success for 0x0024460000145410 ep: 0x01 cluster: 0x0008
12:24:03:733 skip configure report for cluster: 0x0008 attr: 0x0000 of node 0x0024460000145410 (wait reading or unsupported)

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 19, 2020

NOT_FOUND does usually mean that attribute reporting is supported, but not yet defined. Otherwise, you'd get UNREPORTABLE_ATTRIBUTE.

Can you please try to configure it with the values 1, 300, 1 and double check again?

@seafoodrice
Copy link
Author

seafoodrice commented Nov 19, 2020

Just to clarify your ask,
image
Min Report Interval - 1
Max Report Interval - 300
Reportable Change - 1

and press "write config"
is that what you mean?

@seafoodrice
Copy link
Author

once I set the config as above. When I change the blind position, the device reports with following log.
0x0024460000145410 is the device.

23:41:28:532 ZCL attribute report 0x0024460000145410 for cluster: 0x0008, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:32:458 [INFO] - No button handler for: Gear endpoint: 0x01 cluster: WINDOW_COVERING (0x0102) command: 0x0A payload[0]: 008
23:41:32:459 ZCL attribute report 0x0024460000145410 for cluster: 0x0102, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:34:631 ZCL attribute report 0x00158D0001A4CC99 for cluster: 0x0006, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:39:302 [INFO] - No button handler for: Gear endpoint: 0x01 cluster: 0x0001 command: 0x0A payload[0]: 021
23:41:39:304 ZCL attribute report 0x0024460000145410 for cluster: 0x0001, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:40:589 [INFO] - No button handler for: Gear endpoint: 0x01 cluster: WINDOW_COVERING (0x0102) command: 0x0A payload[0]: 008

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 19, 2020

Yes, that's what I meant. So that part shows that the device is not sending the attribute reports. The values should now update every sec.

@seafoodrice
Copy link
Author

Thanks @SwoopX , so if I set Reportable Change to 3 means 3 secs which will be less chatty?

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 19, 2020

Well, yes and no. Depends on what you really want. Min reporting is the actual frequency upon the defined change value. If nothing changes, max intervall applies.

So, if you arenot interested in 1% changes e.g., you could move up to 10. If you generally only want to have changes reported every 5 secs, you might move up the min interval.

I've set my smart plugs up to 20 sec min reporting, to throttle the signals in the air a bit and reduce the processing load of my poor Rpi zero a bit 😀

@seafoodrice
Copy link
Author

Makes perfect sense. From the log above, if there nothing wrong you can see. I will close the issue.
Thanks @SwoopX and @Smanar

23:41:28:532 ZCL attribute report 0x0024460000145410 for cluster: 0x0008, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:32:458 [INFO] - No button handler for: Gear endpoint: 0x01 cluster: WINDOW_COVERING (0x0102) command: 0x0A payload[0]: 008
23:41:32:459 ZCL attribute report 0x0024460000145410 for cluster: 0x0102, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:34:631 ZCL attribute report 0x00158D0001A4CC99 for cluster: 0x0006, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:39:302 [INFO] - No button handler for: Gear endpoint: 0x01 cluster: 0x0001 command: 0x0A payload[0]: 021
23:41:39:304 ZCL attribute report 0x0024460000145410 for cluster: 0x0001, ep: 0x01, frame control: 0x18, mfcode: 0x0000
23:41:40:589 [INFO] - No button handler for: Gear endpoint: 0x01 cluster: WINDOW_COVERING (0x0102) command: 0x0A payload[0]: 008

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 19, 2020

Looks fine to me from here. We could however doublecheck if reporting is correctly enabled in the code. It can happen though that bindings and reporting configs can be missed.

@Smanar
Copy link
Collaborator

Smanar commented Nov 19, 2020

I realy don't see problem, the code look fine.

During your tests have you tried to re-include the device ?

12:24:01:596 skip configure report for cluster: 0x0102 attr: 0x0008 of node 0x0024460000145410 (seems to be active)
12:24:03:525 skip configure report for cluster: 0x0006 attr: 0x0000 of node 0x0024460000145410 (wait reading or unsupported)

@seafoodrice
Copy link
Author

seafoodrice commented Nov 19, 2020 via email

@Smanar
Copy link
Collaborator

Smanar commented Nov 20, 2020

Yes, and it need.
Just to be sure, can you compare thoses values and yours from your last device

Model id = "Gear"
Manufacture number = 0x1262 or 0x109a
Mac adress start by 0x002446

Or if you have the log just during the device inclusion ? (when the bind/reporting need to be set by the code)

@seafoodrice
Copy link
Author

seafoodrice commented Nov 22, 2020

My apologies @Smanar, I am not sure where to look for those values,
Model id = "Gear"
Manufacture number = 0x1262 or 0x109a
Mac adress start by 0x002446

can you provide more information? I just try to browse around deconz and found the following info if that helps
image
image

@Smanar
Copy link
Collaborator

Smanar commented Nov 22, 2020

And your Mac adress is 0x0024460000145410
So all is fine ....

12:24:03:525 skip configure report for cluster: 0x0006 attr: 0x0000 of node 0x0024460000145410 (wait reading or unsupported)

But I don't understand to have this debug line

        else if (lightNode && rq.maxInterval != 0xffff /* disable reporting */)
        {
            // wait for value is created via polling
            DBG_Printf(DBG_INFO, "skip configure report for cluster: 0x%04X attr: 0x%04X of node 0x%016llX (wait reading or unsupported)\n",
                       bt.binding.clusterId, rq.attributeId, bt.restNode->address().ext());
        }

To have NOT_FOUND as return we need to have rq.maxInterval == 0xffff no ?

Can you try with this version pls ? It have added a debug line, then re-include your device and give us log pls.
git clone --bracnh axis https://github.com/Smanar/deconz-rest-plugin.git

@seafoodrice
Copy link
Author

seafoodrice commented Nov 22, 2020

Hi Smanar, unfortunately my house is hosting few guests for coming 2 weeks and I tried to keep my smart devices stable. Since I have only 1 conbee II. I will have to test it out afterwards.

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 22, 2020

@Smanar maxinterval is initialized with 0 as far as I can tell. As I see it, it could take up to around 30 mins for the binding and reporting to automatically set up. However, if the device is a deep sleeper and either binding or reporting is missed, you end up in the situation experienced. It is battery powered.

@Smanar
Copy link
Collaborator

Smanar commented Nov 22, 2020

So I m seing two test to do :

  • making the device awake during inclusion
  • let the device alone with bad reporting during somes days to see if it finally set them.

@seafoodrice
Copy link
Author

@Smanar , to help on the findings, I have following experience as I have 4 devices.

  • I have 1 device which has the the config setup properly after an hours or so.
  • all others 3 I left it for few days before @SwoopX helped out to write config manually, and never setup properly by itself after added to the network.

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 22, 2020

Hm, strange. I just double checked the device above and it has a poll control cluster so I'd assume it is a light sleeper then.

@Smanar
Copy link
Collaborator

Smanar commented Nov 23, 2020

It' s a battery device, no ?

Edit:
Yes it is, there a ZHAbattery just for it.

@seafoodrice
Copy link
Author

seafoodrice commented Nov 24, 2020 via email

@Smanar
Copy link
Collaborator

Smanar commented Nov 24, 2020

Ha ?
So this is normal ?

image

So I need to remove the zha battery too ?

@seafoodrice
Copy link
Author

No, not really. Please allow me to clarify. The device supports power adapter and solar panel add-on. In either options, the device itself is having a rechargeable battery to take the power from external source. Hence the zha battery works fine as is.

@Smanar
Copy link
Collaborator

Smanar commented Nov 25, 2020

Ok thx.
But it don't solve your problem ....
I realy don't see problem on code.

Can you try my modified version ? This one will add one more log

Debug Axis : XXXXXXXXXXXXXXXXXXXXX

@stale
Copy link

stale bot commented Dec 18, 2020

As there hasn't been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Dec 18, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

As there hasn't been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it isn't solved, request to get this opened again.

@stale stale bot closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants