deconz-rest-plugin icon indicating copy to clipboard operation
deconz-rest-plugin copied to clipboard

DDF Policy `raw_json` still display an `ddf_hash`

Open Zehir opened this issue 1 year ago • 5 comments

Does the issue really belong here?

  • [X] I definitively want to report a bug within deCONZ or its REST-API

Is there already an existing issue for this?

  • [X] I have searched the existing issues and there is none for the bug at hand

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

  • Host system: PC
  • Running method: Windows
  • Firmware version: 26720700
  • deCONZ version (not Home assistant Addon version!): 2.27.0
  • Device: ConBee II
  • Do you use an USB extension cable: yes
  • Is there any other USB or serial devices connected to the host system? If so: Which?

deCONZ Logs

No response

Additional context

No response

Zehir avatar May 18 '24 08:05 Zehir

May be related to #7776

Zehir avatar May 18 '24 09:05 Zehir

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] avatar Jun 09 '24 01:06 github-actions[bot]

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.

github-actions[bot] avatar Jun 16 '24 01:06 github-actions[bot]

@manup is this one fixed in latest beta ?

Zehir avatar Jun 16 '24 07:06 Zehir

@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.

manup avatar Jun 17 '24 13:06 manup

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] avatar Jul 09 '24 01:07 github-actions[bot]

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.

manup avatar Jul 09 '24 09:07 manup

Ok thanks

Zehir avatar Jul 09 '24 09:07 Zehir

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

manup avatar Jul 09 '24 09:07 manup

No problem I add a reminder for this week-end

Zehir avatar Jul 09 '24 09:07 Zehir

@manup I confirm it's working fine

Zehir avatar Jul 14 '24 07:07 Zehir