Raspi 2 inputs?

I'd like to try and connect the emontx3 directly to the raspi as per this setup http://openenergymonitor.blogspot.co.uk/2014/03/direct-connection-emontx...

But I'd also want the raspi to receive bluetooth serial data as well via a bluetooth dongle then store and send both the emontx3 and bluetooth data to emoncms (via a wifi dongle)

Is this possible ie to receive data from the emontx3 and via bluetooth?

Also I assume connecting the emontx3 directory to the Pi means I can't connect the RFM12Pi as well right?

Thank you.



pb66's picture

Re: Raspi 2 inputs?

If by "bluetooth dongle" you mean usb dongle then that should not effect the GPIO's serial UART, so they can both be physically connected to the Pi without conflict but you will need to write an interface script for the bluetooth dongle to "handle" the data.

To use the direct serial connection between emonTx and emonhub you would use an "EmonHubSerialInterfacer" as discussed in this thread.

You are quite correct that connecting an emontx via serial wil prevent use of a rfm2pi, however if you did want to add an RF network and did not want to just move the emontx from a direct connection to the new "rfm2pi based" network you can use a JeeLink which is a usb version of the original JeeNode the rfm2pi is based on,

The same " EmonHubJeeInterfacer " settings would be used but with " com_port = /dev/ttyUSB0 " or similar depending on the address allocated by the Pi, emonHub is fully JeeLink compatible .

With regard to the "bluetooth dongle" software you could probably write a small script to present data frames to emonhub via a socket as discussed here and here.

One small area of uncertainty is the automatic allocation of usb addresses by the Pi, you need to be sure that when the Pi restarts it re-allocates the same addresses to the jeelink and bluetooth or there maybe confusion.


mtran's picture

Re: Raspi 2 inputs?

Thank you for the reply. I'm researching atm and quite new to everything.

yes, bluetooth dongle is usb. which will be either this

CSR - http://www.ebay.com.au/itm/MINI-USB-2-0-Bluetooth-Dongle-Adapter-Wireles...


csr 4 - http://www.ebay.com.au/itm/V4-0-Mini-USB-2-0-Bluetooth-Dongle-Wireless-A...


1. I assume emonhub is installed on the Pi and its the software that handles the serial data and sends it to emoncms or does it include emoncms?

So I have to add code (an interface script) into it to process the bluetooth data as well?

2. The jeelink plugs into Pi so that it can talk to other 'sensors' using the Rf network? And to enable the jeelink, I make slight changes to the code in emonhub.

3. If I don't have a jeelink, then I don't need to worry about "automatic allocation of usb addresses by the Pi" correct?


sorry for the naive questions and thank you for your help.







pb66's picture

Re: Raspi 2 inputs?

Yes, emonhub is an interface software, The "direct-connection" guide you linked to refers to oem gateway on the "rock-solid gateway" image, which has been replaced by emonhub and is it is included on the current sd card image along with emoncms or it can be installed independently. More info on this can be found here. and about half way down that thread is also an explanation of the softwares and images etc

I'm not really familiar with bluetooth applications and so I am guessing here, but I expect some sort of script will be needed to route data into emonhub as emonhub isn't equipped to access the device directly (yet)

Yes, a JeeLink is basically a USB version of a RFM2Pi, so emonhub is already to go code wise, but emonHubs "RFM2Pi" settings will need editing to point to the relevant "com_port" as the default is the serial uart not a usb port, so no code changes just a setting.

If you are not using a JeeLink you should be ok with the usb addresses, It may not cause a problem anyway, I can't be sure, but being aware it may can save a lot of diagnosis time should you have a problem.

Out of interest what are you connecting by bluetooth ?


mtran's picture

Re: Raspi 2 inputs?

got it. Thank you.

"what are you connecting by bluetooth ?"

a growatt solar inverter using an RS232 serial to bluetooth adapter.

Comment viewing options

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