problem

I had a major power spike a few weeks ago and my cc lead got fried (along with livebox)

basenode as also not working. so i replaced it.

output below does this look right? as i am not seeing any "interpretaed" packets on my joggler.

 

how do i debug this problem?

 

Member for

17 years

derek

12 years 2 months ago

Do check that the necessary applet is running on your HAH

http://www.dbzoo.com/livebox/hah_hahnode#configuring_the_jeenodeappletlua

I'm probably teaching you how to suck eggs here, but best to make sure. Also, there is a version of the node firmware that doesn't report lines starting with a '?'. Such reports are just noise on the link. Suppressing these gives the HAH applet less to do because it only works on reports that start with 'OK'.

Derek.

 

Member for

15 years 10 months

g7pkf

12 years 2 months ago

jeenodeApplett.lua

been so long since i had to build one of these :)

 

contents below:-

 

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

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

monitor = require("xap.jeenode").monitor
RoomNode = require("xap.roomnode").RoomNode
BoilerNode = require("boilernode").BoilerNode


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] = BoilerNode{base="dbzoo.livebox.jeenode:pond", endpoints={temp=1,light=1,lobat=1}, ttl=1800},
}

function init()
   monitor(jeemon, nodes)
end

Member for

16 years 10 months

brett

12 years 2 months ago

I take it jeenodeApplett.lua was a typo, if not then it won't we loaded.
Files should be called <Something>Applet.lua

One t in applet.

Brett

Member for

15 years 10 months

g7pkf

12 years 2 months ago

Typo sorry

Member for

15 years 7 months

garrydwilms

12 years 2 months ago

Hi,

I may be wide of the Mark here but have you got a boilernode applet in the plugboard folder or are you hoping to use the one shipped with the firmware. Reason is, I think you need to change the boilernode to xap.boilernode in the crequire section to use the firmware version.

Garry

Member for

15 years 10 months

g7pkf

12 years 1 month ago

this is my boilernode lua, i do not really understand last messgae?

 

--[[  boilernode.lua

   Use in conjuction with the RoomNode JeeNode sketch.
   Copyright (c) Brett England, 2011

   No commercial use.
   No redistribution at profit.
   All derivative work must retain this message and
   acknowledge the work of the original author.
--]]
module("boilernode", package.seeall)

require("xap.bsc")
jeenode = require("xap.jeenode")
Nodule = jeenode.Nodule
class = require("pl.class").class

class.BoilerNode(Nodule)

-- create BSC endpoints
function BoilerNode:build(...)
   Nodule.build(self, ...)

   -- Creates the endpoints: self[key] as in self.light, self.moved etc..
   -- If the user has configured that they want them that is.
   self:add {key="light", direction=bsc.INPUT, type=bsc.STREAM}
   self:add {key="moved", direction=bsc.INPUT, type=bsc.BINARY}
   self:add {key="humi", direction=bsc.INPUT, type=bsc.STREAM}
   self:add {key="temp",  direction=bsc.INPUT, type=bsc.STREAM}
   self:add {key="lobat", direction=bsc.INPUT, type=bsc.BINARY}
end

function BoilerNode:process(data)
--[[
-- From the RoomNode.pde Sketch
struct {
    byte light;     // light sensor: 0..255
    byte moved :1;  // motion detector: 0..1
    byte humi  :7;  // humidity: 0..100
    int temp   :10; // temperature: -500..+500 (tenths)
    byte lobat :1;  // supply voltage dropped under 3.1V: 0..1
} payload;
--]]
   local li, mo, hu, te, lo = jeenode.bitslicer(data,8,1,7,10,1)
   te = te  / 10
   -- The keys here must match the key values from the self:add{key=x}
   Nodule.process(self,{light=li,moved=mo,humi=hu,temp=te,lobat=lo})
end

Member for

16 years 10 months

brett

12 years 1 month ago

That definitions for the nodes{} is a old school, with supplying base=.

When the "Portable" distribution came around the leading parts of the triple are not specified (dbzoo.livebox.jeenode) and will be supplied for you. To make setting up nodes, and their corresponding source, host portable its now more like this:

local nodes = {
   [2] = BoilerNode{instance="jeenode:pond", endpoints={temp=1,light=1,lobat=1}, ttl=1800},
}

I did update samples/jeenodeApplet.lua and the documentation to reflect this.
Brett

Member for

15 years 10 months

g7pkf

12 years 1 month ago

That explains why, now gotta figure it all out (not a script guy-hardware).

This is going to take some time :)

Member for

15 years 10 months

g7pkf

12 years 1 month ago

And getting no where spent 8 hours on it, anyone willing to help?

 

will open up ports etc so direct access is allowed?

 

or rather full public access (for a short time) (i have several public ip's avalible)

 

OK its on full public access email me if you are willing to help?

 

dean usual symbol packetradio then usual co uk

 

Dean

Member for

15 years 10 months

g7pkf

12 years 1 month ago

An assorted goody bag of related bits will be in the post once this gets sorted :)

Dean

P.S too busy sorting out probate in 2 countries to be honest, and wife driving me nuts as it is!! hence help required and appreciated.

Member for

16 years 10 months

brett

12 years 1 month ago

Things to check.

  1. You have already validated that the base node it getting data with microcom so that's good.
  2. Make sure xap-serial is running.  You this need up so that data at step1 can be put on the wire as xAP for the plugboard to see and interpret.
  3. Setup the jeeNodeApplet.lua this tells xap-serial to listen for data it also creates BSC endpoints and updates those based on incoming xAP serial packets from step 2.

You need to ensure xap-serial is up and running.  If not then start it.  Then restart the plugboard.  This sequence is necessary as plugboard sends a configuration xAP packet to xap-serial.

Do you see data coming in from xap-serial?
What do you see?

Brett

Member for

15 years 10 months

g7pkf

12 years 1 month ago

um ref below? how

 

You need to ensure xap-serial is up and running.  If not then start it.  Then restart the plugboard.  This sequence is necessary as plugboard sends a configuration xAP packet to xap-serial.

 

Also is it possible to downgrade firmware? winter is upon us and i really need oil level monitoring and this may be fastest way forward :)

 

Dean

Member for

16 years 10 months

brett

12 years 1 month ago

Downgrading is possible but I would have to check out the code from a point in time and rebuild it for you.
The latest should work thou - it contains many bug fixes.

xap-serial can be access on the gui;  Automations TAB - > Assist TAB -> Serial SCHEMA service (radio button)

For screenshot see: http://www.dbzoo.com/livebox/xap_serial

On the same TAB you will also see this is where you enable the plugboard engine too.
Enable both then reboot.

Brett

Member for

15 years 10 months

g7pkf

12 years ago

Well they were both enabled :( sure its in my scripts but dammed if i can figure it out.)

 

scripts below, sure i could have attatched them but no idea how :)

 

--[[ boilernode.lua

 

Use in conjuction with the RoomNode JeeNode sketch.

Copyright (c) Brett England, 2011

 

No commercial use.

No redistribution at profit.

All derivative work must retain this message and

acknowledge the work of the original author.

--]]

module("boilernode", package.seeall)

 

require("xap.bsc")

jeenode = require("xap.jeenode")

Nodule = jeenode.Nodule

class = require("pl.class").class

 

class.BoilerNode(Nodule)

 

-- create BSC endpoints

function BoilerNode:build(...)

Nodule.build(self, ...)

 

-- Creates the endpoints: self[key] as in self.light, self.moved etc..

-- If the user has configured that they want them that is.

self:add {key="light", direction=bsc.INPUT, type=bsc.STREAM}

self:add {key="moved", direction=bsc.INPUT, type=bsc.BINARY}

self:add {key="humi", direction=bsc.INPUT, type=bsc.STREAM}

self:add {key="temp", direction=bsc.INPUT, type=bsc.STREAM}

self:add {key="lobat", direction=bsc.INPUT, type=bsc.BINARY}

end

 

function BoilerNode:process(data)

--[[

-- From the RoomNode.pde Sketch

struct {

byte light; // light sensor: 0..255

byte moved :1; // motion detector: 0..1

byte humi :7; // humidity: 0..100

int temp :10; // temperature: -500..+500 (tenths)

byte lobat :1; // supply voltage dropped under 3.1V: 0..1

} payload;

--]]

local li, mo, hu, te, lo = jeenode.bitslicer(data,8,1,7,10,1)

te = te / 10

-- The keys here must match the key values from the self:add{key=x}

Nodule.process(self,{light=li,moved=mo,humi=hu,temp=te,lobat=lo})

end

 


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

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

monitor = require("xap.jeenode").monitor
RoomNode = require("xap.roomnode").RoomNode
BoilerNode = require("boilernode").BoilerNode


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] = BoilerNode{instance="jeenode:pond", endpoints={temp=1,light=1,lobat=1}, ttl=1800},
}




--local nodes = {
--   [2] = BoilerNode{base="dbzoo.livebox.jeenode:pond", endpoints={temp=1,light=1,lobat=1}, ttl=1800},
--}

function init()
   monitor(jeemon, nodes)
end

 

module("oilnode", package.seeall)

require("xap.bsc")
jeenode = require("xap.jeenode")
Nodule = jeenode.Nodule
class = require("pl.class").class

class.OilNode(Nodule)

-- create BSC endpoints
function OilNode:build(...)
   Nodule.build(self, ...)

   -- Creates the endpoints: self[key] as in self.light, self.moved etc..
   -- If the user has configured that they want them that is.
   self:add {key="oil", direction=bsc.INPUT, type=bsc.STREAM}
   self:add {key="moved", direction=bsc.INPUT, type=bsc.BINARY}
   self:add {key="humi", direction=bsc.INPUT, type=bsc.STREAM}
   self:add {key="temp",  direction=bsc.INPUT, type=bsc.STREAM}
   self:add {key="lobat", direction=bsc.INPUT, type=bsc.BINARY}
end

function OilNode:process(data)

  -- local li, mo, hu, te, lo = jeenode.bitslicer(data,8,1,7,-10,1)
   local oi, mo, hu, te, lo = jeenode.bitslicer(data,16,1,7,-10, 1)
   te = te  / 10
   -- The keys here must match the key values from the self:add{key=x}
   Nodule.process(self,{oil=oi,moved=mo,humi=hu,temp=te,lobat=lo})
end

 

--[[
    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
OilNode = require("oilnode").OilNode
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.jeenode:livingroom", endpoints={temp=1,light=1,moved=1}, ttl=360},
   [5] = OilNode{base="dbzoo.livebox.jeenode:outside", endpoints={temp=1,oil=1,humi=1,lobat=1}, ttl=360}

}

function init()
   monitor(jeemon, nodes)
end

Member for

15 years 7 months

garrydwilms

12 years ago

Dean,

this suggests you have two jeenode applets? Is that correct? You should only have one with all your nodes in. 

Can you confirm your list of scripts in plugboard folder?

Also as Brett mentioned earlier you need to modify the jeenode applet slightly where it states base= to the newer instance= format

Garry

Member for

15 years 10 months

g7pkf

12 years ago

 

Like this?

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

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

monitor = require("xap.jeenode").monitor
RoomNode = require("xap.roomnode").RoomNode
BoilerNode = require("boilernode").BoilerNode


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] = BoilerNode{instance="jeenode:pond", endpoints={temp=1,light=1,lobat=1}, ttl=1800},
}




--local nodes = {
--   [2] = BoilerNode{instance="dbzoo.livebox.jeenode:pond", endpoints={temp=1,light=1,lobat=1}, ttl=1800},
--}

function init()
   monitor(jeemon, nodes)
end

Member for

14 years 6 months

magill

12 years ago

Hi Dean

I've just come upon this. Your jeenodeApplet has no reference to the oilnode stuff I sent you:

/content/oil-tank-depth-gauge

your jeenodeApplet needs to look something like:

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

--[[ 
    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
OilNode = require("oilnode").OilNode
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{instance="jeenode:livingroom",  endpoints={temp=1,light=1,moved=1}, ttl=360}, 
   [4] = RoomNode{instance="jeenode:kitchen", endpoints={temp=1,light=1,moved=1}, ttl=360}, 
   [5] = OilNode{instance="jeenode:outside", endpoints={temp=1,oil=1,humi=1,battery=1}, ttl=3600}

}

function init()
   monitor(jeemon, nodes)
end

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


and oilnode.lua:
----------------------------

module("oilnode", package.seeall) require("xap.bsc") jeenode = require("xap.jeenode") Nodule = jeenode.Nodule class = require("pl.class") class.OilNode(Nodule) -- create BSC endpoints function OilNode:build(...) Nodule.build(self, ...) -- Creates the endpoints: self[key] as in self.light, self.moved etc.. -- If the user has configured that they want them that is. self:add {key="oil", direction=bsc.INPUT, type=bsc.STREAM} self:add {key="moved", direction=bsc.INPUT, type=bsc.BINARY} self:add {key="humi", direction=bsc.INPUT, type=bsc.STREAM} self:add {key="temp", direction=bsc.INPUT, type=bsc.STREAM} self:add {key="battery", direction=bsc.INPUT, type=bsc.STREAM} end function OilNode:process(data) -- local li, mo, hu, te, lo = jeenode.bitslicer(data,8,1,7,-10,1) local oi, mo, hu, te, ba = jeenode.bitslicer(data,16,1,7,-10,16) te = te / 10 ba = ba/100 oi=math.floor(oi/(1+(.0008*te)))-11 -- The keys here must match the key values from the self:add{key=x} Nodule.process(self,{oil=oi,moved=mo,humi=hu,temp=te,battery=ba}) end
-----------------------------------------

Member for

15 years 7 months

garrydwilms

12 years ago

Dean, that looks better. Has this fixed your issue?

 

magill, you're using the outdated base ref still?

Member for

14 years 6 months

magill

12 years ago

Garry

Sorry I just cut and pasted some old code. I've corrected it.

John

Member for

15 years 1 month

allanayr

12 years ago

Dean

I don't do jeenodes so I can't really help with the code for that but I notice that you still have a pvoutput Applet which I didn't think you needed because you update your pvoutput.org data by grabbing it from xively/cosm/pachube.

Just an observation.

 

Allan

Member for

14 years 6 months

magill

12 years ago

Dean

Remove or move oilnodeApplet.lua as it is a replica (nearly) of jeenodeApplet.lua.

Then in jeenodeApplet.lua edit the line:

 [2] = OilNode{base="dbzoo.livebox.jeenode:pond", endpoints={temp=1,oil=1,humi=1,battery=1}, ttl=3600}

to be

  [2] = OilNode{instance="jeenode:outside", endpoints={temp=1,oil=1,humi=1,battery=1}, ttl=3600}

also why have you called the oil tank "pond"

John

Member for

15 years 10 months

g7pkf

12 years ago

thanks for all help have a slight problem/question

 

"Remove or move oilnodeApplet.lua as it is a replica (nearly) of jeenodeApplet.lua."

 

I have OilNodeApplet.lua   and   oilnode.lua  which one should i remove or both?

 

It's called pond as the tank is next to pond and temp sensor is in the pond :)

removet PV lua.

Member for

15 years 1 month

allanayr

12 years ago

Just move the oilnodeApplet.lua from the plugboard directory and then restart the plugboard. The oilnode.lua won't run unless you specifically issue a "lua oilnode.lua" command.

Member for

14 years 6 months

magill

12 years ago

where has the oilnode.lua gone?

You need to have it in the plugboard directory.

John

Email me directly if you like.

Member for

15 years 1 month

allanayr

12 years ago

My bad I didn't realise that it was needed in addition to the jeenode applet. Sorry!

Member for

15 years 7 months

garrydwilms

12 years ago

Hi Dean,

 

looks like a lot of confusion on the jeenode structure and what files are needed.

in summary:

you need a jeenodeApplet.lua that sets up ALL your nodes. If you have a boiler node, oilnode, roomnode. Then all three should be declared in this one applet.

for non standard nodes (boilernode and oilnode) for example, you also need the lua script that contains the decoding information amongst other things. These are just .lua files and NOT Applet.lua's.

These lua files need to be "required" in you jeenodeApplet like so

 

BoilerNode = require("boilernode").BoilerNode
OilNode=require("oilnode").OilNode

 

This is the part of the script that tells it to look in the .lua files for the decode info, etc.

Hope this clears things up a little.

 

Garry

Member for

15 years 10 months

g7pkf

12 years ago

Oil is sort of working, need to add roomnode to lua/plugboard.

Oil needs proper supply.

dropped back to ver 310, i knackered my latest live box hence going back to an old one and it is sort of start working. (on ver 310)

going to get it all back 100% then look at taking the leap of upgrade.

All your help has got me going again.

 

thanks

Dean

And my wife is sort of happy (as happy as they get)

Member for

15 years 10 months

g7pkf

12 years ago

got an OLD livebox on 310 working 100%

"if" i upgrade what changes to my scripts do i need to do?

scripts here:- http://www.packetradio.co.uk/hah.tar.gz

been a long couple of month's

If i break it again wife will go MAD!!!!

Member for

15 years 7 months

garrydwilms

12 years ago

I'm surprised this is working? You still have oilnodeApplet AND jeenodeApplet running? One declares node 2 as a roomnode the other declares node2 as a boilernode.

as for upgrading, the process will split your ini files up for you and you'll need to change base ref to instance as discussed earlier.

Garry.

Member for

15 years 10 months

g7pkf

12 years ago

Tidying it up now. Thanks Garry

 

Really scared to upgrade as wife has been having proverbial "hissy fit" these last 2 months.

 

is there an easy way to downgrade to a previous firmware?

 

Dean

Member for

15 years 10 months

g7pkf

12 years ago

Really appreciated.

when i am feeling brave i will have a go at updating :)

 

Dean