Community
OpenEnergyMonitor

Community

Emoncms.org posting problem

emonpi
Tags: #<Tag:0x00007f1bdc157e18>

(Jon Summers) #1

Following on from my fixed problem “input node keys seem to have moved”, I now have another issue which may or may not be related. The unit now fails to upload to emoncms.org and I get the the following error in the emonhub log -

2018-12-10 17:16:25,801 WARNING emoncmsorg send failure: wanted ‘ok’ but got ‘’
2018-12-10 17:16:55,910 WARNING emoncmsorg emoncmsorg couldn’t send to server, URLError: [Errno -2] Name or service not known

Any suggestions on how to fix this would be appreciated. The emonhub configuration file still looks correct and this was working right up until the input node key autogenerated incorrectly (see previous post). This is on version 9.8.28.

Many thanks.


(Trystan Lea) #2

Hello @Jonno, could you include further lines from emonhub.log, in particular lines including the data your sending to emoncms.org?

Name or service not known: sounds like a DNS issue. I wonder if rebooting your router and pi might fix it?


(Jon Summers) #3

Hi Tristan.
I have rebooted both several times which has not helped. I have been fiddling though :slight_smile: and added a new emoncms1.org config in emonhub with the same details. That did not help so I deleted it. I then commented out the original emoncms.org config in the file, rebooted, removed the comments and then rebooted again. That didn’t help either.

Now in the emonhub log after reboot I see an error which may be significant:

2018-12-13 18:19:43,723 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2018-12-13 18:19:43,724 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2018-12-13 18:19:43,726 ERROR    MainThread Unable to create 'emoncmsorg' interfacer: 'runtimesettings'

Now in the regular part of the log I do not see any attempt to connect to emoncms.org. The repeated part of the log is shown below.

2018-12-13 18:20:20,990 INFO     MQTTCould not connect...
2018-12-13 18:20:23,719 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 20 83 118 20 85 32 $2018-12-13 18:20:25,396 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 5 75 181 200 169 13$2018-12-13 18:20:26,007 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 25 19 33 113 88 231$2018-12-13 18:20:28,070 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 4 72 43 32 62 127 2$2018-12-13 18:20:28,280 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 9 146 64 174 6 79 6$2018-12-13 18:20:30,339 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 7 91 60 125 119 217$2018-12-13 18:20:30,749 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 0 209 169 176 146 2$2018-12-13 18:20:30,859 DEBUG    RFM2Pi     11 NEW FRAME : OK 7 140 10 255 255 0 0 17 0 14 98 184 11 184 $2018-12-13 18:20:30,863 DEBUG    RFM2Pi     11 Timestamp : 1544725230.86
2018-12-13 18:20:30,864 DEBUG    RFM2Pi     11 From Node : 7
2018-12-13 18:20:30,865 DEBUG    RFM2Pi     11    Values : [2700, -1, 0, 17, 251.02, 300, 300, 300, 300, $2018-12-13 18:20:30,866 DEBUG    RFM2Pi     11RSSI : -64
2018-12-13 18:20:30,867 DEBUG    RFM2Pi     11 Sent to channel(start)' : ToEmonCMS
2018-12-13 18:20:30,868 DEBUG    RFM2Pi     11 Sent to channel(end)' : ToEmonCMS
2018-12-13 18:20:30,976 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 5 202 14 101 240 19$2018-12-13 18:20:31,037 INFO     MQTTConnecting to MQTT Server
2018-12-13 18:20:31,141 INFO     MQTTconnection status: Connection successful
2018-12-13 18:20:31,143 DEBUG    MQTTCONACK => Return code: 0
2018-12-13 18:20:31,245 INFO     MQTTon_subscribe
2018-12-13 18:20:31,486 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 17 34 231 207 33 39$

Thanks for looking,

Jon


(Trystan Lea) #4

Hello @Jonno still not sure what’s going on. What does your emoncmsorg section in emonhub.conf look like, here’s the default version for the emonpi:

(please blank your apikey as below)

[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://emoncms.org
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        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

(Jon Summers) #5

Hi,

*** edited this post as it was not correct - will redo with correct information ***

Thanks,

Jon


(Paul) #6

It seems you have 2 issues, the second one is a minor self inflicted “typo” most likely added whilst debugging the first issue and is easily fixed.

    [[[runtime settings]]]

should not have a space, it should be

    [[[runtimesettings]]]

This is causing the

2018-12-13 18:19:43,726 ERROR    MainThread Unable to create 'emoncmsorg' interfacer: 'runtimesettings'

error and once you edit that, I’m pretty confident that fault will clear.

However, unless something else has changed along the way, the original

2018-12-10 17:16:55,910 WARNING emoncmsorg emoncmsorg couldn’t send to server, URLError: [Errno -2] Name or service not known

error may return.

I have seen this error a few times and in my experience it has always been a networking issue rather than a fault or bug with emonhub (or it’s config/settings).

Once you edit the “runtimesettings” can you confirm if the original fault is still there or not. If it is, can you expand on the following comment from your other recent thread?

Do you mean you have set up your emonPi with a static IP? I wonder if there could be an issue with the dnsserver settings.

what do you see if you type ping emoncms.org -c5 at the commandline?
Here is a good response

[email protected]:~ $ ping emoncms.org -c5
PING emoncms.org (80.243.190.58) 56(84) bytes of data.
64 bytes from 58-190-243-80.rackcentre.redstation.net.uk (80.243.190.58): icmp_seq=1 ttl=55 time=14.5 ms
64 bytes from 58-190-243-80.rackcentre.redstation.net.uk (80.243.190.58): icmp_seq=2 ttl=55 time=17.0 ms
64 bytes from 58-190-243-80.rackcentre.redstation.net.uk (80.243.190.58): icmp_seq=3 ttl=55 time=17.0 ms
64 bytes from 58-190-243-80.rackcentre.redstation.net.uk (80.243.190.58): icmp_seq=4 ttl=55 time=19.6 ms
64 bytes from 58-190-243-80.rackcentre.redstation.net.uk (80.243.190.58): icmp_seq=5 ttl=55 time=18.2 ms

--- emoncms.org ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 14.586/17.315/19.607/1.659 ms

and an example bad response (by fudging the url for test purposes)

[email protected]:~ $ ping Xemoncms.org -c5
PING Xemoncms.org (92.242.132.15) 56(84) bytes of data.

--- Xemoncms.org ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4187ms

[EDIT - Parts of this post may no longer apply since the previous post has been wiithdrawn whilst I have been writing]


(Jon Summers) #7

Hi Paul and Trystan,

All fixed now thanks and very embarrassing!

Paul spotted the typo at the same time as me (I’m going to try and blame iPad auto correct but it could have been me :slight_smile: ).

The real fix was DNS as Paul (and Trystan) suggested. This was another typo with two digits transposed - so hard to blame auto correct for that. :frowning:

Sorry to waste your time.

Thanks again,

Jon