Posting locally and to emoncms.org?

I've read the guide (https://github.com/emoncms/emoncms/blob/bufferedwrite/docs/setup.md)  but as a beginner I still need to know exactly what to write when I want to post locally and forward to emoncms.org.

pb66's picture

Re: Posting locally and to emoncms.org?

In emonhub.conf you will need to create a second reporter, you currently have something along the lines of

# This reporter sends data to emonCMS
[[emonCMS]]
      Type = EmonHubEmoncmsReporter
      ​[[[init_settings]]]
      [[[runtimesettings]]]
            url = http://emoncms.org 
            apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

so below that add something like​

[[Another_emonCMS]]
      Type = EmonHubEmoncmsReporter
      ​[[[init_settings]]]
      [[[runtimesettings]]]
            url = http://localhost/emoncms 
            apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"Another_emonCMS" can be any unique name, localhost can be an IP address or URL (sometimes localhost doesn't resolve on some servers) and the apikeys will of course be specific to each emonCMS too.

Paul 

eugen66's picture

Re: Posting locally and to emoncms.org?

Thank you very much for the quick reply ;)

Dafroberts's picture

Re: Posting locally and to emoncms.org?

Hi, 

I'm trying to do the same but cannot get the above script to work, I get the following error message in the log 

2015-01-30 18:58:56,048 WARNING Could not get settings: Error parsing config file: Invalid line at line "42".
2015-01-30 18:59:06,960 CRITICAL Error parsing config file "/boot/emonhub.conf": Invalid line at line "42".
2015-01-30 18:59:26,525 CRITICAL Error parsing config file "/boot/emonhub.conf": Invalid line at line "42".
2015-01-30 18:59:56,400 CRITICAL Error parsing config file "/boot/emonhub.conf": Invalid line at line "42".

Any ideas what am I doing wrong??

Dafydd

pb66's picture

Re: Posting locally and to emoncms.org?

Hi, There is an error reported with line 42 of the emonhub.conf. Check over the edits you made, can you post a copy of your conf?

​Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.