New binding EmonCMS persistence service

Hi guys,

I’ve written a persistence binding for Emoncms (http://emoncms.org/) 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!

Hey

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 http://emoncms.org/)

emoncms:url=http://emoncms.org/

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

emoncms:apikey=XXXXXXXXXXXX


# the node number (optional, default is 0)

emoncms:node=1

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

emoncms:round=0

# 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

emoncms:sendinterval=0

Hi,

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 ?

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

Yes, see http://docs.openhab.org/developers/development/compatibilitylayer.html#how-to-add-a-successfully-tested-1x-add-on-to-the-distribution.

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?
Regards

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?

Example:

  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?

Greetings

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?

Thanks

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).

Greetings

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.

Greetings

1 Like