Victron to Emoncms, “Get” syntax

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, but I just can’t get it to post to my local server on

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 --------------------------------------------------------------- #   
            conn = httplib.HTTPConnection(server)
            conn.request("GET", "/"+emoncmspath+"/input/post.json?&node="+str(nodeid)+"&json="+"{"+payload+"}"+"&apikey="+apikey)
            response = conn.getresponse()
            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

1 Like

Try printing the actual URL generated then typing that into a browser window and see what happens.

I note you never print the response? what response do you get - that will be a big clue.

The 2 servers do need different API keys.

I tried printing and pasting into browser window, and to my surprise I got the response:

{“success”: false, “message”: “Format error, json value is not numeric”}

Turnes out one of the parameters has the value “None” in stead of “0.00” and that posting works fine if I remove the parameter. Odd though that “None” seem to work when posting to

1 Like

One check is to paste the resulting JSON into

The json input format is a json like format and not true JSON.

Using the fulljson format is, I think, more tolerant and just fires a NAN into the emoncms input stream.