Multiple problems w. EmonTx and RFM69Pi

Thanks to all who’ve responded.

It seems as though the Bluetooth not being disabled was the killer tip.

So now I know that it was something stupid I was doing (or, rather, had omitted to do). Oops.

Oddly, my puzzlement was worsened by my sincere attempt to ‘rule out’ things; using the rtl_433 software to try and receive it (and finding it also not working) convinced me that the emonTx wasn’t transmitting anything, at least for a time.

And that mystery does still remain. I’d be intellectually satisfying to suss out why, though, since I bought the RFM69Pi and it’s working now, I’m tempted to let it slide.

Once, again, thank you again to all who’ve kindly taken time to respond. Very happy to see it working!

@pb66
It looks like this
https://wiki.openenergymonitor.org/index.php/RFM69Pi_V3
is lacking.

I’ve flagged it to Gwil.

2 Likes

Deeply happy with this.

Possibly, but that isn’t a characteristic or requirement of the rfm2pi’s, that is just a decision made for the emonSD/Pi etc.

The reason for the problem is that you are addressiing the bluetooth module on a Pi3 when you use “ttyAMA0”. If you use “ttyS0” on a Pi 3 and “ttyAMA0” on any other pi there is no real issue other than the BT is utilising the better serial port(on a Pi 3).

This is why the serial0 and serial1 addresses were introduced, they always address the same hardware, serial0 is always the gpio serial port, regardless of whether it is mapped to the better(ttyAMA0) or the lesser (ttyS0) serial ports.

Disconnecting the bluetooth is actually NOT needed, in fact many emonSD used reconnect it to use the bluetooth for the sunnyboy inverter interfacer in emonhub. To be accurate, the ports need SWAPPING only if you want to use the better serail port for the gpio, as long as you use the right address, which IS NOT /dev/ttyAMA0 unless you do go to the trouble of swapping.

[edit] here’s a better explanation Raspberry Pi Documentation - Configuration, when you “disable bluetooth” what you actually do is move the better serial port (ttyAMA0) to the gpio(serial0).

pi3-disable-bt disables the Bluetooth device and restores UART0/ttyAMA0 to GPIOs 14 and 15. It is also necessary to disable the system service that initialises the modem so it doesn’t use the UART: sudo systemctl disable hciuart .

effectively making it like any other non-Pi3 model Pi, but you could just go direct by using “serial0” which keeps the BT working (or use pi3-miniuart-bt overlay to swap them).

PS when I have made references to the Pi 3 above, it also applies to the Pi Zero WiFi too.

2 Likes

It is interesting that OEM can talk to a sunnyboy with a BT board in it.

I have a SB1200. I’ve not looked into whether I can install a bluetooth module in it, but instead had planned to simply install a CT on the output of it. Certainly something to look into in future, perhaps.

It certainly won’t hurt to mention that there is a problem with BT. That Wiki page is all about using a RPi & RFM69Pi together, so something that needs changing to facilitate that should have a mention, a pointer to the instructions, or the instructions.

2 Likes

My head exploded at this point :laughing:.

I agree with @Robert.Wall, that it would be really useful to update that Wiki page. My suggestion would be to simply point to that explanation you linked to and inform any user what to do. TBH I’m still not exactly clear what I’d actually need to do, especially if I wanted BT and emonhub.

I just knew that the UARTs were shared so turning off BT helped :smile:. The other info is really useful as if I’d understood I may well have continued the path I was on to rationalize 2 Pis one running BT presence and the other an RFM board.