mittlerweile habe ich es verstanden wie das Ganze installiert werden muss jedoch bekomme ich immer eine Exception beim ausführen.
Code: Alles auswählen
# tclsh netatmo-welcome.tcl
debug: script has started
warn: no stored credentials found
debug: requesting new token
debug: response was HTTP/1.1 200 OK
Server: nginx
Date: Sun, 05 Nov 2017 15:09:14 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-store
X-XSS-Protection: 1; mode=block
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=10886400; includeSubDomains
X-Powered-By: Netatmo
{"access_token":"at","refresh_token":"rt","scope":["access_camera","read_camera"],"expires_in":10800,"expire_in":10800}
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 410 0 229 100 181 229 181 0:00:01 --:--:-- 0:00:01 2611
debug: parsing authentication result
debug: returncode is 200
debug: access token is at
debug: refresh token is rt
debug: expires in 10800
debug: saving new access token to /tmp/netatmo-welcome.dat
notice: oauth token successfully initialized
debug: Retrieving camera data...
debug: Querying: https://api.netatmo.net/api/gethomedata?access_token=token&size=50
debug: Query response is: {"body":{"homes":[{"id":"id","name":"Zuhause","persons":[{"id":"0e99d802-d985-475b-....","last_seen":1507475935,"out_of_sight":true,"face":{"id":"....","version":1,"key":"..."},"pseudo":"Markus G"},
.................
{"city":"K\u00f6ln","country":"DE","timezone":"Europe\/Berlin"},"cameras":[{"id":"mac","type":"NACamera","status":"on","vpn_url":"urlxxx,,","is_local":true,"sd_status":"on","alim_status":"on","name":"Wohnzimmer","date_setup":{"sec":1480199769,"usec":55000}}],"events":[{"id":"....","type":"person","time":1509894502,"camera_id":"mac","person_id":"...","video_status":"deleted","is_arrival":false,"message":"<b>Jenny<\/b> gesehen"},
.....
....
message":"Wohnzimmer verbunden"}]}],"user":{"reg_locale":"de-DE","lang":"de-DE","country":"DE_DE","mail":"matthias@"},"global_info":{"show_tags":true}},"status":"ok","time_exec":0.043524026870728,"time_server":1509894554}
######################################################################## 100.0%
######################################################################## 100.0%
debug: errorRegExp: \{\"error\":\{\"code\":([0-9]*),\"message\":\"([^\"]*)\"\}\}
can't read "homes": no such variable
while executing
"log debug "RegExp Homes: $homes""
(file "netatmo-welcome.tcl" line 262)
#
D&G
Matthias