how to get roomnode id?

19 replies [Last post]
tickett
Offline
Joined: 19 Nov 2011

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!

 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
A couple of things

You are NODE 4 and 433Mhz.

Adjust to 868Mhz and make it node 1.

    "Available commands:" "\n"
" <nn> i - set node ID (standard node ids are 1..26)" "\n"
" <n> b - set MHz band (4 = 433, 8 = 868, 9 = 915)" "\n"
" <nnn> g - set network group (RFM12 only allows 212, 0 = any)" "\n"
" ...,<nn> a - send data packet to node <nn>, with ack" "\n"
" ...,<nn> s - send data packet to node <nn>, no ack" "\n"
" <n> q - set quiet mode (1 = don't report bad packets)" "\n"

Brett

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Attach cable

We've only verified operation on the HAH with the attach cable from the Shop and with the Sparkfun FTDI cable adaptor. If you are using a cable to hookup to a PC/MAC ... you are into unchartered territory.

Derek.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Are the instruction unclear?

Just trying to find out what part of the wiki write up is unclear on the jeenodes so the documentation can be improved.  A few people seem to be coming unstucking getting these setup.

Edit: I've modified the wiki page on flashing the nodes to try to clarify where I think people are getting lost.

Brett

tickett
Offline
Joined: 19 Nov 2011
Yes- i'd say there are a few

Yes- i'd say there are a few bits missing. I can hopefully help clear it up once i get it all working :)

 

The first mistake i'd like to point out is the curl command for the hahcentral.hex - which appears to work but in fact downloads a 404 file not found page. This is because the filename is case sensitive.

 

The next thing I think i've discovered is that you have to set the node, group and band with either the rf12demo or hahcentral sketch flashed- you cannot do it with the roomnode sketch. And that the band must be 868 Mhz (or at least for these devices i think?)

 

I've now got to a stage where the jeelink and jeenode are on the correct band and group. From the hah:

 

[HAHCentral.1] D i4 g212 @ 868 MHz 

OK 2 0 0 0 0

OK 2 0 0 0 0

But i don't really know what i'm supposed to do next? I've configured the jeenodeApplet.lua and enabled serial schema service and plugboard scripting engine but nothing is happening? (not sure what i'm expecting to happen).
If i try to run xap-plugboard i get:
# xap-plugboard
lua: error loading module 'jeenodeApplet' from file '/etc/plugboard/jeenodeApplet.lua':
/etc/plugboard/jeenodeApplet.lua:4: unexpected symbol near '?'
stack traceback:
[C]: ?
[C]: in function 'require'
/etc_ro_fs/plugboard/plugboard.lua:23: in function 'fun'
/usr/share/lua/5.1/pl/tablex.lua:365: in function 'foreach'
/etc_ro_fs/plugboard/plugboard.lua:71: in main chunk
[C]: ?
Loading /etc/plugboard/jeenodeApplet.lua        # 
Not sure if that's because it is already running or something is broke!
Thanks for the help- i am rather excited with my progress!
Lee
tickett
Offline
Joined: 19 Nov 2011
I blogged about the first

I blogged about the first bit: http://tickett.wordpress.com/2011/12/02/my-first-jeenodes/ - which may also help (the bit about the jeelink v3 needing flashing with baud rate 115200 and ensuring currentcost or nothing else is trying to use the usb port)

I will hopefully blog again when I get a bit further.

L

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Not sure what that stack trace mean

You should only every run xap-plugboard once you have stop any other plugboard script... you can't run two!  If you want it run it manually you can but this is only useful when debugging and saying that only if you have debug enabled in your applet.    Do a ps and make sure plugboard.lua is not active before running xap-plugboard.

That stack trace would indicate that you made an editing error when configuring the applet - what I don't know.

ALSO you CANNOT and MUST NOT run xap-serial AND microcom to the jeenode at the same time.

Fire up xFXviewer and check the output for the xap-serial program this way.

Brett

tickett
Offline
Joined: 19 Nov 2011
The jeenodeApple.lua file had

The jeenodeApple.lua file had become corrupted. Must have been the way i got it onto the box (used wget). That's another step i think missed off the wiki... how to get the file onto the box and how to edit it? I hate VI :)

Now i've fixed the .lua file xap-plugboard works... watch this space.

Thanks for all your help- sure there'll be a few more questions yet.

L

tickett
Offline
Joined: 19 Nov 2011
How do I get xFXviewer hooked

How do I get xFXviewer hooked in? When i run it on my pc I just see:

 

xap-hbeat

{

v=13

Hop=1

UID=FFD86600

Class=xap-hbeat.alive

Source=xFx.Viewer.winxp-01

Interval=60

Port=3639

PID=1096

}

Which is the pc that xFXviewer is running on. No sign of the hah etc.

 

How is it supposed to see the stuff into the hah from the jeenodes via the jeelink?

Pentala
Offline
Joined: 22 Oct 2011
xFX Viewer

Hi,

I had this problem when running on Windows 7 - make sure your firewall on the PC is either disabled or configured to allow the xAP messages through, also, you need to run the xFX Viewer as Administrator.

Hope this helps,

Andy.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Did you install a HUB

xFXViewer between release v3 and v4 a significant change was made.

V3 did not require a hub.  V4 does require a hub, use the xFx-Express Hub.

If you don't run a hub on your windows box V4 will return ZERO data.

Personally the only thing I run on windows is xFXviewer anyway so I just run V3 when I need to examine the xap packets.  Its still just as functional as V4 and I don't have to start yet another program before I use it.

AttachmentSize
xFXViewerInstallerV3.zip 777.33 KB
brett
Offline
Providence, United States
Joined: 9 Jan 2010
On the subject of a sample jeenode applet

You don't need to use wget to get a sample jeeNodeApplet.lua program onto your HAH just copy the one out of the sample directory that is shipped in the HAH

# cp /etc_ro_fs/plugboard/samples/jeenodeApplet.lua /etc/plugboard

Then edit away - I'll add this to the wiki note :)

tickett
Offline
Joined: 19 Nov 2011
Is there an alternative to

Is there an alternative to VI? :)

I'm making a little progress. I installed xFXviewer on a different machine and I can see the endpoints.

I also uncommented _DEBUG and when I cat /var/log/xap-plugboard i can see some activity:

# cat xap-plugboard.log 

Loading /etc/plugboard/jeenodeApplet.lua        [ HAHNode ]

build RoomNode[1]

build RoomNode[2]

Running...

Reaping RoomNode[1] alive=true ttl=300 timeout=10

Reaping RoomNode[2] alive=true ttl=300 timeout=10

Reaping RoomNode[1] alive=true ttl=300 timeout=20

Reaping RoomNode[2] alive=true ttl=300 timeout=20

Reaping RoomNode[1] alive=true ttl=300 timeout=30

Reaping RoomNode[2] alive=true ttl=300 timeout=30

Reaping RoomNode[1] alive=true ttl=300 timeout=40

Reaping RoomNode[2] alive=true ttl=300 timeout=40

Reaping RoomNode[1] alive=true ttl=300 timeout=50

Reaping RoomNode[2] alive=true ttl=300 timeout=50

Reaping RoomNode[1] alive=true ttl=300 timeout=60

Reaping RoomNode[2] alive=true ttl=300 timeout=60

Reaping RoomNode[1] alive=true ttl=300 timeout=70

Reaping RoomNode[2] alive=true ttl=300 timeout=70

Reaping RoomNode[1] alive=true ttl=300 timeout=80

Reaping RoomNode[2] alive=true ttl=300 timeout=80

Reaping RoomNode[1] alive=true ttl=300 timeout=90

Reaping RoomNode[2] alive=true ttl=300 timeout=90

Reaping RoomNode[1] alive=true ttl=300 timeout=100

Reaping RoomNode[2] alive=true ttl=300 timeout=100

{

  data = "OK 1 0 0 0 0", 

  port = "/dev/ttyUSB0", 

}

process RoomNode[1]

moved=0

humi=0

temp=0

lobat=0

light=0

Reaping RoomNode[1] alive=true ttl=300 timeout=10

Just need to try and work out why i'm not getting any values for light/temp/humid etc. Is the roomnode2.hex build to work with the jeenode + room plug v2? is the source available? I think i probably need to hook the roomnode directly up to laptop and debug locally somehow...
Thanks again for the help- nearly there?! :)

 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Looks ok

As you are getting OK reports the Central + HAH are working fine - the bug is with the hardware on your roomnode.  Make sure you have correctly orientated the daughter board and its connected to the right ports.

data = "OK 1 0 0 0 0",   <-- this is what we expect to see MINUS all the 0's of course.

This means that the sensors on your roomboard are not working, so its a wiring issue.

ALSO: The HEX file that is supplied called RoomNode2 is setup to work with the DS18B20 temp sensor.  If you have a room board from JeeLabs and have the SHT11 connected you will need to use THEIR code and compile that up with the right configuration for the sensors you have installed.  Its output is however compatibile with the HAH backend.

Brett

tickett
Offline
Joined: 19 Nov 2011
Thanks for all the help.

Thanks for all the help. Pretty much got everything sussed now- to a point where the hah is collecting and posting some data to pachube. Ordered a load more bits from jeelabs and just need to spend some time setting everything up how i want it!

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Great

Good stuff looking forward to reading about your experience in your blog.  Don't go too crazy buying jeenode stuff we aim to have our own boards very soon which should be cheaper than Jee.

tickett
Offline
Joined: 19 Nov 2011
Cool- keep me posted on any

Cool- keep me posted on any new stuff :)

The curl command still needs updating http://livebox-hah.googlecode.com/files/HAHcentral.hex (i think it should be HAHCentral.hex :)

brett
Offline
Providence, United States
Joined: 9 Jan 2010
YARP

Ineed it should be HAHCentral.hex I've updated the wiki notes.

Brett

PS: If anybody feels the need or wants to get wiki R/W access so they can assist with documentation do let me know  ;)

Pentala
Offline
Joined: 22 Oct 2011
Wiki

Brett,

Happy to add some of my notes to the Wiki and provide some 'walk-through' type stuff if you like?

Andy

p.s. also interested in the HAHNode HW when it becomes available :-)

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Wiki is not part of forums

Unforunate the wiki pre-dates the HAH by several years and its a seperate entity.  If you create yourself a username/password I can grant you access to the part of the wiki you'll be able to update.

http://www.dbzoo.com/start?do=register

Hardware Info