Raspberry pi with emonsd posting to emoncms.org

Hi all,

I have the latest emonsd (07nov16) runnig as a local emoncms server and working well. I have been trying to mirror my data to emoncms.org to view some data when I am not at home without opening access to my emonpi as suggested in this guide: 3. Log Remotely - Guide | OpenEnergyMonitor

It looks easy, I have only copy-pasted the read-write apikey but I can’t get the inputs on emoncms.org. I don’t understand. I have restarted the emonpi without success, and the emonhub log looks well:

You did use your emoncms.org APIkey, and not the emonPi one?

Hi Robert, yes i use emoncms.org read and write API.

This is the code of configuration (without the API):

[[emoncmsorg]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
    pubchannels = ToRFM12,
    subchannels = ToEmonCMS,
    url = https://emoncms.org
    apikey = XXXXXXXXXXXemoncms.orgXXXXX
    senddata = 1                    # Enable sending data to Emoncms.org
    sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
    sendinterval= 30                # Bulk send interval to Emoncms.org in seconds

Your emonhub config looks correct. Has your emonPi got an internet connection? What’s your local network setup? Could a local firewall be stopping your emonpi from getting to the internet. Maybe it’s a DNS issue.

Can you connect via ssh then try to ping Google?

ping 8.8.8.8

What’s your username for your emoncms.org, would you like me to check to see if all looks correct in your emoncms.org account? Feel free to PM me if you don’t want to post your username publicly.

@copderoc where does your data originate? You say you are running emonSD but no mention of an emonPi or RFM2Pi, just a RPi.

The short log you posted shows a good connection with emoncms.org, the “ok” reply confirms the url and apikey are ok and pretty much rule out a dns or firewall issue too.

However none of the 5 successful requests contain any data and there are no signs of any data being processed at all for over 2 mins. If you are still receiving data at your local emoncms it would suggest that data is not coming via emonhub and therefore emonhub won’t be able to duplicate it and send it to emoncms.org.

If your data is coming via emonhub, can you provide a longer log that shows that data successfully passing to the local emoncms and failing to reach emoncms.org, if emonhub cannot post to emoncms.org it usually logs clues as to why that might be.

Hi all,

Glyn, I think that emonpi connection is well, I will try to ping google this afternoon, now I am not at home. My emoncms username is “copderoc” like here. My home network setups is only 2 unmanaged switches with the raspberry pi and some computers, printers, and 2 arduinos, and a router to go out. No more.

Paul my configuration at this moment is one arduino getting some sonsors
data and posting it to a raspberrypi with emonsd and emoncms local
server via ethernet. I’ts not an emonpi, it’s a generic raspberry with
emonsd. Another arduino in the same network is posting data also to the
same emoncms server, and pulling data to display in a lcd.
This data is received in emoncms as inputs to generate feeds. I don’t understand what is really emonhub.Thanks.

Ok, it sounds like your Arduino(s) might posting direct to the local emoncms instance if you are using Ethernet. If that’s the case and your Arduino sketches are configured using the url and apikey for the local emoncms and sending direct to the local instance then you will need to modify your sketch to post to a second location (emoncms.org) also, there is no way for the local emoncms to forward that data to emoncms.org for you.

emonhub is the software that is used to collect data from the RFM2Pi or emonPi hardware (and other sources) and forward it to 1 or more emoncms instances, it is redundant if all the data is flowing directly to emoncms. The log you posted and the “[[emoncmsorg]]” configuration are both part of emonhub and unused by your current setup if you are posting direct to emoncms from the Arduino(s)

pb66 Ok! Thanks! I will try posting directly to emoncms.org from the arduino sketch.