{"action":"created","issue":{"url":"https://api.github.com/repos/domoticz/domoticz/issues/193","labels_url":"https://api.github.com/repos/domoticz/domoticz/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/domoticz/domoticz/issues/193/comments","events_url":"https://api.github.com/repos/domoticz/domoticz/issues/193/events","html_url":"https://github.com/domoticz/domoticz/issues/193","id":116912544,"number":193,"title":"Add type-of-device to the JSON API","user":{"login":"NanneHuiges","id":1526794,"avatar_url":"https://avatars.githubusercontent.com/u/1526794?v=3","gravatar_id":"","url":"https://api.github.com/users/NanneHuiges","html_url":"https://github.com/NanneHuiges","followers_url":"https://api.github.com/users/NanneHuiges/followers","following_url":"https://api.github.com/users/NanneHuiges/following{/other_user}","gists_url":"https://api.github.com/users/NanneHuiges/gists{/gist_id}","starred_url":"https://api.github.com/users/NanneHuiges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NanneHuiges/subscriptions","organizations_url":"https://api.github.com/users/NanneHuiges/orgs","repos_url":"https://api.github.com/users/NanneHuiges/repos","events_url":"https://api.github.com/users/NanneHuiges/events{/privacy}","received_events_url":"https://api.github.com/users/NanneHuiges/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-14T09:09:11Z","updated_at":"2015-11-15T10:38:39Z","closed_at":"2015-11-14T09:34:09Z","body":"Unless I am mistaken, there is no easy way to see what kind of device you are looking at from the 'all' devices request. This means either heuristically 'guess' if it is a switch, temperature-device or something else.\r\n\r\nIt would be really helpful if this was present in the JSON items per-device. The 'filter' name (e.g. 'light' or 'temp') could be added for instance. This would reduce the amount of calls to get the specific types!\r\n\r\nExample (shortened), with added field `DeviceType`\r\n\r\n```\r\n   \"result\" : [\r\n      {\r\n         \"HardwareType\" : \"RFXCOM - RFXtrx433 USB 433.92MHz Transceiver\",\r\n         \"HardwareTypeVal\" : 1,\r\n         \"Humidity\" : 56,\r\n         \"Name\" : \"Cresta channel 1\",\r\n         \"SubType\" : \"Cresta, TFA TS34C\",\r\n         \"Temp\" : 18.50,\r\n         \"Type\" : \"Temp + Humidity\",\r\n         \"TypeImg\" : \"temperature\",\r\n \r\n         \"DeviceType\": \"temp\"\r\n\r\n      },\r\n      {\r\n         \"HardwareType\" : \"RFXCOM - RFXtrx433 USB 433.92MHz Transceiver\",\r\n         \"Image\" : \"Light\",\r\n         \"Name\" : \"Woonkamer - dressoir\",\r\n         \"SubType\" : \"Impuls\",\r\n         \"Type\" : \"Lighting 1\",\r\n         \"TypeImg\" : \"lightbulb\",\r\n\r\n         \"DeviceType\": \"light\"\r\n\r\n      },\r\n```\r\nCurrently one might abuse the `TypeImg` field, or do some magic with the `Type`, but this is not a pretty method. The image field isn't intended for type-identification, and there doesn't seem to be a clear, exhaustive list for the Type field (the difference between an `lighting 1` and other switches isn't really relevant for instance)."},"comment":{"url":"https://api.github.com/repos/domoticz/domoticz/issues/comments/156801035","html_url":"https://github.com/domoticz/domoticz/issues/193#issuecomment-156801035","issue_url":"https://api.github.com/repos/domoticz/domoticz/issues/193","id":156801035,"user":{"login":"NanneHuiges","id":1526794,"avatar_url":"https://avatars.githubusercontent.com/u/1526794?v=3","gravatar_id":"","url":"https://api.github.com/users/NanneHuiges","html_url":"https://github.com/NanneHuiges","followers_url":"https://api.github.com/users/NanneHuiges/followers","following_url":"https://api.github.com/users/NanneHuiges/following{/other_user}","gists_url":"https://api.github.com/users/NanneHuiges/gists{/gist_id}","starred_url":"https://api.github.com/users/NanneHuiges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NanneHuiges/subscriptions","organizations_url":"https://api.github.com/users/NanneHuiges/orgs","repos_url":"https://api.github.com/users/NanneHuiges/repos","events_url":"https://api.github.com/users/NanneHuiges/events{/privacy}","received_events_url":"https://api.github.com/users/NanneHuiges/received_events","type":"User","site_admin":false},"created_at":"2015-11-15T10:38:39Z","updated_at":"2015-11-15T10:38:39Z","body":"Hmm, I'm kinda 'stuck' with java, as I'm building for android, but thanks :)"}}