{"action":"created","issue":{"url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/143","repository_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin","labels_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/143/comments","events_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/143/events","html_url":"https://github.com/dresden-elektronik/deconz-rest-plugin/issues/143","id":253075417,"number":143,"title":"New sensor resource created for known Hue dimmer switches","user":{"login":"ebaauw","id":22179355,"avatar_url":"https://avatars0.githubusercontent.com/u/22179355?v=4","gravatar_id":"","url":"https://api.github.com/users/ebaauw","html_url":"https://github.com/ebaauw","followers_url":"https://api.github.com/users/ebaauw/followers","following_url":"https://api.github.com/users/ebaauw/following{/other_user}","gists_url":"https://api.github.com/users/ebaauw/gists{/gist_id}","starred_url":"https://api.github.com/users/ebaauw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebaauw/subscriptions","organizations_url":"https://api.github.com/users/ebaauw/orgs","repos_url":"https://api.github.com/users/ebaauw/repos","events_url":"https://api.github.com/users/ebaauw/events{/privacy}","received_events_url":"https://api.github.com/users/ebaauw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-08-26T08:34:41Z","updated_at":"2017-11-17T14:11:42Z","closed_at":"2017-10-08T19:53:49Z","author_association":"CONTRIBUTOR","body":"When I open the network after restarting deCONZ, before all the sensors have been discovered, the REST API creates new a sensor resource when it discovers a Hue dimmer switch.  Also, when I soft reset the Hue dimmer switch (pressing all four buttons) while the network is open, a new sensor resource is created.  This only happens for the Hue dimmer switch.\r\n\r\nAfter exiting deCONZ, the old resource is still in the database.  If I just delete the newly created resource from the database and start deCONZ, the old resource is fully functional again.\r\n\r\nIt would seem that the new resource is created too early, before the Hue dimmer has been fully read.  Consequently the check whether it already exists fails.  Looking at the database, the `swversion` of the newly created resource is empty and the `fingerprint` differs from the existing sensor.  It does have the same `uniqueid`.  \r\nThe `fingerprint` is `{\"d\":2096,\"ep\":1,\"in\":[0,1,64512],\"out\":[6,8,5],\"p\":49246}` for the existing sensor resources and `{\"d\":2096,\"ep\":2,\"in\":[0],\"out\":[6,8,5],\"p\":49246}` for the newly created resources.\r\n\r\nI hope it's not caused by the `writeAttribute` I added in PR #137 to configure the dimmer to no longer start touchlink when holding _On_."},"comment":{"url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/comments/345253757","html_url":"https://github.com/dresden-elektronik/deconz-rest-plugin/issues/143#issuecomment-345253757","issue_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/143","id":345253757,"user":{"login":"donnib","id":252702,"avatar_url":"https://avatars2.githubusercontent.com/u/252702?v=4","gravatar_id":"","url":"https://api.github.com/users/donnib","html_url":"https://github.com/donnib","followers_url":"https://api.github.com/users/donnib/followers","following_url":"https://api.github.com/users/donnib/following{/other_user}","gists_url":"https://api.github.com/users/donnib/gists{/gist_id}","starred_url":"https://api.github.com/users/donnib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donnib/subscriptions","organizations_url":"https://api.github.com/users/donnib/orgs","repos_url":"https://api.github.com/users/donnib/repos","events_url":"https://api.github.com/users/donnib/events{/privacy}","received_events_url":"https://api.github.com/users/donnib/received_events","type":"User","site_admin":false},"created_at":"2017-11-17T14:11:42Z","updated_at":"2017-11-17T14:11:42Z","author_association":"NONE","body":"I just noticed this today that for one of my HUE Switches i have 2 entries in the rest api, should i manually do something ? I am running 2.04.89"}}
{"actor":{"display_login":"donnib"}}