TS0203 Sensor phoscon don’t send state to HA

The issue is on all my 6 sensor.
the json is that one i have posted up.

That’s log for my DDF :


image

and that’s the log when i hot reload :

20:13:38:335 Device TTL 6481 s flags: 0x7
20:13:42:969 Hot reload device: a4:c1:38:12:4b:70:f8:64
20:13:42:971 Hot reload device: a4:c1:38:1a:06:1c:d7:88
20:13:42:972 Hot reload device: a4:c1:38:fd:e3:48:8a:0b
20:13:42:973 Hot reload device: a4:c1:38:b9:e6:fd:f5:c0
20:13:42:975 Hot reload device: a4:c1:38:8e:20:9a:6a:ef
20:13:42:976 Hot reload device: a4:c1:38:e6:22:1d:a4:5a
20:13:43:057 DEV found DDF for 0xA4C138124B70F864, path: /data/.local/share/dresden-elektronik/deCONZ/devices/door_magnetic_sensor.json
20:13:43:066 DEV found DDF for 0xA4C1381A061CD788, path: /data/.local/share/dresden-elektronik/deCONZ/devices/door_magnetic_sensor.json
20:13:43:074 DEV found DDF for 0xA4C138FDE3488A0B, path: /data/.local/share/dresden-elektronik/deCONZ/devices/door_magnetic_sensor.json

Another information, it’s the open attribute on DDF screen configuration (I don’t know if it’s important) :

image

But can you share the device json ? visible in Phoscon / help / API Information / sensors / 4 ?

/data/.local/share/dresden-elektronik/deCONZ/devices/door_magnetic_sensor.json

It’s your own DDF ?
Because this device is already 2 times on official DDF and 3 with this one.

And on your DDF you have only

{
    "name":"state/open"
}

But if you select the value in the editor, you have more stuff …

You are sure the DDF preview is the same than on the first capture ?

And the DDF you are using is not complete, you miss all the enrollement stuff. This DDF can’t work.

For me better to delete your custom DDF and use the official one.

Ok Smanar,
This one is the json of sensor 4 :


{
    "config": {
        "on": true,
        "reachable": true
    },
    "etag": "61ae55623a204eb8532f0f37dffe3c8d",
    "lastannounced": null,
    "lastseen": "2022-10-12T17:38Z",
    "manufacturername": "_TZ3000_oxslv1c9",
    "modelid": "TS0203",
    "name": "Fenêtre salon gauche",
    "state": {
        "battery": 100,
        "lastupdated": "2022-10-12T17:33:43.027",
        "lowbattery": false,
        "open": false
    },
    "type": "ZHAOpenClose",
    "uniqueid": "a4:c1:38:8e:20:9a:6a:ef-01-0500"
}

I have already notices that when i change DDF attribute on UI interface, the Json does not always update … this is also an issue may be.

But your answer tell me more on a possible solution, by take official DDF :slight_smile:

How and where to take it ? And how to paste it on raspberry PI ? I can’t paste it on UI interface of deconz…

Where this file is from ?

What is your deconz version ?
On the last one, you have 2 DDF for this device (it’s bad, but both seem same)

/usr/share/deCONZ/devices/tuya/ih-f001_door_sensor.json
/usr/share/deCONZ/devices/tuya/_TZ3000_n2egfsli_door_sensor.json

And both are complete

  • They have the fingerprint
  • They have the missing field you need (“config/enrolled” for exemple)

So if you have a recent version, just delete the “door_magnetic_sensor.json”, to use one of the 2 officials DDF (randomly)

If the DDF was your creation, I can explain the problem for next one you will make.

My deconz version is 6.16.0, the last one i suppose.

I don’t have created the DDF, the UI create them. It’s very complicated because I notice that sometimes when i change properties in UI, the DDF don’t update, it’s seems to be very instable. (Raspberry Pi)

Can I take one of two officials DDF directly by copy paste from /usr ?
How to access to the files, in ssh ?
With the raspberry the ssh add-on don’t give access to this directory.

Can you check your deconz version, in phoscon ?
But yes I think the HA plugin use the last one.

The 2 other DDF are already in deconz, so when you have done “edit DDF”, the editor should have take one of them, and not create a new one. You realy have nothing to do.

It’s complicated with the HA OS, but if you have a recent version, you need to have them natively, one of them is 3 month old.

Just delete the one you have saved(" door_magnetic_sensor.json) and BTW you have this file “permanent”, it don’t disapear if you restart deconz ?

Do you think if i delete

door_magnetic_sensor.json

And restart deconz it will restart without problem ?
The affectation of DDF will be reset automatically with the official ?

Deconz at start parse all your DDF, and use one that match your device.
So if you delete the incomplete one, it will use on of the working one. There is no affectation, but a new scan at every restart.

I think you have used the “edit DDF” feature so deconz have created a basic DDF but incomplete and you have saved it.
And your custom DDF are prioritary on deconz official one.

Hi Smanar,
Great !
All is ok right now.

I didn’t really understand how DDFs worked, but now everything works, but also I know a bit more about how it works. Thanks a lot ! The issu can be closed.

Can be usefull if you have a device that is not supported.
Deconz can create a sekeleton to help you to make the DDF, but you NEED to finish it.

If you have a unsupported device and wana try to finsh the DDF, just ask help on this forum ^^.