3. Log Remotely

In addition to local logging, we also offer an optional remote data logging and visualisation service called Emoncms.org running a slightly reduced feature set to that available locally for applications where remote logging is required. Emoncms.org is a pay-as-you-go service but all OpenEnergyMonitor shop hardware purchases come with 20% free emoncms.org credit which is designed to give 5-10 years of free use. See Emoncms.org pricing for more information.

It is also possible to self-host our open source emoncms software on your own remote server, we have a nice installation script to help with this for use with Debian systems, see EmonScripts.

Posting data to a remote server such as emoncms.org is particularly useful for applications that require public dashboards as there is usually more bandwidth for many users to access the same dashboard than available over a household or remote monitoring site connection. Remote data logging is also useful for applications that require aggregation or remote data analysis. The OpenEnergyMonitor system provides both local and remote options so that you can choose the right tool for your application.

1. Create an emoncms.org account

remote log1

  • Browse to Emoncms.org
  • Create account or log-in with existing account
  • Select Account
  • Copy Read-Write API key to clipboard

remote log1

2. Enter API key into local Emoncms

remote log1

  • Log-in to local Emoncms on your local network e.g. http://emonpi or http://192.168.X.X*
  • Navigate to emonHub > Edit Config tab
  • Scroll down the emonHub config, in the [[emoncmsorg]] section pate in your Emoncms.org Read/Write API key overwriting the xxxxxxxxxxxxxxx value
  • Click Save

* IP address is shown on emonPi LCD

Advanced emonhub.conf configuration guide

3. Setup Emoncms.org Input Processing

Posting to multiple Emoncms accounts

The emonPi can post to other remote Emoncms accounts as well as or instead of emoncms.org. To post to another Emoncms account create another EmonHubEmoncmsHTTPInterfacer section in emonhub.conf e.g :

    Type = EmonHubEmoncmsHTTPInterfacer
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://my-awesome-emoncms-server-url
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        senddata = 1                    # my-awesome-emoncms-server
        sendstatus = 0                  # Enable sending WAN IP to Emoncms MyIP
        sendinterval= 10                # Bulk send interval to post in seconds

Multiple emonPi’s posting to a single Emoncms.org account

It’s possible to setup multiple emonPi’s posting to a single Emoncms.org account, this is useful if you want to monitor several installations with a single login. By defaut data from sensors connected directly to the emonPi are tagged in Emoncms with node ID 5. If multiple emonPi’s are posting to the same account we need to set a different node ID to each emonPi.

1. Change emonPi node ID

The emonPi’s node ID can be changed in the EmonHub Config Editor. Login to *local Emoncms then browser to Setup > EmonHub, in the [interfacers] section change baseid = 5 to a different number: 4, 3, and 2 are recommended since these node ID’s are not already allocated:

remote log1

2. Update emonPi Node Decoder

After changing the emonPi node ID we also need to update the EmonHub node decoder to enable local Emoncms to decode the data from the emonPi with the updated node ID. To do this scroll further down the emonhub config page to the [Nodes] section and change [[5]] to the new emonPi node ID e.g. 5, 3, or 2. Then click Save to save changes.

See here for detailed emonhub config documentation.

To start the emonPi’s posting to the same emoncms.org account paste in the same Emoncms.org read-write API key into each emonPi’s emonhub config file as detailed above.