Hi everyone, as the subject says the feeds stop updating sometimes after few hours, sometimes after some days.
Here is my setup:
- Raspberry PI + external HDD with RFM12Pi v 2.6
- [EDIT] I'm using the pre-built images (http://emoncms.org/site/docs/raspberrypihdd)
- 1 Emontx sending 5 inputs to emonbase
- Already tried setting emonglcd time sending interval to 0 or to a different value: same behaviour
- The rfm12piphp service was restarted with the log option
Here is what I see when the problem occurs:
- The led on the RFM12Pi doesn't blink anymore (while the one on the EmonTx still flashes every 10 s)
- The Raspberry PI page on the web interface says that everything is working as expected (green message on top of page)
- I can ssh into the emonbase.
- From the ssh console I check the status of the rfm12piphp service: it says that it is running and that the log is turned off (???? doing "tail rfmi12piphp.log" I see that the log is regularly updating!!)
- If, from the web interface, I try to change the frequency (from 868 to 433 MHz) the log shows the message "Frequency set: 4" and nothing else (shouldn't there be a sort of ack?)
- Trying to connect with minicom to /dev/AMA0 it doesn't work
- If I restart the service "sudo service rfm12piphp restart log" the feeds are still inactive but this time the message on top of the Raspberry PI web page reveals a problem: "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"
- The minicom still doesn't work and also the log is not being populated anymore
- It seems exactly the same problem described in the first part of the thread http://openenergymonitor.org/emon/node/2947. Apparently the RFM12Pi becomes stuck. Unfortunately the subject of the thread changes and no solution is found to this problem.
- Performing a soft reboot (without unplugging the PSU) nothing changes. To have my feeds back I need to physically cut the power.
Does anyone has an idea on how to further debug this problem?
Thanks in advance.
Federico.
[EDIT]
I've just seen that 5 days ago a firmware update has been checked-in (https://github.com/mharizanov/RFM2Pi). It should include some RFM2Pi bug fixes. I'm going to try it in the next few days and let you know if it works for my problem too.
Re: [SOLVED?] Feeds not updating after random time
Have you disabled the Raspberry Pi serial console?
https://github.com/lurch/rpi-serial-console
Re: [SOLVED?] Feeds not updating after random time
Thank you for your reply.
For sure I'll take into account your advice but before that I'd like to see what happens with the new firmware (see the edit at the end of my first post).
If the problem persists then I'll try to disable the serial console. I prefer not to mix these 2 workarounds otherwise it won't be clear which is the good one.
I'll let you know.
Regards,
Federico.
Re: [SOLVED?] Feeds not updating after random time
Ah, disabling the serial console isn't really a workaround, it's an absolute requirement really!
Re: [SOLVED?] Feeds not updating after random time
Hi,
sorry but my first post was not clear enough about my emonbase setup. I forgot to mention that I'm using the pre-built images and, after checking (/etc/inittab), I discovered that the serial console is disabled by default. So this cannot be the source of my problem. Thank you anyway for your help.
Now I'm trying the new RFM2Pi firmware. Let's see what happens.
I'll let you know.
Regards,
Federico.
Re: [SOLVED?] Feeds not updating after random time
Hi,
at present (after 6 days from my last post) the problem hasn't come back yet, so it seems that the RFM2Pi firmware update did the trick.
I do hope this to be the last post in this thread. Another reply would mean problems again...
Regards,
Federico.
Re: [SOLVED?] Feeds not updating after random time
Mine just locked up after running for 3 days. Only a complete shutdown and restart brought it back. I looked through the logs and there was nothing indicating what went wrong. It's a new RFM12Pi on a RPi running the hard drive image. I ran git pull on emoncms and it's up to date.
I'll keep and eye on it and see if it happens again.
Re: [SOLVED?] Feeds not updating after random time
Just a quick reply that unfortunately is not going to help you. Mine worked without problems for almost 1 month. Then I had to switch it off (because I needed the RPi for another job).
Let us know if the problems occurs again.
Best regards,
Federico.
Re: [SOLVED?] Feeds not updating after random time
I think the problem is not solved.
I have an arduino with 6 temperature sensors, sending data every 15 seconds, thanks to Ethernet shield..
Every 3 o 4 days, I have to "reset" mi system, because seems not to arrive data to emoncms.org. Las time was yesterday, as you can see in the image attached.
The code to send data is:
// this method makes a HTTP connection to the server:
void sendData()
{
Serial.println("Connecting...");
// if there's a successful connection:
if (client.connect(server, 80))
{
// send the HTTP GET request:
client.print("GET /api/post?apikey=");
//Serial.print("GET /api/post?apikey=");
client.print(apikey);
//Serial.print(apikey);
if (node > 0) {
client.print("&node=");
client.print(node);
}
client.print("&json={Sensor0");
//Serial.print("&json={Sensor0");
client.print(":");
//Serial.print(":");
client.print(TempInCelciusf[COLECTOR1]);
//Serial.print(TempInCelciusf[0]);
client.print(",Sensor1:");
client.print(TempInCelciusf[COLECTOR4]);
client.print(",Sensor2:");
client.print(TempInCelciusf[EXTERIOR]);
client.print(",Sensor3:");
client.print(TempInCelciusf[TANQUESUP]);
client.print(",Sensor4:");
client.print(TempInCelciusf[TANQUEINF]);
client.print(",Sensor5:");
client.print(TempInCelciusf[CASA]);
client.print(",Bomba:");
client.print(pumpWorking);
client.print(",Bomba2:");
client.print(pumpWorking2 + highSpeedFan);
client.println("} HTTP/1.1");
//Serial.println("} HTTP/1.1");
client.println("Host:emoncms.org");
//Serial.println("Host:emoncms.org");
client.println("User-Agent: Arduino-ethernet");
//Serial.println("User-Agent: Arduino-ethernet");
client.println("Connection: close");
//Serial.println("Connection: close");
client.println();
//Serial.println();
// note the time that the connection was made:
lastConnectionTime = millis();
}
else
{
// if you couldn't make a connection:
Serial.println("Connection failed");
Serial.println("Disconnecting...");
client.stop();
}
}
Any idea ?
Re: [SOLVED?] Feeds not updating after random time
Aicanduit,
You've attached your issue to a thread that doesn't appear to be related to your issue.
this thread is about a problem with the RFM12Pi raspberry pi attachment, which had an issue
that appears to have been solved in the latest firmware.
From your brief description , you are not using the RFM12Pi.
If this is the case, you are more likely to get an answer by opening a new post , this will also help people in the future who search the forum for either this problem of the problem you are having.
Re: [SOLVED?] Feeds not updating after random time
Mine just went again. So around 8 days before locking up and requiring a full power down the get going again.
Looked in the syslog but there wasn't anything indicating an error. Is there somewhere else I should be looking? The input page on emoncms just shows last updated getting bigger and bigger.
I did find this in the redis log file.
Re: [SOLVED?] Feeds not updating after random time
Hi Nigel,
when I encountered the problem, I had to upgrade the RFM12Pi_v2 firmware. To do that I followed the instructions about "Upgrading RFM12Pi Firmware Direct from the Pi" found on the page http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2
If you just perform a "git pull" for emoncms I'm afraid that it's not enough.
So, in case you haven't already tried, please read carefully throughout that wiki page.
Regards,
Federico.
Re: [SOLVED?] Feeds not updating after random time
Hi Federico,
I have been having the same problem the last month or so after changing to the HDD emoncms.
Just thought I'd let you know I have tried your idea of upgrading the RFM12Pi firmware. I will keep you informed if it seems to have solved the problem after a week or so.
Iain.
Re: [SOLVED?] Feeds not updating after random time
Upgrading the RFM12Pi firmware has worked for me - no more no more data problems.
Re: [SOLVED?] Feeds not updating after random time
Earlier today I had the same problem where my RFM12Pi V2 stopped working. Restarting RFM12PiPHP service and/or a reboot failed to cure the problem but unplugging the module enabled the serial port to start communicating again. The frequency had been changed from 868 MHz to 433 MHz so I corrected that and checked the rest of the settings but couldn't get the settings lock status to change from '1'.
By chance I had logging enabled at the time of the crash and the last entries for the radio were as below :-
MESSAGE RX:> 1b
FREQUENCY ERROR, RE SENDING FREQUENCY
DATA RX:
I have upgraded the firmware to the latest version as described above so fingers crossed. I've no idea which firmware version was already installed as I bought the RFM12Pi V2 from the OEM shop a few months ago.
Re: [SOLVED?] Feeds not updating after random time
I have been having the same problem. Emoncms crashes randomly (usually between 2 and 20 days after a re-start). For some reason, when this problem occurs, I can't SSH into my Raspberry Pi - it refuses to accept the password. The problem can only be fixed by turning off the power to the Pi and turning it back on again. I am using a hard drive, as recommended, to avoid problems with flash cards.
I have tried to upgrade the firmware on my RFM12Pi V2 using the second of the two approaches given on the RFM12Pi website (http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2). I am at the command:
$ git clone https://github.com/mharizanov/RFM2Pi.git
but there is a request for a user name and password. Is there a user name and password required for the github.com website?
Cancel the above. I tried again and it worked.
Re: [SOLVED?] Feeds not updating after random time
I had exactly the same problem. My RFM12Pi V2 crashed every two weeks or so.
I updated the firmware as described above, and it has now been working perfectly for more than 4 weeks.