Connecting emonTX to Raspberry Pi

Hello,

 

I am trying to use a emonTx with a CT Clamp to send data to my Raspberry Pi running the image found at http://openenergymonitor.org/emon/node/10729 with a RFM12B chip on it.

My problem is that I have absolutely no idea how to achieve this. I have been looking at http://openenergymonitor.org/emon/buildingblocks/rfm12b2#appendix1 to try and figure out but I have no idea how or where to run the code snippets.

I also found https://github.com/openenergymonitor/RFM12B_Simple, but again - I have no idea in what context or how to run the code.

If anyone could give me a brief tutorial or point me to the direction of resources that can help me that would be awesome.

 

Best regards,

Anton

Robert Wall's picture

Re: Connecting emonTX to Raspberry Pi

Firstly, do not try to clamp a current transformer to the cable. If you have the one from the shop, the ferrite core is very brittle and will shatter if you apply any significant pressure on it. It should be loose on its cable.

Second, if you run your emonTx with the default sketch that should have been installed when you received it, it should work. If you've overwritten that sketch, you can find it on "Software Github" - it's called "emonTxV3_4_DiscreteSampling".

dBC's picture

Re: Connecting emonTX to Raspberry Pi

It's admirable that you Brits like to preserve the English language, but this is the world-wide-web and a quick google search on "current clamp" suggests you've long ago lost control of that term. 

Bergmam's picture

Re: Connecting emonTX to Raspberry Pi

So I attach the current clamp to the emonTx and restart it as said in chapter 3 of http://openenergymonitor.org/emon/modules/emonTxV3, but what I get from emoncms is that all Rx Variables are "inactive". Why?

Robert Wall's picture

Re: Connecting emonTX to Raspberry Pi

And who invented the world-wide-web? (I didn't say "Internet".)

Robert Wall's picture

Re: Connecting emonTX to Raspberry Pi

Back on-topic. How are you powering the emonTx. If you're using the AC adapter, does the LED in the emonTx flash once every 10s? Are you getting any indication that the RFM12Pi receiver is working - does its LED flash in time with the one in the emonTx?

Bergmam's picture

Re: Connecting emonTX to Raspberry Pi

I am powering the emonTx with AC and the light is flashing every 10 seconds. The RFM12Pi, however, is not giving any signs of life - no LED flashing.

 

What pins on the raspberry are the RFM12Pi supposed to be connected to?
 

Robert Wall's picture

Re: Connecting emonTX to Raspberry Pi

There is a photo here. It's the '69 radio module but the photo of yours doesn't show the pin alignment at all clearly. In words - right on the end. At the bottom of the RFM12Pi V2 page is a piece about debugging.

Bergmam's picture

Re: Connecting emonTX to Raspberry Pi

Then it was already placed correctly. I guess I'll follow the debugging and see if anything comes up.

Bergmam's picture

Re: Connecting emonTX to Raspberry Pi

When running minicom, I get some packages from node 10, like these:

10 0 0 0 0 0 0 0 0 238 95 0 0
 10 0 0 0 0 0 0 0 0 210 95 0 0
 10 0 0 0 0 0 0 0 0 194 95 0 0
 10 0 0 0 0 0 0 0 0 201 95 0 0
 10 0 0 0 0 0 0 0 0 220 95 0 0
 10 0 0 0 0 0 0 0 0 218 95 0 0

Does this look correct? When looking at emoncms Node 10:emonTx is still set as inactive.

pb66's picture

Re: Connecting emonTX to Raspberry Pi

That could well be correct, it would be difficult to say as you have not said anything about what emontx you have or what firmware its running, but that is a valid packet, possibly for either a late emontx v3.2 or an early emontx v3.4 running stock firmwares, or even a emontx shield.

I expect it is power1 power2 power3 power4 ACvoltage temperature, 12 bytes = 6 signed ints.

If you take a look at the emonhub.log you will probally see errors telling you that the "Node 10" packet doesn't fit the datacodes definition, that is defined in emonhub.conf and fir the image you have it will be pre-configured for a later emonTx firmware.

You will need to change the configuration to suit your device, something like this should get you going

[[10]]

    [[[rx]]]

         names = power1 power2 power3 power4 ACvoltage temperature

         datacode = h

         scales = 1, 1, 1, 1, 0.01, 0.1

Paul

 

Bergmam's picture

Re: Connecting emonTX to Raspberry Pi

I tried to change the configuration according to the suggestions above, but it still says all nodes are inactive after a reboot. I am currently using a emonTx V3.

I cannot see any errors in the emonhub.log regarding the datacode definition, what I do see however is this:
2016-02-12 11:28:00,227 WARNING MainThread Device communication error - check settings

Again - the LED on the RFM12pi is not flashing.
 

I'd like to provide some more information as well. Where do I find what firmware version I am running?

Comment viewing options

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