Initial setup not working. --FIXED--

Actually, I'm putting edit 6 up here: D'oh! My test packet was sending out byte and emon only handles int and thinks a single byte is garbage nondata. That was bloody well everything that was going wrong, right from the start. 'Trap for young players', I guess Dave'd say.

----------------------------

I am presumably missing something obvious, but I can't figure it out.

My hardware is currently, just at the proof-of-concept stage, one raspberry pi and 2 jeenodes. One jeenode, powered by a jee AA board, is running the jeelib/DIJN/test2 sketch and is blipping once a second with the current light level. The other jeenode is connected to the RPi using an FT232RL board (running at 3V3 logic and 5V on the VCC pin, into the 3V3 regulator).

I have loaded the Rpi-node with the rf12-demo firmware from the R12Pi. Both nodes are configured with 868 MHz and group 97, with the central node being 15 and the lightnode being 17.

 

As you can see, the central node is quite happily receiving the data pings. I swept my hand over the LDR once or twice to prove it was getting real data. Next issue is getting the data into emoncms. That's where the snag is.

My Rpi is running (over the SD card and a 16G Lexar USB key -- it'll get a proper HDD eventually) the "Raspberry Pi + Harddrive + Emoncms", with only a few mods. Because my data collection node is on ttyUSB0 rather than ttyAMA0, I changed all the occurrences of that in /var/www:

I can't find anywhere else on the system that mentions ttyAMA, apart from /dev/xconsole.

And yet despite many reboots and hair-tearing I am not getting a working data feed, even though I must be *so* *close*.

 

What am I missing?

 

Edit: Okay, i forgot something I wanted to try. The jeenode is now hooked straight to the GPIO pins:

Still no data. So presumably I'm just making a beginner's mistake somewhere and it's actually much easier than all the stuff I've been trying.

Edit2: Oh, _result_. Using the raspberry Pi rfm12 to pi module/thingy on the webinterface if I change the node ID of the central node, the jeenode actually does change its node number. This confirms that emoncms is actually talking to the jeenode just fine. In fact if I'm listening to ttyAMA0 on an ssh I can see emoncms pushing the 15i/17i/etc commands to the node. Now why is that input not updating....

Edit3: Aha -- apparently, even if you have a local setup, you have to fill in the "forward data to remote server" section. With 127.0.0.1. I still don't seem to be getting my node 17 feed coming through, though.

Edit4: Just to be safe, I tried forwarding to my emoncms account instead of local. No joy. AFAICT the code used in my test2 sketch uses the same dataformat as an emontx, except with just one value that means little:

rf12_sendNow(0, &value, 1); 

vs:

rf12_sendNow(0, &emontx, sizeof emontx);

I am gathering from more and more doc reading that data should just magically appear in Inputs, right? nobody seems to be telling anyone how to get it there, when using an rfm12pi setup.

Edit5: In desperation, I went with just the oemgateway setup now, and following the troubleshooting steps, I get what I had been suspecting for a while now:

2014-01-14 12:37:24,961 INFO Serial RX:  17 152
2014-01-14 12:37:24,965 WARNING Misformed RX frame: ['17', '152']
2014-01-14 12:37:25,993 INFO Serial RX:  17 152
2014-01-14 12:37:25,996 WARNING Misformed RX frame: ['17', '152']
2014-01-14 12:37:27,024 INFO Serial RX:  17 152
2014-01-14 12:37:27,028 WARNING Misformed RX frame: ['17', '152']
2014-01-14 12:37:28,056 INFO Serial RX:  17 152
2014-01-14 12:37:28,059 WARNING Misformed RX frame: ['17', '152']
2014-01-14 12:37:29,087 INFO Serial RX:  17 152
 

So, my data packets are the wrong format. Argh! if I'd figured that out sooner that would've saved me some testing there...