Community
OpenEnergyMonitor

Community

Clarification regarding api output

Tags: #<Tag:0x00007f87a93df508> #<Tag:0x00007f87a93df3c8>

The following api :- ‘/emoncms/input/get’

Is giving this output

 {
	"emonth5": {
		"temperature": {
			"time": 1568270676,
			"value": 29,
			"processList": ""
		},
		"external temperature": {
			"time": 1568270676,
			"value": 29,
			"processList": ""
		},
		"humidity": {
			"time": 1568270676,
			"value": 56.4,
			"processList": ""
		},
		"battery": {
			"time": 1568270676,
			"value": 2.8,
			"processList": ""
		},
		"pulsecount": {
			"time": 1568270676,
			"value": 1,
			"processList": ""
		},
		"rssi": {
			"time": 1568270676,
			"value": -71,
			"processList": ""
		}
	},
	"emonpi": {
		"power1": {
			"time": 1568270693,
			"value": 53,
			"processList": ""
		},
		"power2": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"power1pluspower2": {
			"time": 1568270693,
			"value": 53,
			"processList": ""
		},
		"vrms": {
			"time": 1568270693,
			"value": 230,
			"processList": ""
		},
		"t1": {
			"time": 1568270693,
			"value": 27.1,
			"processList": ""
		},
		"t2": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"t3": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"t4": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"t5": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"t6": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"pulsecount": {
			"time": 1568270693,
			"value": 0,
			"processList": ""
		},
		"rssi": {
			"time": null,
			"value": null,
			"processList": ""
		}
	}
}

Here I am getting 2 attributes one is “emonth5” and second is “emonpi”.
Now I have two questions to ask

  1. Can there be multiple “emonth” sensors in the api output like emonth1, emonth2…etc if the device is configured that way or the structure of the output will be different?
  2. The api output is having various attributes but I an not able to figure out what key is giving me wired temperature and which one is giving wireless temperature value?

Your posted data has somehow got corrupted in posting it.

If you paste the output directly into jsonlint.com (and validate it), I think the structure will become clear to you.

Thanks Brain,
I have fixed the data above but I am more interested in getting the wired and wireless temperature which I am not able to figure out as the attributes have temperature as key here. So if you could point out which temperature key is referring to what wired and wireless that will be really helpful.

emonth5:temperature = the emonTH standard on-board internal temp sensor
emonth5:external temperature = the emonTH optional externally wired temp sensor

emonpi:t1 = the first (of up to 6) emonPi optional wired temp sensor

So depending on your prospective there are currently 2 “wired” and one internal on-board OR there is one wired (directly to the emonpi) and 2 wireless (connected to the emonTH)

1 Like

@dhawal If you have connected an external sensor to the EmonTH, put it in a glass of Ice/Hot water and see the reported temperature change :grinning:.

Or just holding the sensor tightly in your hand should cause the temp to rise significantly.

1 Like