I followed the wiki about the blink,py script and when I try to run the script trough ssh I get an error.
https://www.domoticz.com/wiki/Device_blink
Code: Select all
De opdracht '"./blink.py"'
gaf foutcode 1 terug, samen met de foutmelding
Traceback (most recent call last):
File "./blink.py", line 57, in <module>
flash = flashing(domoticzurl, domoticzdeviceid_kaku)
File "./blink.py", line 49, in flashing
on = Domoticz(url).set_device_on(device_id)
File "./blink.py", line 34, in set_device_on
data = json.load(self.__execute__(url))
File "./blink.py", line 27, in __execute__
return urllib2.urlopen(req, timeout=5)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 401: Unauthorized.