https://www.domoticz.com/wiki/Presence_detection
In the script I only change these 3 rules (into my own data):
but I'm stuck after following al the steps. If I start my script manually in my terminal with:domoticzserver="192.168.2.1:8080"
domoticzusername = "admin"
domoticzpassword = "admin"
I get firstpython check_device_online.py MYIP xxxx 10 120
and than some errrors:script started
the status in domoticz of my switch does not change.File "check_device_online.py", line 101, in <module>
lastreported = domoticzstatus()
File "check_device_online.py", line 79, in domoticzstatus
json_object = json.loads(domoticzrequest(domoticzurl))
File "check_device_online.py", line 96, in domoticzrequest
response = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 110] Connection timed out>
If I open the log
it's empty. What can be the problem?check_device_online.py_myip.pid