Do you think it would be hard to modify the Domoticz code to have support for emonCMS?
I think the "node" from emonCMS is similar to the "idx" from Domoticz.
If you go to http://www.emoncms.org and login with username esp8266nu & password esp8266nu
There you can read the API on: http://emoncms.org/input/api
Code: Select all
Input API
Apikey authentication
If you want to call any of the following actions when your not logged in, add an apikey to the URL of your request: &apikey=APIKEY.
Read only:
Read & Write:
Available HTML URLs
The input list view http://emoncms.org/input/node
This page http://emoncms.org/input/api
Input processing configuration page http://emoncms.org/input/process?inputid=1
Available JSON commands
To use the json api the request url needs to include .json
Post data
JSON format: http://emoncms.org/input/post.json?json={power:200}
CSV format: http://emoncms.org/input/post.json?csv=100,200,300
Assign inputs to a node group http://emoncms.org/input/post.json?node=1&csv=100,200,300
Set the input entry time manually http://emoncms.org/input/post.json?time=1444424907&node=1&csv=100,200,300
APIKEY
To post data from a remote device you will need to include in the request url your write apikey. This give your device write access to your emoncms account, allowing it to post data.
For example using the first json type request above just add the apikey to the end like this: http://emoncms.org/input/post.json?json={power:200}&apikey=ef612d3deee58fbed7cdde3933dd8759
Bulk data
You can provide data using bulk mode http://emoncms.org/input/bulk.json?data=[[0,16,1137],[2,17,1437,3164],[4,19,1412,3077]]
The first number of each node is the time offset (see below).
The second number is the node id, this is the unique identifer for the wireless node.
All the numbers after the first two are data values. The second node here (node 17) has two data values: 1437 and 3164.
Optional offset and time parameters allow the sender to set the time reference for the packets. If none is specified, it is assumed that the last packet just arrived. The time for the other packets is then calculated accordingly.
Legacy default format (4 is now, 2 is -2 seconds and 0 is -4 seconds to now): http://emoncms.org/input/bulk.json?data=[[0,16,1137],[2,17,1437,3164],[4,19,1412,3077]]
Time offset format (-6 is -16 seconds to now): http://emoncms.org/input/bulk.json?data=[[-10,16,1137],[-8,17,1437,3164],[-6,19,1412,3077]]&offset=-10
Sentat format: (useful for sending as positive increasing time index) http://emoncms.org/input/bulk.json?data=[[520,16,1137],[530,17,1437,3164],[535,19,1412,3077]]&sentat=543
Absolute time format (-6 is 1387730121 seconds since 1970-01-01 00:00:00 UTC)) http://emoncms.org/input/bulk.json?data=[[-10,16,1137],[-8,17,1437,3164],[-6,19,1412,3077]]&time=1444424907
Input actions
List of inputs http://emoncms.org/input/list.json
Delete an input http://emoncms.org/input/delete.json?id=1
Input process actions
Add an input process http://emoncms.org/input/process/add.json?inputid=1&processid=1&arg=-1&newfeedname=power
List input process list http://emoncms.org/input/process/list.json?inputid=1
Delete input process http://emoncms.org/input/process/delete.json?inputid=1&processid=1
Move input process http://emoncms.org/input/process/move.json?inputid=1&processid=1&moveby=1
Reset input process list http://emoncms.org/input/process/reset.json?inputid=1
Powered by openenergymonitor.org | v8.3.5