{"action":"created","issue":{"url":"https://api.github.com/repos/emoncms/device/issues/26","repository_url":"https://api.github.com/repos/emoncms/device","labels_url":"https://api.github.com/repos/emoncms/device/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/emoncms/device/issues/26/comments","events_url":"https://api.github.com/repos/emoncms/device/issues/26/events","html_url":"https://github.com/emoncms/device/issues/26","id":370241825,"node_id":"MDU6SXNzdWUzNzAyNDE4MjU=","number":26,"title":"Reinitializing device duplicates inputs","user":{"login":"pb66","id":5606042,"node_id":"MDQ6VXNlcjU2MDYwNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5606042?v=4","gravatar_id":"","url":"https://api.github.com/users/pb66","html_url":"https://github.com/pb66","followers_url":"https://api.github.com/users/pb66/followers","following_url":"https://api.github.com/users/pb66/following{/other_user}","gists_url":"https://api.github.com/users/pb66/gists{/gist_id}","starred_url":"https://api.github.com/users/pb66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pb66/subscriptions","organizations_url":"https://api.github.com/users/pb66/orgs","repos_url":"https://api.github.com/users/pb66/repos","events_url":"https://api.github.com/users/pb66/events{/privacy}","received_events_url":"https://api.github.com/users/pb66/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T16:24:05Z","updated_at":"2018-10-16T10:30:54Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I had some devices posting to emoncms before making up the device template files, since devices are now created for all new inputs, there were new devices already listed on the device page so rather than deleting, I \"edited\" the device(s) and selected my new template and \"reinitialized\" the device.\r\n\r\nThe first time I did this it duplicated the inputs and I put that down to it not recognizing each existing input by it's index+1 temporary name given to it. \r\n\r\nHowever when I fixed a typo to a feed name and added another input to the template and then reinitialized the same device a second time, it created a third set of inputs, see below.\r\n\r\n![image](https://user-images.githubusercontent.com/5606042/46962735-c8130c80-d09b-11e8-9e9b-f24367ee9378.png)\r\n \r\nIt should have only created a single addition input as input \"8\" aka \"frequency\" was omitted in the draft template.\r\n\r\nThis creation of a third set of inputs is definitely a bug, but the second set although it could be the same error, I sort of expected it to happen as it couldn't map the old temp names to the new names, but now we have indexedinputs there should be no problem with mapping.\r\n"},"comment":{"url":"https://api.github.com/repos/emoncms/device/issues/comments/430186775","html_url":"https://github.com/emoncms/device/issues/26#issuecomment-430186775","issue_url":"https://api.github.com/repos/emoncms/device/issues/26","id":430186775,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDE4Njc3NQ==","user":{"login":"pb66","id":5606042,"node_id":"MDQ6VXNlcjU2MDYwNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5606042?v=4","gravatar_id":"","url":"https://api.github.com/users/pb66","html_url":"https://github.com/pb66","followers_url":"https://api.github.com/users/pb66/followers","following_url":"https://api.github.com/users/pb66/following{/other_user}","gists_url":"https://api.github.com/users/pb66/gists{/gist_id}","starred_url":"https://api.github.com/users/pb66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pb66/subscriptions","organizations_url":"https://api.github.com/users/pb66/orgs","repos_url":"https://api.github.com/users/pb66/repos","events_url":"https://api.github.com/users/pb66/events{/privacy}","received_events_url":"https://api.github.com/users/pb66/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T10:30:54Z","updated_at":"2018-10-16T10:30:54Z","author_association":"CONTRIBUTOR","body":"> I'm confused. How can it have multiple feeds with the same index? Did I miss some latest changes to emoncms?\r\n\r\nI assume you mean \"inputs\" not \"feeds\" ?\r\n\r\nHave you seen the indexed inputs branches of emoncms and device?\r\n\r\nSee this forum thread for info https://community.openenergymonitor.org/t/development-indexed-inputs/8354\r\n\r\n"}}
{"actor":{"display_login":"pb66"}}