EmonTx not updating emonPi

Dear Paul,

I did all the upgrade acc. Glyn post.
The situation is the same unfortunatelly.
Concerning the led blinking a observ the follows :
Emon TX green led blinking every cca 10 sec.
RFM69Pi red led blinking cca 5 -8 sec.
The rfm69pi board connected to the same place like it before, no toch on the antenna soldering joint, on this position in the beginning the whole system worked. I don’t change on this side.
No other software installed on the raspi only the latest image fomr the openenergy monitor site.
The red led blinking on the RFM69PI means received packet or what else ?
Before I re installed the hole system I try to monitor the serial line with minicon.
But I could open minicon only if the Serial line was disabled in the rpi-config.
I was astonished when I set the system to rpi-rw, then enable the serial line in sudo raspi-config then I try to open with minicon after a reboot, ttyAMA0 but I got an answer that permission denied.
If I disable the serial line in raspi-config I can open the minicon, but I don’t see communication.
Or I set disable the serial line in wrong place or how else can be the debug work for RFM69PI?

Thanks for your effort in advance.

And if you switch off the emontx does the flashing stop (or reduce significantly) on the rfm69pi also? this would confirm the packets receipts at the rfm69pi are most likely from the emonTx.

The serial port access is already set in the emonSD image, and it can be confusing to set manually. The serial option is for a serial console not a serial port as we want it to be. So we need the serial console disabled so that we can use the serial port, this is why you needed to “disable serial” in raspi-config to use miniport, that would be correct and that is how it should be set.

Only 1 software can use the serial port so once you have disabled “serial console” in raspi-config you should reboot and check emonhub.log again, if no data is coming in from the rfm69pi, stop emonhub from using the serial poer with sudo service emonhub stop and try using minicom, any permission issues can be overcome by using sudo before the minicom command.

With minicom set to /dev/ttyAMA0 and a 38400 baud, you should be able to see some traffic if you send “?” it should list the options menu even if it’s not receiving data via rf or set to the wrong group or freq etc.

You can test the Pi’s serial port further if you want to get in a bit deeper. If you have a suitable link wire with terminals, remove the rfm69pi and put a link between the Pi’s GPIO pins 8 and 10 (labelled in the image below as pins 14 TXD and 15 RXD under the heading “UART”).

( If you do not have a suitable linkwire you can borrow the JP2 link from inside your emonTx,) Once those 2 pins are safely shorted together, anything you type in minicom’s “send” should echo in “received” when TXD is linked directly to RXD.

Obviously apply appropriate caution when trying something like this, powering down before attempting to connect the link or the rfm69pi as necessary.

Dear Paul,

I’m really happy that both of you are try to help me.
If I switch the Emon TX off the Red led blinking is top on the RFMPI69.
To me that means that I have comunication between the Emon TX and RFMpi69.
But why I still don’t see on the Emoncms Input?

Abouth the minicom terminal, I have some problems.
I read through theRFM69 Wiki and I try the commands which is written there, but it seems that they are not working.
example :
sudo rpi-serial-console disable
rpi-serial-console status

After you wrote that on the raspi config I disable /enable serial console and not serial port,
I think that this is the reasion why my system doesn’t work and I try the following two command according the sd card installation guideline :

Disable serial console boot

sudo systemctl stop [email protected]
sudo systemctl disable [email protected]

The system do something no erroror eny feedback arrived.
My questions is the following, does it need or not ?
Or the SD image configured to disable the serial port automatically ?
After I did this I got answer from the system when I enter the followings:
minicom -b38400 -D/dev/ttyAMA0
that such file or directory not available

So what can I check next ?

Please write down the commands.
I assume that I have to enable serial port again and then open minicom and check the RFM69Pi if it’s receive packets or not.

Thanks for you support

Dear Glyn,

If I click on the http://emonpi:1880 I got a feedback on my pc that website is not available.

on some networks hostname lookup does not work. You will need to replace emonpi with your emonPi’s local IP address. If you’re on windows, you could try http://emonpi.local:1880

Dear Glyn,

I will try it once I go home.
Turn back to your scrip suggestion.
How can I run this script on raspi ?
What would be the result of the script running ?

I would like to realy recover my sytem back to life, and I’m wondering, If after a totall system installation (I erased the partitions from the sd card and I mounted again the lates img file) my system doesn’t recovered, hence not to many things changed. I didn’t removed the rfmpi69 from the IO port, I just modified tha Emon TX ino files with the modified calculation values, and than the system collapsed…
Sorry for the too many question, but I’m not so good in RPI/Linux usage, But I 'm on the right way with you to learn a lot abouth it.
If you sad that If I order a prebuilded SD card to exclude that I made something wrong during update or install the system I will do it. But I would realy now if it’s a softwer problem or hardwer problem.
Do I have any waranty for the RFM69 board if we detect that it’s failed ?
I read on another topic that some watchdog issue happen and it cause freeze on rfmpi69 Node change and some other thing as well :
RFM69Pi stops updating/freezes - #10 by adpeace

Do I have to read those forums depper or the issue solved in new version (I bought 3 weeks ago the modul)

Thanks a lot for sour support.

Correct. it means that what ever is being transmitted by the emonTx is most likely being received at the rfm69pi, that the RF part appears to be working ok.

That one test does not tell us that the packet is valid or that it is being passed on to the serial port, but it is still a good sign,

Correct. Those commands belong to a redundant utility called rpi-serial-console that used to be installed on the older SD card images, but not the latest.

As previously mentioned, the image should already have the serial console correctly disabled and yes it is essential this is the case, you should not need to do it on a pre-built image but now you may have altered it’s state you must do some checks to be sure it is correct.

There are currently 2 things needed for the serial UART to work. Firstly “console=serial0,115200” must NOT be present in /boot/cmdline.txt, if it is remove it, and secondly IF there is a “enable_uart” setting at the end of /bootconfig.txt,it should be set to “=1” not “=0”. This second part is only found on some later builds so it depends on whether you have updated the original image with apt-get or not or if you built your own image, whether it is needed. (note the emonSD image also has some additional serial mapping mods for Pi 3 but hopefully they will not affect your Pi 2)

AND REBOOT for any adjustments to take effect.

Then stop emonhub using sudo service emonhub stop and try minicom -b38400 -D/dev/ttyAMA0, if you get the same "file or directory not available" response try using sudo minicom -b38400 -D/dev/ttyAMA0`. If still no joy, show us what is listed by the following command?

ls -la /dev/{tty{AMA,S,USB},serial}*

this should list all available serial/usb devices eg.

pi@raspberrypi:~ $ ls -la /dev/{tty{AMA,S,USB},serial}*
ls: cannot access /dev/ttyS*: No such file or directory
ls: cannot access /dev/ttyUSB*: No such file or directory
lrwxrwxrwx 1 root root          7 Oct 31 16:31 /dev/serial1 -> ttyAMA0
crw-rw---- 1 root dialout 204, 64 Oct 31 16:31 /dev/ttyAMA0

If there is any activity seen in minicom report it here so we can take a look and check the configuration.

If there is any uncertainty over whether the serial port is functioning correctly or not, you could load a regular Raspian image to your SDcard to test the rfm69pi, this will firmly exclude any possibility of something else trying to access the serial port (eg emonhub) whilst testing and ensure any pre-existing emonSD serial port settings are not conflicting with the more recent “enable_uart=0” setting.

Since both the “serial” settings are on the /boot partition you can make these changes prior to putting the sd card in the Pi and it should be correct on first boot

Dear Paul,

I checked commandline.txt no content included for serial port.
Then I stopped emonhub but minicom still send answer that no such file in directory.

ls -la /dev/{tty{AMA,S,USB},serial}* command can’t executed, just:
ls la /dev/{tty{AMA,S,USB},serial}*

I got answers that :
can’t acces to /dev/ttyAMA no such file in directory
can’t acces to /dev/ttys no such file in directory
can’t acces to /dev/ttyusb no such file in directory
can’t acces to /dev/serial no such file in directory

Dear Paul &Glyn,

I realy don’t understand something.
If I install the latesd image file to the Raspi (emonSD-03May16.img), and than I do the follows :

rpi-rw
sudo apt-get update & sudo apt-get upgrade
sudo apt-get dist-upgrade

Do I need to do anything else on the Raspi to let work with the RFMpi69 ?
According the investigations what we did till now the serial port disabled as it’s written in the latest image file.
I decided again to erase all the partition from the SD card, and format again, than I mount the emonSD-03May16.img. again, I insert it to the raspi and I did the following upgareds:

rpi-rw
sudo apt-get update & sudo apt-get upgrade
sudo apt-get dist-upgrade

But the situation still the same no input received on emon cms, even if the red /green led’s are blinking.

Afternoon I try again minicom terminals hence I don’t understand, last time why I failed to run it (see my previous post …

What can be the problem If I have “virgin” new installed and updated system, new PCB boards EmonTX,
RFMPI69, nothing changed… I think just a small issue can be which cause this freez to me.

I assume, that righ now after the 3rd. installation the Serial port disabled (by latest img).
So now to check the RFMPI69 serial communication I have to enable the serial port somehowe.

Please write to me how can I enable the serial port to check with minicom the communication.
An how I have to disable afterwards.

Dear Glyn I can enter to nodeRed, where I have to enter the scrip exactly ?

What will be the output, or what will happen after I run the script ?

Thanks the support.

You shouldn’t need to do anything, but I cannot be sure and if you are having repeated problems there is a strong possibility there is an issue caused by updating, unless of course there is a hardware/firmware issue with the rfm69pi that cannot be confirmed because you are unable to do controlled testing in a known good environment,

The original image definitely worked before updating, but some users have reported issues after updating the Raspbian OS and packages through apt-get dist-upgrade but as far as I know there are no known issues, Glyn says it is ok to upgrade on a RPi 3 but I have no idea about a Pi 2, and new upgrades come out all the time, what was ok yesterday might not be today.

As I have said there is some serial port mapping on the emonSD image intended for the Pi 3, as changes are made to the Raspbian OS image I cannot predict if that will definitely play nicely with the emonSD settings for all Pi’s.

You would have been better to install a “virgin” emonSD image and not update it until after we have it working, But better still, just install a stock Raspian Jessie with “console=serial0,115200” deleted from /boot/cmdline.txt and install Minicom, nothing else, do not update or upgrade it. Then we can test the rfm69pi properly.

Until the rfm69pi is producing data nothing else matters, it is your data source for the Pi, the data goes rfm69pi => emonhub => publish to mqtt => nodered or emoncms etc. If emonHub see’s no data it cannot publish data to mqtt, if there is no data on mqtt, neither emoncms or nodered will get data.

If you install a stock Raspbian OS image as described I will try and help you further, please try and focus on the one problem, once we know your rfm69pi is passing data you can switch to the emonSD knowing there is data coming in, until you know that you cannot make any progress.

The serial port is definitely enabled on the pre-built image. I can see from reading your posts on the top of this thread that your RFM69Pi was working fine in the past.

I think I know the reason why Emoncms is not updating, it’s caused by the dist-upgrade updating the version of Mosquitto. I won’t go into details you can read this thread if your interested:

To fix you need to run emonPi update via local Emoncms (Setup > Admin > emonpiupdate) then reboot. Mosquitto MQTT server should now be running. You can check with:

sudo service mosquitto status

and view the log, you should see mosquitto version 1.4.10

head /var/log/mosquitto/mosquitto.log


Even if the data is not getting any further than emonHub we should be able to see the serial data coming directly from the RFM69Pi. You can view the serial data using minicom:

sudo minicom -D /dev/ttyAMA0 -b38400

Stopping emonhub is not necessary. When minicom is open press ‘v’ to return the RFM69Pi’s version number and RF config. Exit minicom with [CTRL + A] then [X then Enter]. Please paste here any data you see in minicom.

If you are still not having any luck I could send you a replacement RFM69Pi to test next week

Dear Paul, Glyn,

Thanks for your detailed information.
I removed the RFM69PI and connected to a PC via RS232-TTL converter.
I receved the followings:

My observation is the following not every packet received hence I put 3 cm next toeach other the emon tx and the RFMPI69. Sometime only the 5th or 6th packet received, than the following 2-3 received than 6 not again.
But apart from that the RFMP69 provide received data.
Please check it if the data format is the correct one according theprintscreen.
Now I destroyed again all the partition and mounted the (emonSD-03May16.img) to the SD card.
I didn’t made any update, just push the card in and run the PI.
I can confirm, that still no Input visible in emoncms.

To sum up, it seemt that EmonTX send data and RFMPI69 receive packets and the serial communication works on the RFMpi69 modul.

What doI have to do for checking ?
Thank you for your patienty in advance.

Great, so the RFM69Pi is working !

Can you run minicom on the Pi:

sudo minicom -D /dev/ttyAMA0 -b38400

Is the RF69Pi fitted onto the Pi as showin in the photo?

Dear Glyn,

yes I fitted acc. photo.
yes the minicom runing, but don’t show received packet
Please take consideration that I just putted the virgin latest img file, no update is done, no any other command entered just now the minicom.

Dear Glyn, Paul,

In the meantime I installed into a separated SD card a RASPBIAN JESSIE WITH PIXEL.
I disabled the serial port logging in into the kernel in raspi-config , than I checked the
/boot/cmdline.txt as well.

Than I restarded the system, and start the minicom.
I didn’t see any serial communication on the RFMPI69.
Then I switched off and removed the RFMpi69 then I closed shortly the RX - TX pins on Raspi.
Than switch the system back, and no echo received in minicom.

Now I’m on that point that my RX TX line damaged / killed by RFMPI69.

The instresting thing is that nothing was connected to the port just the RFMPI69 when last time 2 weeks ago worked the whole system perfectly. Then I didn’t remove the RFMPI69 from raspberry. I just shut down the system, and I did modifycation only on EmonTX Arduino files (calibration was done)

Please confirm if your statment is the same that the RX TX line dead on my raspi .
Further question If I by a new raspberry, what is the guarantee, that it won’t be killed by the RFMpi69 board again ?

Thanks for your feedback in advance.

Yes, it sounds like this is the correct diagnosis: The Rx / Tx line on your Pi has somehow faulty. We have not heard of the RFM69Pi causing this issue before. However on this occasion since you have had so much trouble we will send you a replacement RaspberrPi. Please let me know if the serial work when the replacement arrives.

Dear Glyn ,

I can’t find words for your kindly support, and great problem solving.
Thank you in advance the replacement Rasp. I’m 100 % sure that it will work, because we exclude every other failure.

Dear Glyn,

thank you very much, the Raspi 3 arrived on last week.
I didn’t have time to try it till now.
Do I need to make a complete new installation on the sd card, or I can insert it to PI3 the already installed SD card ?

Thank you advance for your feedback.

It should be fine to use existing sd card. If you still having issues then maybe try starting with a fresh sd card image

Dear Glyn,

I have realy good news.
I tried and the raspberry PI 3 what you had send, works perfect.
It receive the RX packets and send it to emoncms.org as well, now it works like mine before the RX Tx line stopped working .
Now 100% percent sure that my previous raspi board RX TX line killed before. I hope that this board will “survive”

Thank you again for your great support, and generosity guys.

Norbert…

2 Likes