This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialize plotly credentials | |
plotly_tools.set_credentials_file(username='t_amond', api_key='REDACTED') | |
def update_plotly(self, url): | |
fileoption = 'extend' | |
time = datetime.datetime.now() | |
h,t = dht.read_retry(dht.DHT22, 4) | |
t = 9.0/5.0 * t + 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_notification(self, content): | |
# bot_id connects with created bot on dev.groupme.com, text is message | |
payload = { | |
"bot_id" : "REDACTED", | |
"text" : content | |
} | |
with requests.Session() as c: | |
c.post("https://api.groupme.com/v3/bots/post", data=payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_pushes(self, power_pin): | |
# Set variables | |
new_msgs = [] | |
website_bot_id = "REDACTED" | |
print(self.initial_pull) | |
# Send GET request to GroupMe | |
with requests.Session() as c: | |
# If this is the first cycle the system is running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function POSTwater() { | |
var bot = "BOTID"; | |
var msg = "water"; | |
jQuery.post("https://api.groupme.com/v3/bots/post", {bot_id: bot, text:msg}); //closes post | |
alert("POST sent."); | |
} | |
</script> |