New binding EmonCMS persistence service

Hi guys,

I’ve written a persistence binding for Emoncms ( to store energy monitoring datas.

I needed this to store a big number of datas (1300+) from my installation, with a time based persistence strategy.
You can configure a delay to wait for multiple store requests, in order to limit requests to the server. (1300 requests takes a few minutes to complete).
With an appropriate delay configuration (like 1000ms), it’s done in a few seconds.
Configurating a 0ms delay will just send a request to the server for each store request (appropriate for event based persistence strategies)

Code and Jar are available.

The binding uses the json api of emoncms and only allows to send datas to inputs.

Hope it helps.

Nice one - that is very useful!


I try to persistence, however I do not get it done.
I have done according to me, however, the correct settings nothing is being transferred to emoncms.

Below is my config

I also created a file (emoncms.persist) in the$ {} openhab.home / configuration / persistence directory.

Should I also get some set?

The dates of all items sent or can I choose this?

################## Emoncms Persistence Service

# # the url of the emoncms server (optional, default is


# the emoncms API-Key for authentication (mandatory, generated on the emoncms server or website)


# the node number (optional, default is 0)


# if the value should be rounded (optional, default is false)


# the interval is ms between sends in order to store multiple object within one request # default is 0, in this case each store request results in a request to the server



do you see any error in the logs?

There is a problem with your configuration file. emoncms:round should be set to “true” or “false” (or commented), not 0.
That might just solve it.

If it doesn’t, can you show your emoncms.persist file ?

I’ve successfully tested this bindig with OH2.b3
@Kai; @moutemoute38 Is there a way to introduce this binding in the distribution?

Yes, see

Thank you for this information.
I don’t have the technical skills to create the karaf-feature package.
@moutemoute38 could you take this in charge?

The fact that the binding isn’t in OH1 disitrib isn’t a problem? For me it seems the first thing to do.
Sadly I don’t have much time to handle this right now. I delivered the code because it was working and I hope it helps someone.
I might have more time to do it during the summer, but if someone wants to handle it, no problem for me.

Hallo, can somebody write a short configuration manual how ti implement in OH2?


  1. Put the jar into the addon folder
  2. OH2: put the configuration file in “conf/Service” eg. emoncms.cfg? Is the name correct to find the file?
  3. create in conf/persistence the file “emoncms.persistence” -> Do I write something in the file?


In OH 2 works the binding fine. But when updating or restart it often happens that the emoncms not work.
After removing the binding and re-add it to the commnuicatie gets going again.

@moutemoute38 can you fix this?


Hi Ferry, thank you for response. I will try again. Can you write a short instruction (version of OH2, link to emoncms jar file, etc.). How looks your configuration file? (api-key).


To all developer!

Is there a possibillity to change “emoncms-peristence” to “Bindings”? This would be great. Then we can use both, for example mysql-persistence and emoncms binding.


1 Like