Post Shelly data to emoncms

Hello, for now my only monitoring of heat pump is Shelly EM with two channels, one for DHW, second for UFH.
I would like to have those nice charts on
With simple Python script running on RaspberryPI I can get shelly data parsed in lines like this:
2023-11-27 08:43:00 10W UFH
2023-11-27 08:44:00 10W UFH
2023-11-27 08:50:00 500W DHW

What is the correct format and interval to post it to

My beginners guess is to call url like this every minute:

Not sure if its OK, maybe it can be done in batch with longer interval.
If anyone has Python example for this, please let me know.

Hi Lukas
I am by no means an expert in Python or emoncms, but this worked for me when I started doing something very similar yesterday. I am posting data I get from my air source heat pump API every 60s to emoncms and graphing it nicely. I am not sending a lot of data so you might need something different.

url = ''+ emoncms_node_name + '&fulljson=' + json.dumps(json_data) + '&apikey=' + emoncms_write_api_key 

response = requests.get(url)

emoncms_node_name = a name of your choice (e.g Shelly EM)
json_data = a json object containing your data
emoncms_write_api_key = the API write key from your emoncms account

you might need to do some imports (e.g import requests and import json)

I then followed the guides in emoncms to create the feeds from the inputs and then onto the graphing

sorry it seems the formatter thought it was a link, I have put the url source code as an image in this post

The answer to

is this: When posting code or output, please put 3 ‘backticks’ (normally found at the top left of the keyboard) on a line of their own before the code, and 3 more backticks also on a line of their own after the code:


If it is something like php you can add a language identifier after the first 3 backticks: ```php or even ```text if you don’t want any language markup applied.

I’ve edited your post for you.
If you want to go and play in the Sandpit - feel free. Yes - I mean that, there’s a category “Sandpit”
(the last on the list) where nobody takes any notice, so you can experiment with formatting etc as much as you like.

I am trying input bulk now.
I can upload data successfuly into, i see it in the feeds and on graph as well, when i call this:[[1700739360,1,0,10]]&time=0

[time_stamp, node_id, power_dhw, power_room]

However when i do the same call with multiple records, lets say data from this morning, smthng like this:[[1700725860,1,2220,0],[1700725920,1,2236,0],[1700725980,1,2254,0],[1700726040,1,2268,0],[1700726100,1,2278,0],[1700726160,1,2286,0],[1700726220,1,2299,0],[1700726280,1,2314,0],[1700726340,1,2287,0],[1700726400,1,2260,0],[1700726460,1,2227,0],[1700726520,1,2194,0],[1700726580,1,2199,0],[1700726640,1,2198,0],[1700726700,1,2164,0],[1700726760,1,2173,0],[1700726820,1,2180,0],[1700726880,1,2149,0],[1700726940,1,2160,0],[1700727000,1,859,0],[1700727060,1,29,0],[1700727060,1,0,12],[1700740260,1,0,10]]&time=0

I get positive reply from server ‘‘ok’’ but the data is not there.
I dont know why it works with one record but not with mulitple. What could be the reason?
Should i use variable or fixed time series feed? Tried both with no improvement.

Have you tried manually sending some of the examples from Input API Help?

If those work, it is likely there’s an error in your data.