forked from Paulf007/AxpertControl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHDO-VT.py
24 lines (18 loc) · 754 Bytes
/
HDO-VT.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /usr/bin/python
import urllib2
import httplib
# Domain you want to post to: localhost would be an emoncms installation on your own laptop
# this could be changed to emoncms.org to post to emoncms.org
server = "emoncms.trenet.org"
# Location of emoncms in your server, the standard setup is to place it in a folder called emoncms
# To post to emoncms.org change this to blank: ""
emoncmspath = ""
# Write apikey of emoncms account
apikey = "53863683c9745504ab727de6f736c94b"
# Node id youd like the emontx to appear as
nodeid = 14
# Send to emoncms
# initialization HTTPConnection
conn = httplib.HTTPConnection(server)
conn.request("GET", "/"+emoncmspath+"/input/post.json?&node="+str(nodeid)+"&json="+"NT:1,VT:0"+"&apikey="+apikey)
conn.close()