forked from BjoernSch/MaverickBBQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwritetogoogledrive.py
More file actions
28 lines (21 loc) · 811 Bytes
/
writetogoogledrive.py
File metadata and controls
28 lines (21 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import maverick
import requests
import time
pushover_token = "[TOKEN HERE]"
pushover_user = "[USER KEY HERE]"
ifttt_key = '[IFTT API HERE]'
def pushtempstoifttt(datatopush):
datatopush = datatopush[1:-1]
datatopush = datatopush.split(",")
r= requests.post('https://maker.ifttt.com/trigger/BBQ_log/with/key/'+ifttt_key, params={"value1":datatopush[0],"value2":datatopush[1],"value3":""})
def pushover_temp(notif):
import http.client, urllib
conn = http.client.HTTPSConnection("api.pushover.net:443")
conn.request("POST", "/1/messages.json",
urllib.parse.urlencode({
"token": pushover_token,
"user": pushover_user,
"message": notif,
}), { "Content-type": "application/x-www-form-urlencoded" })
conn.getresponse()
pushtempstoifttt(str(maverick.worker()))