{"action":"created","issue":{"url":"https://api.github.com/repos/domogik/domogik/issues/411","repository_url":"https://api.github.com/repos/domogik/domogik","labels_url":"https://api.github.com/repos/domogik/domogik/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/domogik/domogik/issues/411/comments","events_url":"https://api.github.com/repos/domogik/domogik/issues/411/events","html_url":"https://github.com/domogik/domogik/issues/411","id":197996753,"number":411,"title":"0.5-hotfix db insertion error","user":{"login":"tikismoke","id":2229691,"avatar_url":"https://avatars.githubusercontent.com/u/2229691?v=3","gravatar_id":"","url":"https://api.github.com/users/tikismoke","html_url":"https://github.com/tikismoke","followers_url":"https://api.github.com/users/tikismoke/followers","following_url":"https://api.github.com/users/tikismoke/following{/other_user}","gists_url":"https://api.github.com/users/tikismoke/gists{/gist_id}","starred_url":"https://api.github.com/users/tikismoke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikismoke/subscriptions","organizations_url":"https://api.github.com/users/tikismoke/orgs","repos_url":"https://api.github.com/users/tikismoke/repos","events_url":"https://api.github.com/users/tikismoke/events{/privacy}","received_events_url":"https://api.github.com/users/tikismoke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-29T11:59:37Z","updated_at":"2016-12-30T18:40:19Z","closed_at":null,"body":"from ozwave i got a new device:\r\n\r\n> {\r\n> \r\n>     \"info_changed\": \"2016-12-27 19:57:17\",\r\n>     \"description\": \"\",\r\n>     \"reference\": \"NorthQ -- NQ-9121 Gas Meter\",\r\n>     \"xpl_commands\": { },\r\n>     \"client_id\": \"plugin-ozwave.domogik\",\r\n>     \"sensors\": {\r\n>         \"meter-gas\": {\r\n>             \"value_min\": null,\r\n>             \"data_type\": \"DT_VolumeM3\",\r\n>             \"incremental\": true,\r\n>             \"id\": 2509,\r\n>             \"reference\": \"meter-gas\",\r\n>             \"conversion\": \"\",\r\n>             \"name\": \"Gas\",\r\n>             \"last_received\": null,\r\n>             \"timeout\": 0,\r\n>             \"formula\": null,\r\n>             \"last_value\": null,\r\n>             \"value_max\": null\r\n>         },\r\n>         \"battery-level\": {\r\n>             \"value_min\": null,\r\n>             \"data_type\": \"DT_Battery\",\r\n>             \"incremental\": false,\r\n>             \"id\": 2510,\r\n>             \"reference\": \"battery-level\",\r\n>             \"conversion\": \"\",\r\n>             \"name\": \"Battery level\",\r\n>             \"last_received\": 1483010712,\r\n>             \"timeout\": 0,\r\n>             \"formula\": null,\r\n>             \"last_value\": \"100\",\r\n>             \"value_max\": 100.0\r\n>         }\r\n>     },\r\n>     \"id\": 401,\r\n>     \"xpl_stats\": { },\r\n>     \"commands\": { },\r\n>     \"name\": \"compteur gaz essai\",\r\n>     \"parameters\": {\r\n>         \"networkid\": {\r\n>             \"value\": \"MyHomeId\",\r\n>             \"type\": \"string\",\r\n>             \"id\": 564,\r\n>             \"key\": \"networkid\"\r\n>         },\r\n>         \"node\": {\r\n>             \"value\": \"38\",\r\n>             \"type\": \"integer\",\r\n>             \"id\": 565,\r\n>             \"key\": \"node\"\r\n>         },\r\n>         \"batterycheck\": {\r\n>             \"value\": \"y\",\r\n>             \"type\": \"boolean\",\r\n>             \"id\": 567,\r\n>             \"key\": \"batterycheck\"\r\n>         },\r\n>         \"instance\": {\r\n>             \"value\": \"1\",\r\n>             \"type\": \"integer\",\r\n>             \"id\": 566,\r\n>             \"key\": \"instance\"\r\n>         }\r\n>     },\r\n>     \"device_type_id\": \"ozwave.battery-level_meter-gas\",\r\n>     \"client_version\": \"0.5.3\"\r\n> \r\n> }\r\n\r\nBattery is saved correctly but the gas meter get error in xplgw.log:\r\n\r\n> 2016-12-28 21:44:58,232 domogik-xplgw DEBUG Getting item from the store queue, current length = 2, item = '{'sensor_id': u'2509', 'value': 11360.32, 'time': 1482957896}\r\n> '\r\n> 2016-12-28 21:44:58,234 domogik-xplgw DEBUG Send client status : alive\r\n> 2016-12-28 21:44:58,317 domogik-xplgw INFO Storing stat for device 'compteur gaz essai' (401) and sensor 'Gas' (2509) with value '11360.32' after conversion.\r\n> 2016-12-28 21:44:58,322 domogik-xplgw ERROR Error when adding sensor history : Traceback (most recent call last):\r\n>   File \"/home/domogik/src/domogik/bin/xplgw.py\", line 849, in run\r\n>     current_date)\r\n>   File \"/home/domogik/src/domogik/common/database.py\", line 1034, in add_sensor_history\r\n>     self.__raise_dbhelper_exception(u\"Error when adding data to sensor history. Sensor id = {0}  | Value = {1}  | Date = {2}. Error is {3}\".format(sid, value, date, tra\r\n> ceback.format_exc()))\r\n>   File \"/home/domogik/src/domogik/common/database.py\", line 1934, in __raise_dbhelper_exception\r\n>     raise DbHelperException(error_msg)\r\n> DbHelperException: u'Error when adding data to sensor history. Sensor id = 2509  | Value = 11360.32  | Date = 1482957896. Error is Traceback (most recent call last):\\n\r\n>  File \"/home/domogik/src/domogik/common/database.py\", line 895, in add_sensor_history\\n    last = last2[0]\\nIndexError: list index out of range\\n'\r\n> \r\n> 2016-12-28 21:44:58,323 domogik-xplgw DEBUG Getting item from the store queue, current length = 1, item = '{'sensor_id': u'2510', 'value': 97, 'time': 1482957897}'\r\n> 2016-12-28 21:44:58,323 domogik-xplgw INFO Storing stat for device 'compteur gaz essai' (401) and sensor 'Battery level' (2510) with value '97' after conversion.\r\n> "},"comment":{"url":"https://api.github.com/repos/domogik/domogik/issues/comments/269806675","html_url":"https://github.com/domogik/domogik/issues/411#issuecomment-269806675","issue_url":"https://api.github.com/repos/domogik/domogik/issues/411","id":269806675,"user":{"login":"tikismoke","id":2229691,"avatar_url":"https://avatars.githubusercontent.com/u/2229691?v=3","gravatar_id":"","url":"https://api.github.com/users/tikismoke","html_url":"https://github.com/tikismoke","followers_url":"https://api.github.com/users/tikismoke/followers","following_url":"https://api.github.com/users/tikismoke/following{/other_user}","gists_url":"https://api.github.com/users/tikismoke/gists{/gist_id}","starred_url":"https://api.github.com/users/tikismoke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikismoke/subscriptions","organizations_url":"https://api.github.com/users/tikismoke/orgs","repos_url":"https://api.github.com/users/tikismoke/repos","events_url":"https://api.github.com/users/tikismoke/events{/privacy}","received_events_url":"https://api.github.com/users/tikismoke/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T18:40:19Z","updated_at":"2016-12-30T18:40:19Z","body":"Cool, can't try before 2 days to be sure but nice to know. THANK'S"}}
{"actor":{"display_login":"tikismoke"}}