Hello all,
I'm trying to configure a emonhub to work with some jeenodes.
Ik have some troubles configuring the datacodes.
Does somebody know a good example/ documentation ?
regards
Archived Forum |
|
configuring emonhub with jeenodesSubmitted by adonis on Sat, 29/11/2014 - 22:20Hello all,
I'm trying to configure a emonhub to work with some jeenodes. Ik have some troubles configuring the datacodes. Does somebody know a good example/ documentation ?
regards
» |
Re: configuring emonhub with jeenodes
On the emonHub development - increase in scope of values over rfm network thread there is an in depth explanation of how they work and there have been a few forum discussions which include datacodes, but there isn't any formal documentation yet.
If you can't find the answers you need just ask.
Paul
Re: configuring emonhub with jeenodes
Paul,
Thanks for the links, moved me further .
still some questions,
Jeenode is sending the following data
struct { int16_t temp; int32_t pres; }; ( standard bmp 85 sketch )
So i did configure emonhub
datacodes = B,h,L
h= the temperature and L being the pressure
Issue is that the pressure value that is stored = 100710 is sended as 3 byte values being ..
247 , 136, 1
Emonhub is configured to receive 4 byte values to be converted to the L.
So the length check also fails because emonhub is expecting an extra byte
Therefore i configured the extra datacode being J = 3
Now with this extra Datacode the decode methods fails and i am still debuging the reasons.
Is adding an extra datacode the solution ?
below some logging data
014-12-13 16:03:39,157 DEBUG 23 NEW FRAME : 1418483019.16 OK 212 4 6 224 0 100 137 1
2014-12-13 16:03:39,159 INFO striped ok from received['OK', '212', '4', '6', '224', '0', '100', '137', '1']
2014-12-13 16:03:39,161 INFO after stripping['4', '6', '224', '0', '100', '137', '1']
2014-12-13 16:03:39,163 DEBUG data to decode ['4', '6', '224', '0', '100', '137', '1']
2014-12-13 16:03:39,166 DEBUG datacode B
2014-12-13 16:03:39,167 DEBUG number of bytes to decode 1['6']
2014-12-13 16:03:39,169 DEBUG data to decode ['6']
2014-12-13 16:03:39,171 DEBUG datacode h
2014-12-13 16:03:39,173 DEBUG number of bytes to decode 2['224', '0']
2014-12-13 16:03:39,175 DEBUG data to decode ['224', '0']
2014-12-13 16:03:39,177 DEBUG datacode J
2014-12-13 16:03:39,178 DEBUG number of bytes to decode 3['100', '137', '1']
Re: configuring emonhub with jeenodes
I'm not sure how you are getting "3 byte values" for pressure if you declare "int32_t pres; " in the struct, a 32 bit int would be 4 bytes.
You should only define "datacodes" for the data so if that "B" datacode is for the node id then that is what is upsetting the match. datacodes = h, l (note lower case l as int32_t is signed).is what you need for struct { int16_t temp; int32_t pres; };.
"Therefore i configured the extra datacode being J = 3 " this doesn't sound right to me, emonhub uses python struct standard datatype codes I'm pretty sure the struct library may be thrown by the introduction of an alien datacode.
If you have been editing the code in emonhub it may give unexpected results and I may not be able to help you. If your edits are purely to input the datatypes mentioned I would undo any changes set "datacodes = h,l in the [nodes] section for your node id and look at the packet structure. emonhub rc1.1 will remove the "OK" automatically, however if that first byte is the group emonhub is not expecting that so if you can prevent that reaching emonhub great.
How is the data getting from the jeenode to emonhub? are you using RF12demo? if so which version ? is it connected by gpio serial port? which emonhub interfacer are you using and how is it configured?
Paul
Re: configuring emonhub with jeenodes
Paul,
thanks for the answers , moved from jeelink running on synology to RFM12PI Version 1.0 on a pi and it works there on after configuration of the nodes.
I did not expect that the RF12demo sketch on the Jeelink and RFM12PI where that different.
Meanwhile i understand the translation of the RF codes and decoding ;-)
regards
Joost