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?
login as: root
root@192.168.0.124's password:
# microcom -s 57600 /dev/ttyUSB0
[RF12nocfg.1] A i1 g212 @ 868 MHz
Current basenode configuration:
A i1 g212 @ 868 MHz
OK 5 180 6 178 241 0
OK 2 0 0 50 2
OK 5 182 6 178 241 0
OK 5 182 6 178 241 0
? 187 113 222 104 156 39 194 245 30 103 21 68 69 76 225 206 239 98 103 209 137
OK 5 183 6 178 241 0
OK 5 183 6 178 241 0
? 190 243 225 204 197 108 98 156 13 223 70 81 235 137 126 212 129 100 153 120 66
OK 5 183 6 178 242 0
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
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
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
Things to check.
- You have already validated that the base node it getting data with microcom so that's good.
- 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.
- 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
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
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
Hi Dean
I've just come upon this. Your jeenodeApplet has no reference to the oilnode stuff I sent you:
http://www.homeautomationhub.com/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
-----------------------------------------
Dean, that looks better. Has this fixed your issue?
magill, you're using the outdated base ref still?
Garry
Sorry I just cut and pasted some old code. I've corrected it.
John
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
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
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.
where has the oilnode.lua gone?
You need to have it in the plugboard directory.
John
Email me directly if you like.
My bad I didn't realise that it was needed in addition to the jeenode applet. Sorry!
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
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
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.
Dean
I have a spare Livebox running latest 316 and have loaded and edited your files. They now seem to run without error.
Put just these 5 files in your plugboard folder. You will probably have to edit the local nodes within jeenodeApplet.lua
John
Attachment | Size |
---|---|
AliasHandlerApplet.lua | 2.59 KB |
boilernode.lua | 1.52 KB |
jeenodeApplet.lua | 712 bytes |
xapCacheWebserverApplet.lua | 4.33 KB |
oilnode.lua | 998 bytes |
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.