4. Log Remotely


« Previous step: Log Locally

Next step: Dashboards »


Data can also (optionally) be posted remotely to Emoncms.org. Posting data remotely has the advantage of being able to easily access your data from anywhere on the web without having to open access to your local emonPi:

1. Create Emoncms.org account

remote log1

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 Setup > emonHub
  • Scroll down the emonHub config, in the [[emoncmsorg]] section pate in your Emoncms.org R/W API key overwriting the xxxxxxxxxxxxxxx value.
  • Hit Save

Advanced emonhub.conf configuration guide

3. Setup Emoncms.org Input Processing

If no appear in Emoncms.org emonHub.log on emonHub page of Local Emoncms for debugging


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 :

[[my-emoncms-server]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        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 (requires My IP installed)
        sendinterval= 10                # Bulk send interval to post in seconds

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 direclty 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 recomended since these node ID’s are not already allocated:

remote log1

2. Update emonPi Node Decoder

After changing the emonPi node ID we also needto update the EmonHub node decoder to enablelocal 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.



Next step: Dashboards »