forked from Kelder/cammiechat
Added cammiewatcher
This commit is contained in:
parent
12c261b0b1
commit
c17fa92ec1
1 changed files with 8 additions and 0 deletions
8
cammiewatcher.py
Normal file
8
cammiewatcher.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
import requests
|
||||
import time
|
||||
|
||||
while True:
|
||||
data = requests.get("https://kelder.zeus.ugent.be/camera/api/info").json()
|
||||
cammie_watchers = data['connections']['/']
|
||||
r = requests.put('http://10.0.0.10/api/mailbox.json', json={'message':str(cammie_watchers), 'topic': 'cammie'})
|
||||
time.sleep(1)
|
Loading…
Reference in a new issue