Finally got 'round to soldering up the HAHnodes.
Connected up to the Arduino IDE, and data coming though, so looks ok before I connect up to the HAH.
Seems to be lots of data (more than HAH processes) ? Please can you point me to the schema which explains what each value is? Also, seem to be some 'short' records?
[RF12nocfg.1] A i1 g212 @ 868 MHz
Current basenode configuration:
A i1 g212 @ 868 MHz
? 54 239 45 22 21 232 190 125 192 122 75 173 250 189 82 168 249 62 90 224 188
Member for
16 years 10 monthsIts all jibberish
Anything beginning with a ? is gibberish and its junk.... if you load up the HAHcentral sketch on your base node these are all disabled by default - you are actually getting no valid data. A valid message will begin with OK.
There is NO schema per se for decoding the BYTEs of data you need to examine the C source code for the sending unit to determine how the the bits are packed, or alternatively examine the LUA decoder to see how its unpacked.
Brett
Member for
15 years 2 monthsNext problem - FTDI not recognised?
Ok, so connected the HAHnode to the HAH, but experiencing problems with it being recognised (i.e, its not)
The FTDI serial cable doesnt seem to be recognised - Ive tried a couple, get message (from DMESG):
hub.c: USB new device connect on bus1/1, assigned device number 2
usb.c: USB device not accepting new address=2 (error=-145)
hub.c: USB new device connect on bus1/1, assigned device number 3
usb.c: USB device not accepting new address=3 (error=-145)
Member for
16 years 10 monthsCan be problematic
I normally use a PL-2303 TTL cable which I know is 100% compatible.
I'm not sure what type of FTDI you have but there are only 2 types supported and these are:
usbserial.c: USB Serial support registered for FTDI SIO
usbserial.c: USB Serial support registered for FTDI 8U232AM
usbserial.c: USB Serial support registered for PL-2303
Its going to be hard to debug this without knowing the product/vendor code for the USB device, and to get this you need to plug it into a linux box preferablly. You can get this from windows, but I'm not going to talk you through a series of damn popup windows and mouse clicks when I could just get you to type "lsusb" on a linux box (not the HAH)
Perhaps you have either an unsupported FTDI module as there is more than 1 type or perhaps you are drawing too much current and overpowering the port causing things to break. But it would normally tell you so in the dmesg.
Is that all you get from the dmesg ?
Brett
Member for
17 yearsCables that work
For a while, I used this FTDI based part from Sparkfun http://www.sparkfun.com/products/9115
Now, I use the PL-2303 cables that are available from the shop.
Whatever you use, the positive supply should be at 5V ... the onboard regulator steps this down to 3.3V for the AVR and the RFM12B.
Do note that the DS18B20 is powered directly from the supply, so don't use any battery that supplies > 5.5V (we tend to use 3xAA cells - these last for ages).
As Brett says, the data output by the RoomNodes is 'internal' to the system and not really designed for public consumption. However, once you see a message that starts with 'OK', you are pretty much there & don't have to be a genius to see what is going on. Also, read http://dbzoo.com/livebox/hah_hahnode#airwick_hahnode
Derek
Member for
15 years 2 monthsDerek's cable
The first cable I tried was the one I normally use to program Nanodes, the second was one I think Derek provided.
Both work on a PC, as does the node (per ouput in O.P). Googling the error message results in various unsolved hits, most notably on OPEN-WRT or MIPS systems, with suggestions of timing errors on the USB bus.
Before I went to bed, I remember thinking the USB socket was a bit 'moveable', so later today I'll open everything up, check joints, voltages on FTDI, report device types, and try a memory stick, drive in the USB socket etc, to see if recognised.
Member for
15 years 2 months[Resolved] = dodgy USB port
Having re-examined the USB socket on the HAH, I can see that two of the contacts have been bent out of shape. Careful prizing back into place results in successful detection of the FTDI.
I do notice that insertion of a new USB device causes the HAH to reboot - is this normal?
Either way, I'll now get round to modifying the sketch to read the temps etc.
Member for
17 yearsMost unusual
This is very interesting. I've never seen the USB port pins messed up ... the USB connectors are normally pretty solid and designed for lots of insertions.
One to add to the knowledgebase.
I do sometimes see the HAH reboot on insertion of a USB device. It doesn't happen every time, just occasionally. Could be that the 'blip' on the 5V rail pushes something over the edge. I now make a habit of pre-attaching any USB devices with the HAH powered off.
Member for
16 years 10 monthsModify the sketch?
Not sure why you are going to modify the sketch... as the sketches already in place also if you start to modify the sketches then you also need to roll your own LUA decoder and figure out how to bolt that into the system to read your new sketches binary stream. Yes you can do it but nobody generally does as all the hard work getting these two talking to each has already been done Check out the pre-canned .HEX files that you can just flash up.
http://code.google.com/p/livebox-hah/downloads/list
Glad it was just a dodgy USB port causing you grief an nothing too serious.
Brett
Member for
15 years 2 monthsSorry, LUA, not sketch
Sorry, LUA, not sketch
Member for
16 years 10 monthsLUA mapping applet
Yes you will need to craft up a jeenodeApplet.lua to map the right CLASS of object to the Sketch you flashed onto your jeenode. Once you get to this stage you are getting close to done. Do watch to make sure you are seeing valid data coming in on the xap-serial endpoint at least the "OK <nodeid>" messages to know the comms are good. The plugboard applet you need to craft will picked this up and automatically slice up the data and feed to the appropriate BSC endpoints. - Brett
Member for
15 years 2 monthsSo, the data again
Just back to the orignal post, where I mentioned I was seeing data, preceded by '?'.
Are you saying that this is wrong, and should be starting with 'OK' ? The output from microcom the HAH shows
# microcom -s 57600 /dev/ttyUSB0
[RF12nocfg.1] A i1 g212 @ 868 MHz
Current basenode configuration:
A i1 g212 @ 868 MHz
? 23 254 196 192 47 65 127 224 151 230 168 213 36 157 163 112 97 127 180 167 222
? 22 137 172 93 106 192 251 22 234 225 219 160 102 119 82 14 194 135 105 72 9
Member for
17 yearsClue in the 'startup message'
>[RF12nocfg.1] A i1 g212 @ 868 MHz
The Basenode firmware that you have is the 'no configuration' version. i.e. it is pre-configured to be Unit Id 1 and operating at 868MHz. So, it's fine and you need do no more to this.
Any message that starts with a '?' is just noise and can be ignored.
Valid messages start with 'OK'.
Clearly, until you have the RoomNode running, there is nothing much more that can be done (parts are packed and will be posted out soon).
HNY!
Derek.
Member for
15 years 2 monthsTemp on central node?
Thanks - no way of getting to the DS1820 on the central node then?
Member for
17 yearsCheck the source code ...
I'm pretty sure that the central node firmware has no provision for servicing a DS18B20 ... it is designed to listen for RF signals from other nodes.
That said, I suppose that it could be made to do this. Look at the Arduino source code and see.
Member for
16 years 10 monthsCentral node
The central node was designed to only TX/RX RF information there was no provision for adding any additional sensors to this unit. Having said that everything is possible, but most people run a 1wire or Currentcost in close proximity to the HAH central anyway so there was no great reason to have yet another temperature sensor within 1ft of the HAH unit.
Brett
Member for
15 years 2 monthsA bit further forward
Ive 'borrowed' a resonator to get the roomnode working.
This now fires up, but is not gathering any data (although it is now successfully transmitting it (that is, nothing) to the base node)
Im guessing the failure to locate the OneWire temp sensor is the problem.... I'm sure Ive got a spare and will report success or otherwise shortly.
[roomNode.3] B i2 g212 @ 868 MHz
Locating OneWire devices...Found 0 devices.
Unable to find address for Device 0
ROOM 2 0 0 0 0
ROOM 0 0 0 0 0
ROOM 0 0 0 0 0