Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import wykop
- import time
- api=wykop.WykopAPI( "klucz" , "sekret")
- while True:
- on=api.tag("lampon")["items"][0]["date"]
- off=api.tag("lampoff")["items"][0]["date"]
- if on>off :
- print "on"
- requests.get("http://login:haslo@locla-ip/outs.cgi?out2=0")
- else:
- requests.get("http://login:haslo@locla-ip/outs.cgi?out2=1")
- print "off"
- time.sleep(10)
- #autor wytrzeszcz
- # https://github.com/p1c2u/wykop-sdk/blob/88ee190d4a572c0e60d4fea998c034d99b6b7761/README.rst
- # http://lankontroler.pl/pliki/listwa/man-ip-socket-pl.pdf
Add Comment
Please, Sign In to add comment