dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.88k stars 483 forks source link

DDF Policy `raw_json` still display an `ddf_hash` #7780

Closed Zehir closed 5 days ago

Zehir commented 1 month ago

Does the issue really belong here?

Is there already an existing issue for this?

Describe the bug

When setting the ddf_policy to raw_json it's look like a bundle is still used.

image

{
    "ddf_hash": "a1001854b9854ad3c6fbaa4b5c5028b3cff97dbf3dbd53f357221b9c06c6cd38",
    "ddf_policy": "raw_json",
    "lastannounced": null,
    "lastseen": "2024-05-18T08:52Z",
    "manufacturername": "IKEA of Sweden",
    "modelid": "TRADFRI on/off switch",
    "name": "TRADFRI on/off switch (2)"
}

Steps to reproduce the behavior

Set a device policy to raw_json

Expected behavior

I expect the device to have the DDF tag on the GUI and no ddf_hash on the /api/:apiKey/devices/:deviceUniqueID endpoint

Screenshots

No response

Environment

deCONZ Logs

No response

Additional context

No response

Zehir commented 1 month ago

May be related to #7776

github-actions[bot] commented 1 month ago

As there has not 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.

github-actions[bot] commented 4 weeks ago

As there has not 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 is not solved, request to get this opened again.

Zehir commented 4 weeks ago

@manup is this one fixed in latest beta ?

manup commented 3 weeks ago

@manup is this one fixed in latest beta ?

I think no, will do some tests. If I remember correctly the switch between raw DDF and bundle was already working in the past.

github-actions[bot] commented 6 days ago

As there has not 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.

manup commented 5 days ago

Just tested with v2.27.4-beta here it works fine. Tested with Ikea signal Repeater and Tradfri On/Off Switch.


image

GET http://skull:8090/api/12345/devices/cc:86:ec:ff:fe:1b:2e:6b

{
    "ddf_hash": "ba9f2028165e5db43a4d9831134cf895198b198df7831a5a33c7b5332b3f1fa4",
    "ddf_policy": "latest_prefer_stable",
    "lastannounced": "2024-07-09T08:41:42Z",
    "lastseen": "2024-07-09T08:41Z",
    "manufacturername": "IKEA of Sweden",
    "modelid": "TRADFRI Signal Repeater",
    "name": "Range extender 44",
    "productid": "TRADFRI Signal Repeater",
    "subdevices": [
        {
            "productid": "E1746",
            "state": {
                "alert": {
                    "lastupdated": "2023-11-06T13:33:52Z",
                    "value": "none"
                },
                "reachable": {
                    "lastupdated": "2024-07-09T10:41:42Z",
                    "value": true
                }
            },
            "type": "Range extender",
            "uniqueid": "cc:86:ec:ff:fe:1b:2e:6b-01"
        }
    ],
    "swversion": "2.3.086",
    "uniqueid": "cc:86:ec:ff:fe:1b:2e:6b"
}

PUT http://skull:8090/api/12345/devices/cc:86:ec:ff:fe:1b:2e:6b/ddf/policy

{"policy": "raw_json"}
[{
  "success": {
    "/devices/cc:86:ec:ff:fe:1b:2e:6b/ddf/policy": "raw_json"
  }
}]

image

{
    "ddf_policy": "raw_json",
    "lastannounced": "2024-07-09T08:41:42Z",
    "lastseen": "2024-07-09T08:50Z",
    "manufacturername": "IKEA of Sweden",
    "modelid": "TRADFRI Signal Repeater",
    "name": "Range extender 44",
    "productid": "TRADFRI Signal Repeater",
    "subdevices": [
        {
            "productid": "E1746",
            "state": {
                "alert": {
                    "lastupdated": "2023-11-06T13:33:52Z",
                    "value": "none"
                },
                "reachable": {
                    "lastupdated": "2024-07-09T10:41:42Z",
                    "value": true
                }
            },
            "type": "Range extender",
            "uniqueid": "cc:86:ec:ff:fe:1b:2e:6b-01"
        }
    ],
    "swversion": "2.3.086",
    "uniqueid": "cc:86:ec:ff:fe:1b:2e:6b"
}

Note the hash is not shown when raw_json is set. Not shown here but I also made some tests switching back an forth with various modes raw_json, latest_prefer_stable and pin.

Zehir commented 5 days ago

Ok thanks

manup commented 5 days ago

But please check with your setup too, sometimes stuff only works in mine :smile:

Zehir commented 5 days ago

No problem I add a reminder for this week-end

Zehir commented 23 hours ago

@manup I confirm it's working fine