Skip to content

Commit

Permalink
Merge branch 'hotfix/client-had-explicit-ip' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
simonreeves committed May 5, 2023
2 parents f8c60a5 + 0565f1d commit fb03d67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions an_farmview/client/envmonitor.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
import requests
import pprint

import an_farmview.snmp

def post():
url = 'http://127.0.0.1:5000/envmonitor'
url = f'{os.getenv("AN_FARMVIEW_API_URL")}/envmonitor'

data = {
"temperature01": an_farmview.snmp.get_temperature_rear(),
Expand All @@ -15,7 +16,7 @@ def post():
pprint.pprint(r.json())

def get():
url_get = 'http://127.0.0.1:5000/envmonitors'
url_get = f'{os.getenv("AN_FARMVIEW_API_URL")}/envmonitors'
getr = requests.get(url_get)
pprint.pprint(getr.json())

Expand Down

0 comments on commit fb03d67

Please sign in to comment.