Oemgateway: Warning Send Failure

Like my title says, i get a send failure when the raspberry pi wants to send data to my emoncms.

DEBUG Server 192.168.1.150/emoncms -> send again data: [10, 0, 0, 0, 0, 0, 233]
2013-09-25 13:11:25,106 DEBUG Data string: &time=1380107184&node=10&json={1:0,2:0,3:0,4:0,5:0,6:233}
2013-09-25 13:11:25,109 DEBUG URL string: http://192.168.1.150/emoncms/input/post.json?apikey=e1920d3307665asygst542a5523c7c&time=1380107184&node=10&json={1:0,2:0,3:0,4:0,5:0,6:233}
2013-09-25 13:11:25,113 INFO Sending to 192.168.1.150/emoncms
2013-09-25 13:11:25,128 WARNING Send failure

 

when I paste the url in my browser, a node is visible in emoncms,

http://192.168.1.150/emoncms/input/post.json?apikey=e1920d3307665asygst542a5523c7c&time=1380107184&node=10&json={1:0,2:0,3:0,4:0,5:0,6:233}

 

the date is wrong from my raspberry, and should look into that

 

anybody who knows how to fix this 'send failure' problem?

thanks in advance

  • API key changed for security reasons - Paul (moderator)
davime's picture

Re: Oemgateway: Warning Send Failure

anybody tips on how to set the date and time right for the raspberry pi?

I can't seem to find it :(

pb66's picture

Re: Oemgateway: Warning Send Failure

Normally the Pi's time and date is maintained automatically if it has a working internet connection, this could well be linked to your oemgateway issue above if there is a network issue.

But to be out by almost a year is unlikely to be just synchronization. 

If you are using the older IPE-R1 based OEMGateway image, updating it using sudo apt-get update can trigger issues like these, so do not be tempted to update if you haven't already.

There is a lot on google and the raspberry pi forum on setting the time and date on a Pi as there are several methods, ongoing updates and timezones to consider so the subject is a quite large one, especially as time sync issues could indicate a deeper issue IF there is a working internet connection.

The warning from oemgateway indicates it sent a url string but did not get the response it expected,

Are you using a read-only image or is emoncms on the same Pi?

Did this "just happen" or did something trigger the problem?

When did it last work correctly?

How are you accessing the Pi via ssh ? Has there always been a working internet connection?

 

davime's picture

Re: Oemgateway: Warning Send Failure

Hi thanks for the information,

The pi is already running a couple of days and the date is still worng.

I've already tried the apt-get update, so would it be better to start with a new gateway image?

 

I tried to ping my host and all my packages are received.

Any idea whats going wrong?

 

The reason why the date was so old, was that I didn't have a lot of time for my energy project, and the first time not everything was going like it should be (turns out my rental home has a 3phase without neutral energy connection). And I gave up for getting it ok.

 

But now I'm trying to get it ok

pb66's picture

Re: Oemgateway: Warning Send Failure

I've already tried the apt-get update, so would it be better to start with a new gateway image?

I think that's probably a good idea, the latest image uses emonhub, which is based on the oemgateway and similar to use. The latest image is also built on Raspbian rather than the RPI-R1 which is the root of the issues caused by updating via apt-get.

Paul

davime's picture

Re: Oemgateway: Warning Send Failure

thx for the input,

the october 22,2013 image, is that the latest gateway image file?

pb66's picture

Re: Oemgateway: Warning Send Failure

The latest image is emonSD-13-08-14.img  see https://github.com/emoncms/emoncms/blob/bufferedwrite/docs/setup.md

Paul

davime's picture

Re: Oemgateway: Warning Send Failure

hi pb66,

I've installed the new sd image on the pi, and after some time the date and time are ok,

 

now I get the error:

2014-09-13 09:19:58,213 WARNING Send failure: wanted 'ok' but got ""

 

But still I cant see my pi in the emoncms screen.

I can ping and traceroute my host with emoncms on it from the pi

Is there something I dont understand about the setup :s

greetz

pb66's picture

Re: Oemgateway: Warning Send Failure

There's not a lot to go on with the 1 line you've posted, it just tells us it didn't get a response to what it sent.

Have you set up your emoncms details in /boot/emonhub.conf correctly? if so we need to know a bit more about what's happening from the log. To get more info you can set the loglevel to DEBUG in emonhub.conf.

Paul

davime's picture

Re: Oemgateway: Warning Send Failure

Hi paul,

I checked the values and everything was ok,

I changed the loglevel from warning to debug, but the message didn't change much

raspberrypi ~ $ sudo service emonhub status
[ ok ] Checking OpenEnergyMonitor emonHub: emonhub process is running.
pi@raspberrypi ~ $ sudo service emonhub sop
Usage: /etc/init.d/emonhub {start|stop|status|restart|force-reload}
pi@raspberrypi ~ $ sudo service emonhub restart
[ ok ] Restarting OpenEnergyMonitor emonHub: emonhub has been restarted ok.

pi@raspberrypi ~ $ tail -f /var/log/emonhub/emonhub.log
2014-09-16 17:26:47,522 DEBUG 2 NEW FRAME : 1410881207.52
2014-09-16 17:26:47,524 INFO 2 Ignoring frame consisting of SOH character
2014-09-16 17:26:47,728 DEBUG 3 NEW FRAME : 1410881207.73 > 210g
2014-09-16 17:26:47,731 WARNING 3 Discard RX frame 'information' : ['>', '210g']
2014-09-16 17:26:47,934 DEBUG 4 NEW FRAME : 1410881207.93
2014-09-16 17:26:47,936 INFO 4 Ignoring frame consisting of SOH character
2014-09-16 17:26:48,141 DEBUG 5 NEW FRAME : 1410881208.14 > 15i
2014-09-16 17:26:48,144 WARNING 5 Discard RX frame 'information' : ['>', '15i']
2014-09-16 17:26:48,361 DEBUG 6 NEW FRAME : 1410881208.36
2014-09-16 17:26:48,365 INFO 6 Ignoring frame consisting of SOH character
2014-09-16 17:28:39,990 DEBUG 7 NEW FRAME : 1410881319.99  10 0 0 0 0 0 0 0 0 0                                                            0 1 1
2014-09-16 17:28:39,996 DEBUG 7 Timestamp : 1410881319.99
2014-09-16 17:28:39,999 DEBUG 7      Node : 10
2014-09-16 17:28:40,002 DEBUG 7    Values : [0, 0, 0, 0, 0, 257]
2014-09-16 17:28:40,029 DEBUG 7 Append to 'emonCMS' buffer => time: 1410881319.9                                                           9, data: [10, 0, 0, 0, 0, 0, 257], ref: 7
2014-09-16 17:28:40,133 INFO Sending: http://192.168.1.150/emoncms/input/bulk.js               ... on?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1410881319.99,10,0,0,0,0,0,257]]&sent                                                           at=1410881320
2014-09-16 17:28:40,171 WARNING Send failure: wanted 'ok' but got ""
2014-09-16 17:28:40,275 INFO Sending: http://192.168.1.150/emoncms/input/bulk.js               ... on?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1410881319.99,10,0,0,0,0,0,257]]&sent                                                           at=1410881320
2014-09-16 17:28:40,292 WARNING Send failure: wanted 'ok' but got ""
2014-09-16 17:28:40,396 INFO Sending: http://192.168.1.150/emoncms/input/bulk.js               ... on?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1410881319.99,10,0,0,0,0,0,257]]&sent                                                           at=1410881320
2014-09-16 17:28:40,413 WARNING Send failure: wanted 'ok' but got ""
2014-09-16 17:28:40,517 INFO Sending: http://192.168.1.150/emoncms/input/bulk.js               ... on?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1410881319.99,10,0,0,0,0,0,257]]&sent                                                           at=1410881320
2014-09-16 17:28:40,534 WARNING Send failure: wanted 'ok' but got ""
2014-09-16 17:28:40,639 INFO Sending: http://192.168.1.150/emoncms/input/bulk.js               ... on?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1410881319.99,10,0,0,0,0,0,257]]&sent                                                           at=1410881320
2014-09-16 17:28:40,655 WARNING Send failure: wanted 'ok' but got ""
 

I also tried to ping my host again with success

PING 192.168.1.150 (192.168.1.150) 56(84) bytes of data.
64 bytes from 192.168.1.150: icmp_req=1 ttl=64 time=0.714 ms
64 bytes from 192.168.1.150: icmp_req=2 ttl=64 time=0.630 ms
64 bytes from 192.168.1.150: icmp_req=3 ttl=64 time=1.14 ms
64 bytes from 192.168.1.150: icmp_req=4 ttl=64 time=0.630 ms
64 bytes from 192.168.1.150: icmp_req=5 ttl=64 time=0.623 ms
64 bytes from 192.168.1.150: icmp_req=6 ttl=64 time=0.649 ms
64 bytes from 192.168.1.150: icmp_req=7 ttl=64 time=0.625 ms
64 bytes from 192.168.1.150: icmp_req=8 ttl=64 time=0.619 ms
^C
--- 192.168.1.150 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7006ms
rtt min/avg/max/mdev = 0.619/0.704/1.148/0.173 ms

Any ideas?

[10 further copies of this post held in the moderation queue have been deleted - Moderator (RW)]

pb66's picture

Re: Oemgateway: Warning Send Failure

The log looks ok, the URL looks correct. Both the oemgateway and emonhub installs have returned the same error.

Did this "just happen" or did something trigger the problem?

When did it last work correctly?

Which emoncms version are you running?

You could test an actual "failed" url by cutting and pasting it from the emonhub.log to a browser window and replace "E-M-O-N-C-M-S-A-P-I-K-E-Y" with the apikey cut and pasted from the emonhub.conf, when this is sent the browser should show "ok". 

Paul

davime's picture

Re: Oemgateway: Warning Send Failure

Hi Paul,

It never worked, I started with a new install.

First the emoncms server on an ubuntu system. version v8.3.5.

then I tried to set up the raspberry pi, but here I can't get it to connect.

When I paste the link in a browder I also get "", but when i leave the 'emoncms/' part, I get 'ok'.

Is that normal behavior?

On the emonhub.log i get

2014-09-18 22:11:13,509 DEBUG Receipt acknowledged with 'ok' from http://192.168.1.150/

But in my emoncms I still get the message that there is no raspberry pi found, and I can't see any inputs

There is something wrong with the emoncms server then?

thanks

pb66's picture

Re: Oemgateway: Warning Send Failure

I think the problem could well lie with the emoncms server as 

Is that normal behavior?

No, emoncms is normally accessed using http://IP.OF.THE.SVR/emoncms 

On the input api help page which you should be able to access a local copy of at http://192.168.1.150/emoncms/input/api there are examples posts which can also be used to test your server, when you are able to successfully use an URL to get an "ok" response and the inputs can be seen in on the inputs page then the server is functioning correctly and emonHub should work.

But in my emoncms I still get the message that there is no raspberry pi found

What message is this? I'm not sure where you are seeing this, emoncms in not aware of where the data comes from.

Paul

davime's picture

Re: Oemgateway: Warning Send Failure

thx for the info Paul,

when I go to the 'raspberrypi/config' page,I get this notification:

No data has been recieved from the RFM12Pi in the last 30s. Check if the Pi interface script is running, if not you may need to configure cron

 

Can you point me in the right direction to get the url right? I looked at my apache config, and all the steps from emoncms are done. I don't have a lot of linux knowledge and certainly not af an apache server.

When I go to my url: http//ipserver/emoncms, I see the website, but once I log in, the url changes and the 'emoncms/' part is gone, but everything works fine

Tia,

David

pb66's picture

Re: Oemgateway: Warning Send Failure

when I go to the 'raspberrypi/config' page,I get this notification:

No data has been recieved from the RFM12Pi in the last 30s. Check if the Pi interface script is running, if not you may need to configure cron

I'm not sure why you're seeing this, If I understood correctly you have a raspberry Pi running as a forwarder only and a seperate emoncms server running on Ubuntu. If that is correct and the RFM2Pi is fitted to the Raspberry Pi forwarder you do not need the raspberry Pi module installed to emoncms as it is not on a raspberrypi.

The raspberry pi module was the interface between emoncms and the rfm2pi module when they are on the same raspberry pi. If the RFM2Pi is installed on a separate machine you will not see the network or rfm2pi details in emoncms.

If they are installed on the same machine however, then emonhub and the raspberry pi module are competing for the same serial port and will not work.

I'm not very clued up the server side of things but I do believe that is where the error will be, you could try creating a emoncms.org account to confirm emonhub, the Pi, the RFM2Pi and your nodes are all functioning correctly.

I would also recommend rechecking the install guides as it may be that you followed a raspberry pi guide rather than a linux guide if you have installed the raspberry pi module (not that it should make a huge difference)

Paul

Comment viewing options

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