{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab2-addons/issues/805","repository_url":"https://api.github.com/repos/openhab/openhab2-addons","labels_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/805/comments","events_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/805/events","html_url":"https://github.com/openhab/openhab2-addons/issues/805","id":148978440,"number":805,"title":"Netatmo | Bindind won't work with thermostat","user":{"login":"jsiobj","id":2767956,"avatar_url":"https://avatars.githubusercontent.com/u/2767956?v=3","gravatar_id":"","url":"https://api.github.com/users/jsiobj","html_url":"https://github.com/jsiobj","followers_url":"https://api.github.com/users/jsiobj/followers","following_url":"https://api.github.com/users/jsiobj/following{/other_user}","gists_url":"https://api.github.com/users/jsiobj/gists{/gist_id}","starred_url":"https://api.github.com/users/jsiobj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsiobj/subscriptions","organizations_url":"https://api.github.com/users/jsiobj/orgs","repos_url":"https://api.github.com/users/jsiobj/repos","events_url":"https://api.github.com/users/jsiobj/events{/privacy}","received_events_url":"https://api.github.com/users/jsiobj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"clinique","id":3328789,"avatar_url":"https://avatars.githubusercontent.com/u/3328789?v=3","gravatar_id":"","url":"https://api.github.com/users/clinique","html_url":"https://github.com/clinique","followers_url":"https://api.github.com/users/clinique/followers","following_url":"https://api.github.com/users/clinique/following{/other_user}","gists_url":"https://api.github.com/users/clinique/gists{/gist_id}","starred_url":"https://api.github.com/users/clinique/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clinique/subscriptions","organizations_url":"https://api.github.com/users/clinique/orgs","repos_url":"https://api.github.com/users/clinique/repos","events_url":"https://api.github.com/users/clinique/events{/privacy}","received_events_url":"https://api.github.com/users/clinique/received_events","type":"User","site_admin":false},"assignees":[{"login":"clinique","id":3328789,"avatar_url":"https://avatars.githubusercontent.com/u/3328789?v=3","gravatar_id":"","url":"https://api.github.com/users/clinique","html_url":"https://github.com/clinique","followers_url":"https://api.github.com/users/clinique/followers","following_url":"https://api.github.com/users/clinique/following{/other_user}","gists_url":"https://api.github.com/users/clinique/gists{/gist_id}","starred_url":"https://api.github.com/users/clinique/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clinique/subscriptions","organizations_url":"https://api.github.com/users/clinique/orgs","repos_url":"https://api.github.com/users/clinique/repos","events_url":"https://api.github.com/users/clinique/events{/privacy}","received_events_url":"https://api.github.com/users/clinique/received_events","type":"User","site_admin":false}],"milestone":null,"comments":24,"created_at":"2016-04-17T18:13:42Z","updated_at":"2016-07-02T07:14:26Z","closed_at":null,"body":"Hello,\r\n\r\nI just tried the newly merged netatmo binding and I can't get it to work.\r\nI jave just a thermostat, no weather station.\r\n\r\nWhen adding Netatmo API thing, I keyed in required parameters and only select Thermostat. API thing is added and claim to be \"online\". \r\n\r\nLogs are showing the following : \r\n```\r\n17:21:34.832 [INFO ] [smarthome.event.ItemAddedEvent      ] - Item 'netatmo_netatmoapi_63c511be' has been added.\r\n17:21:34.880 [INFO ] [rthome.event.ItemThingLinkAddedEvent] - Link 'netatmo_netatmoapi_63c511be-netatmo:netatmoapi:63c511be' has been added.\r\n17:21:35.402 [WARN ] [covery.NetatmoModuleDiscoveryService] - 404 Not Found\r\n17:21:35.601 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'netatmo:netatmoapi:63c511be' changed from INITIALIZING to ONLINE\r\n```\r\nBut if I am going back to API thing config, both Weather station and Thermostat are selected.\r\n\r\nI am not sure at this point if thermostat should be discovered \r\n\r\nI tried anyway to add it as a new thing and add a new \"Thermostat module\" using the following params :\r\n\r\n```\r\n{\r\n  \"body\": {\r\n    \"modules\": [\r\n      {\r\n        \"_id\": \"xx:xx:xx:xx:xx:xx\", <= used for Module ID\r\n        ...\r\n        \"main_device\": \"yy:yy:yy:yy:yy:yy\", <= used as device ID\r\n        \"module_name\": \"Thermostat\",\r\n        \"type\": \"NATherm1\",\r\n       ...\r\n```\r\n\r\nIt then also show up \"online\"\r\n\r\nI then added Thermostat relay using the following params :\r\n```\r\n\"devices\": [\r\n      {\r\n        \"_id\": \"zz:zz:zz:zz:zz:zz\", <= used as equipement ID\r\n        \"cipher_id\": \"aaaaaaaaaaa...\r\n```\r\n\r\nThis time it won't go online and I get the following error :\r\n```\r\n17:34:20.527 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'netatmo:NAPlug:2a0453b1' changed from ONLINE to OFFLINE: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 1880 path $.body.devices[0].therm_program..program_id\r\n```\r\n\r\nAs I understand it, a third party lib based on swagger.io and @cbornet Netatmo swagger declaration is used.\r\n\r\nIn startScan call, [here](https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/discovery/NetatmoModuleDiscoveryService.java#L68-L72), devicelist is used. But as it is deprecated, I wanted to try the new getthermostatdata with the new json file @clinique proposed [here](https://github.com/cbornet/netatmo-swagger-decl/issues/2).  But I could not find a way to build the lib. How do you build netatmo-java-retrofit-1.0.0.jar ? Directly using swagger-code-gen ?\r\n\r\nAlso, it runs (or at list tries) devicelist for both weather station and thermostat, which, I guess should not be the case if one of them is not selected. In my case, It seems the second call to devicelist is never reached because the first fails with 404 error.\r\n\r\nI am not really a java developper... and OpenHAB is a quite complex software... so if anyone could give me some directions, that would be great.\r\n\r\nThanks !\r\nJS"},"comment":{"url":"https://api.github.com/repos/openhab/openhab2-addons/issues/comments/230088317","html_url":"https://github.com/openhab/openhab2-addons/issues/805#issuecomment-230088317","issue_url":"https://api.github.com/repos/openhab/openhab2-addons/issues/805","id":230088317,"user":{"login":"mccaffm","id":15037810,"avatar_url":"https://avatars.githubusercontent.com/u/15037810?v=3","gravatar_id":"","url":"https://api.github.com/users/mccaffm","html_url":"https://github.com/mccaffm","followers_url":"https://api.github.com/users/mccaffm/followers","following_url":"https://api.github.com/users/mccaffm/following{/other_user}","gists_url":"https://api.github.com/users/mccaffm/gists{/gist_id}","starred_url":"https://api.github.com/users/mccaffm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mccaffm/subscriptions","organizations_url":"https://api.github.com/users/mccaffm/orgs","repos_url":"https://api.github.com/users/mccaffm/repos","events_url":"https://api.github.com/users/mccaffm/events{/privacy}","received_events_url":"https://api.github.com/users/mccaffm/received_events","type":"User","site_admin":false},"created_at":"2016-07-02T07:14:26Z","updated_at":"2016-07-02T07:14:26Z","body":"Thanks, understand the time it takes, I just couldn’t see the relevant merge in the swagger-api.. must have missed it\r\n\r\n\r\n\r\nFrom: clinique [mailto:notifications@github.com]\r\nSent: 02 July 2016 08:12\r\nTo: openhab/openhab2-addons <openhab2-addons@noreply.github.com>\r\nCc: Mike McCaffery <mike@mccaffery.co.uk>; Comment <comment@noreply.github.com>\r\nSubject: Re: [openhab/openhab2-addons] Netatmo | Bindind won't work with thermostat (#805)\r\n\r\n\r\nYes, hopefully. The swagger definition file is updated and I'm currently reviewing all the binding to remove obsolete API calls. Sorry, takes a bit of time.\r\n\r\n—\r\nYou are receiving this because you commented.\r\nReply to this email directly, view it on GitHub<https://github.com/openhab/openhab2-addons/issues/805#issuecomment-230088246>, or mute the thread<https://github.com/notifications/unsubscribe/AOV1cln8pZ4TrfUgAoS4SG_VsxlcQ8TDks5qRg9SgaJpZM4IJOM7>.\r\n"}}
{"actor":{"display_login":"mccaffm"}}