JeeNodes

Description

Issues around HAHNode and JeeNodes

Forums

Hi
Please can someone help me getting started with Base and Room nodes. I tried following the wiki but it made reference to RF12demo, RFDdemo and HAHcentral, totally confusing. Derek kindly updated it to make it clearer.
However....when I type
# /etc/init.d/xap stop serial
# microcom -s 57600 /dev/ttyUSB0

and a couple of returns there is no response.

If I repeat the command I get about 100 lines of data starting with
Available commands:
  <ard node ids are 1..26)
    ase 'A'..'Z' to set id)
  <n433, 8 = 868, 9 = 915)
  <nnnM12 only allows 212, 0 = any)mode (advanced, normally 0)
 ize test packet, with ack
  .to node <nn>, with ack
  ...,node <nn>, no ack

seems to be corrupted.

I can hook the node up to my laptop and run "Putty" and configure the freq and node?
On HAH when I try to reflash the node I get

# stty -F /dev/ttyUSB0 hupcl
# avrdude -v -c arduino -p m328p -P /dev/ttyUSB0 -b 57600 -Uflash:w:HAHcentral_n
ocfg.cpp.hex

avrdude: Version 5.10, compiled on Jan 26 2012 at 19:51:44
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc_ro_fs/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.

Don't know where to go from here.

Forums
The license free ISM band in my country is 433MHz which I know Jeenode has a kit selling from its US e-shop. So, my question is, can the Jeenode be flashed with HAHCentral.hex ? or Jeelab's RF12Demo will work just fine receiving RF packets say from a LightwaveRF PIR device and passing that decoded message to HAH? Thanks.
Forums

Hi,

I've been running a Livebox for a number of months now, all has been working until a couple of weeks ago when I noticed that the XAP messages from my JeeNode seemed to have stopped. I have checked the JeeNode and it is transmitting data - I can see a XAP-Serial message with the details -

 

xap-header
{
v=12
hop=1
uid=FF00D500
class=Serial.Comms
source=dbzoo.livebox.Serial
}
Serial.Received
{
port=/dev/ttyUSB1
data=OK 2 0 0 213 0
}

Running Plugboard from the cli with debug enabled shows the messages being received and processed, but no XAP messages are seen in XFX - 
  data = "OK 2 0 0 212 0",
  port = "/dev/ttyUSB1",
}
process RoomNode[2]
        moved=0
        humi=0
        temp=21.2
        lobat=0
        light=0
Reaping RoomNode[2] alive=true ttl=900 timeout=1
The jeenodeApplet.lua hasn't been changed -
# cat jeenodeApplet.lua
--[[
    JeeNode to xAP Endpoint mapping
--]]

_DEBUG=1
module(...,package.seeall)

monitor = require("xap.jeenode").monitor
RoomNode = require("xap.roomnode").RoomNode
OutputNode = require("xap.outputnode").OutputNode

info={
   version="2.0", description="JeeNode"
}

       local jeemon={
       port="/dev/ttyUSB1",
       baud=57600,
       stop=1,
       databits=8,
       parity="none",
       flow="none"
}

-- Keyed by NODE ID
local nodes = {
   [2] = RoomNode{base="dbzoo.livebox.jeenode:conservatory", endpoints={temp=1,lobat=1}, ttl=900},
}

function init()
   monitor(jeemon, nodes)
end
Any help/suggestions will be gratefully received.
My HAH is currently running -
Build 306/3.4
Many thanks,
Andy

 

Forums

I am havng a couple of problems with my HAHCentral and Roomnode2 setup which I am struggling to resolve

I sourced the arduino code from googlecode and loaded it via the IDE and apart from changing the serial flag and removing the PIR define (for simplicity/elimination) it is standard

I have one device configured as HAHCentral and two as Roomnode2, one in an Airwick and one on the bench connected to the serial monitor

The first problem is that the temperature is misrepresented, so instead of showing up as a 3 digit number in a xAP Serial message it comes up as a two digit number. In addition the lobat is inverted. This happens for a while and eventualy it comes right, then a bit later it happens again. This happens on both roomnodes, not always at the same time. Resetting the roomnodes has no effect. 

A typical message being transmitted from the roomnode (ie, as displayed on the serial monitor anyway) would be

ROOM 175 0 0 256 0


and the equivilant xAP  serial message would be

xap-header
{
v=12
hop=1
uid=FF00D500
class=Serial.Comms
source=dbzoo.livebox.1.Serial
}
Serial.Received
{
port=/dev/ttyUSB0
data=OK 4 175 0 12 1
}

The second problem is that the serial daemon sometimes reports messages which crash JeenodeApplet.lua, eg

xap-header
{
v=12
hop=1
uid=FF00D500
class=Serial.Comms
source=dbzoo.livebox.1.Serial
}
Serial.Received
{
port=/dev/ttyUSB0
data=OK 4 176 0 03 192 0 12 1
}

Which combines parts of two messages from nodes 4 and then 3

The xap-plugboard.log shows

lua: /usr/share/lua/5.1/xap/jeenode.lua:51: invalid value (nil) at index 4 in table for 'concat'
stack traceback:
 [C]: in function 'concat'
 /usr/share/lua/5.1/xap/jeenode.lua:51: in function 'stream2bin'
 /usr/share/lua/5.1/xap/jeenode.lua:65: in function 'bitslicer'
 /usr/share/lua/5.1/xap/roomnode.lua:44: in function 'process'
 /usr/share/lua/5.1/xap/jeenode.lua:96: in function 'callback'
 /usr/share/lua/5.1/xap/init.lua:392: in function 'dispatch'
 /usr/share/lua/5.1/xap/init.lua:97: in function 'fun'
 /usr/share/lua/5.1/pl/list.lua:360: in function 'foreach'
 /usr/share/lua/5.1/xap/init.lua:96: in function 'callback'
 /usr/share/lua/5.1/xap/init.lua:203: in function 'dispatch'
 /usr/share/lua/5.1/xap/init.lua:117: in function 'process'
 /etc_ro_fs/plugboard/plugboard.lua:73: in main chunk
 [C]: ?
Loading /etc/plugboard/jeenodeApplet.lua        [ JeeNode ]
Running...

This is the only lua script running

I have tried two different devices as HAHCentral

Any suggestions?

kevint 

 

Forums

I have created a pic which shows the I/O allocation on a JeeNode or HAHnode for the different sketches supported by the Plugboard/LUA/JeenodeApplet.lua

RFM12B wireless at the bottom, FTDI at the top

(of course let me know if I have got the inputs wrong)

Would it be possible to include a new 'digin' type of input for the RoomNode2 sketch?  As you can see port 3 digin is not used in either the RoomNode2 or RoomNodeTwin sketches and port 2 digin is also available in RoomNode2 only.

I would use this for things like magnetic door/window contacts, and perhaps a pushbutton or a water leak detection. It seems odd not to have generic digital input support.

I can see how the sketches link to the serial and then to the JeeNodeApplet but after that I get completely lost in the supporting LUA

If you think this is a good idea I can add it to googlecode as an enhamcement request

Thanks

kevint

I have connected a light sensor to 1 room node and am seeing readings appear on my HAH in the form Node ID followed by an integer similar to 168 and then some zeros.  I have set up my jeenodeApplet.lua file to include light=1 and restarted the serial scheam and plugboard service but I am getting "?" in the value field from the light endnode.

Looking at the source for roomnode2.pde, the payload format specifies that light should come first, followed by moved etc.. My question is should the specification of the endnodes in jeenodeApplet.lua be in the same order as that in the source code of the roomnode?

Thanks for any help


Chris

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

 ? 12 125 193 0 144 150 130 169 188 131 238 9 208 7 17 11 231 173 233 6 215

 ? 7 14 214 98 57 17 197 68 146 203 16 162 128 113 93 151 107 19 220 168 120

 ? 128 254 97 65 67 62 11 48 1 70 53 113 174 130 155 215 134 131 68 101 22

 ? 61 176 94 217 166 185 245 66 97 161 190 137 4 252 50 7 85 94 133 135 4

 ? 20 248 6 126 18 236 92 79 192 136 127 121 0 31 186 96 154 116 227 110 43

 ? 35 185 162 233 25 40 240 244 195 134 88 127 233 146 17 45 57 54 202 157 198

 ? 25 14 230 24 25 146 91 213 6 245 26 52 115 132 61 1 13 241 195 42 173

 ? 178 83 172 17 248 193 30 227 4 46 8 74 161 223 157 160 212 37 95 83 129

 ? 20 241 151 170 194 45 177 21 90 52 176 155 147 227 192 235 253 145 45 70 152

 ? 225 98 117 211 125 244 120 23 172 180 194 31 118 94 31 136 214

 ? 134 117 152 194 6 135 248 118 247 244 186 130 32 130 117 64 161 1 62 75 116

 ? 62 233 113 155 246 0 254 13 88 245 235 40 83 39 241 20 234 4 3 100 193

 ? 168 241 147 196 138 132 1 22 16 159 7 227 248 6 201 121 157 248 178 69 215

 ? 166 20 238 90 202 253 136 55 130 18 183 122 71 152 58 70 167 88 107 231 224

 ? 54 38 193 209 208 160 130 169 48 124 69 8 145 96 219 73 206 134 234 18 104

 ? 38 185 40 204 130 0 55 167 10 157 255 3 12 142 141 238 121 78 171 225 244

 ? 32 12 136 176 116 81 228 230 121 182 48 240 178 34 100 8 177 172 2 151 199

 ? 150 109 158 235 80 80 38 127 28 6 96 36 84 167 146 211 194 71 140 99 249

 ? 141 124 56 3 50 150 130 150 134 178 136 150 196 5 47 114 161 75 180 127 17

 ? 40 103 248 23 232 2 86 90 246 76 53 116 66 79 174 62 88 41 128 198 201

 ? 30 68 13 254 131 81 195 39 35 235 145 184 30 15 96 44 188 216 10 217 128

 ? 0 39 21 229 0 183 34 4 228 116 144 60 150 118 210 207 24 237 162 50 87

 ? 39 102 167 128 54 117 231 32 147 108 130 175 7 30 230 231 179 89 228 129 15

 ? 174 130 181 172 61 231 95 188 205 82 45 252 136 123 140 54 125 173 167 82 144

 ? 180 39 78 186 183 85 136 132 96 242 135 140 233 165 74 0 155 224 109 159 226

 ? 36 240 12 173

 

Well i got the jeenode so started to play, the problem is the xap-serial is not picking it up (but is running)

This is my config file and the photo shows my putty sessions.

--[[
    JeeNode to xAP Endpoint mapping
--]]

--_DEBUG=1
module(...,package.seeall)

monitor = require("xap.jeenode").monitor
RoomNode = require("xap.roomnode").RoomNode
OutputNode = require("xap.outputnode").OutputNode
IRNode = require("xap.irnode").IRNode

info={
   version="2.0", description="JeeNode"
}

local jeemon={
      port="/dev/ttyUSB0",
      baud=57600,
      stop=1,
      databits=8,
      parity="none",
      flow="none"
}

-- Keyed by NODE ID
local nodes = {
   [2] = RoomNode{base="dbzoo.livebox.1.jeenode:pond", endpoints={temp=1,lobat=0}, ttl=900},
}

function init()
   monitor(jeemon, nodes)
end

 

 

Anyone got any pointers?

I just took delivery of a jeelink usb v3 and jeenode v6 with room plug.

I managed to flash the jeelink with hahcentral.hex and the jeenode with roomnode2.hex

When i run microcom -s 57600 /dev/ttyUSB0 with the jeelink connected it reports:

[HAHCentral.1] D i4 g212 @ 433 MHz 

 

But when i run it with the jeenode attached i don't get anything.
What am I doing wrong?
Thanks!

 

Derek any news as i am ready to order a programmer and want a couple of jeenodes and cable as well.

 

would rather order the whole lot in one go rather than bits n pieces, also jeenode programming cable plugs into usb yes?

 

i suppose it would be bette to do this programming on one of the spare liveboxes i have? i am assuming you just need a hah livebox not expander pcb etc?

 

am i correct.

 

ta dean