I found a very nice little program by for transferring data from my new Victron units to Emoncms GitHub - Paulf007/dbus-emoncms: A Python Script to upload Victron data to Emoncms directly from CCGX / Color control
It works great posting to emoncms.org, but I just can’t get it to post to my local server on http://192.168.0.200
I guess it’s due to the http rather than the https connection, but I just can’t get the syntax right. Code:
# --------------------------------------------- upload data to emon --------------------------------------------------------------- #
try:
conn = httplib.HTTPConnection(server)
conn.request("GET", "/"+emoncmspath+"/input/post.json?&node="+str(nodeid)+"&json="+"{"+payload+"}"+"&apikey="+apikey)
response = conn.getresponse()
conn.close()
print "Emondata sent:" + payload
except Exception as e:
print "error sending to emoncms...: " + str(e)
return [0]
return [1] ''
What do I do to have this software connect to http://192.168.0.200?