Firmware Rollback

19 replies [Last post]
Lawrencezarb
Offline
Joined: 7 Mar 2012

Hi I have just updated to firmware 313 and have lost my config. When I tried to restore it says it was succesful yet the config is still missing.

I would like to rollback to 311 as it had all the functions I needed.

How do I rollback?

Thansks,

Lawrence

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
The config files are now

The config files are now split up instead of one large (and easily corrupted) file

They are stored in /etc/xap.d

You can edit these files with the settings you currently have in you config

Lawrencezarb
Offline
Joined: 7 Mar 2012
bug?

Ok, I have redone my config and notice that ob this release, 313, if for example I give RF1 a label, it appears on the ADMIN-INFO page, but when I go the AUTOMATION-CONTROL, the label reverts back to RF1...

Is this a bug?

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Possibly

It looks like this changed when the new 'up and coming' changes code was released

I suspect that this line in automation.kl1 

io_printf(out,"<tr><td>%s</td>", iniGetDynLabel("rf",i));

should look like this

io_printf(out,"<tr><td>%s</td>", iniGetDynLabel("rf",i,inifile));

as it is in config.kl1

Maybe Brett will take a look

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Thanks Mark - yes that line

Thanks Mark - yes that line is wrong along with a few others in there.

Brett

kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
Help

All the jeenodes stopped working.   Turning it on and off - usual solution - didn't work.  Got out old documentation and started fiddling.

Upgraded from 3.09 to 3.17 and then realised all that had happened was plugboard had stopped - at least I think so.

So how do I go back to 3.09 to see if I am right?

I realise all my lua stuff needs the require("pl.class").class changed to require("pl.class") - but don't know whether that happens automatically or not

- I have various strange files I think I hacked - boilernode / boilernode twin etc etc.

Any help appreciated - I HAVE looked for an hour to find what is probably an obvious answer.

Regards

 

Kim 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Kim there is no going back.. 

Kim there is no going back..  Well you could if I happen to have 309 on the server, but do you want to do this and miss out on all the goodness that has occurred !  In anycase I only have 314 and 316 firmware available.  I'd have to revert my source tree to how it looked at 309 and then build it and deploy without being able to test it myself.

Any code you have written does not get updated automatically but I don't recall this being a lot of work to fix.

Any file you hacked will still in in you /etc/plugboard dir so you haven't lost anything.
Tell us what is wrong and we'll try to get you going again.

kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
OK - here are my symptoms

The second livebox boots nicely and I can log on to the web interface and see version 3.17/1.0

When I ssh in and list processes there is no xap-plugboard running.

When I typed xap-plugboard I got

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

Loading /etc/plugboard/RebootApplet.lua         [ Auto reboot after set time ]

require("pl.class").class is deprecated. Use require("pl.class")

require("pl.class").class is deprecated. Use require("pl.class")

lua: /etc/plugboard/jeenodeApplet.lua:31: attempt to call global 'RoomNode' (a nil value)

stack traceback:

        /etc/plugboard/jeenodeApplet.lua:31: in main chunk

        [C]: in function 'require'

        /etc/plugboard/plugboard.lua:23: in function 'fun'

        /usr/share/lua/5.1/pl/tablex.lua:409: in function 'foreach'

        /etc/plugboard/plugboard.lua:75: in main chunk

        [C]: ?

Loading /etc/plugboard/jeenodeApplet.lua

-----------------------------------------------------
So I figured that jeenodeApplet.lua was out of date - it is attached - labelled jeenodeAppletold.lua while
I tried amending it - my edited one called jeenodeApplet also attached
Then I tried rebooting.... and got a slightly different set of error messages:
-----------------------------------------------------------------------
Loading /etc/plugboard/RebootApplet.lua         [ Auto reboot after set time ]
require("pl.class").class is deprecated. Use require("pl.class")
require("pl.class").class is deprecated. Use require("pl.class")
lua: /etc/plugboard/jeenodeApplet.lua:34: attempt to call global 'BoilerNode' (a                        table value)
stack traceback:
        /etc/plugboard/jeenodeApplet.lua:34: in main chunk
        [C]: in function 'require'
        /etc/plugboard/plugboard.lua:23: in function 'fun'
        /usr/share/lua/5.1/pl/tablex.lua:409: in function 'foreach'
        /etc/plugboard/plugboard.lua:75: in main chunk
        [C]: ?
--------------------------------------------------------------------------------
So now I have removed the ".class" in line 16 of Boilernode.lua and Boilernodetwin.lua - also attached.
But it doesn't seem to work.
So everything in my plugboard file is attached.  Now I am stuck!! Still getting same error.
Any input most welcome - I can explain my rather odd set of jeenodes if necessary - they are all very useful - when they work.
Regards
Kim
AttachmentSize
jeenodeAppletold.lua 1.06 KB
jeenodeApplet.lua 1.01 KB
boilernode.lua 1.56 KB
boilernodetwin.lua 1.76 KB
plugboard.lua 1.83 KB
RebootApplet.lua 314 bytes
brett
Offline
Providence, United States
Joined: 9 Jan 2010
Do you have the plugboard.lua

Do you have the plugboard.lua file in your /etc/plugboard directory ?
You need renaming that one out of the way so that it use the default version shipped.

The plugboard.lua you attached does this  - which is the OLD style of doing thing.

local ini = config.read("/etc/xap-livebox.ini")
The new one does this.
local ini = config.read("/etc/xap.d/plugboard.ini")

kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
Thank you for that idea...

I renamed the plugboard.lua to plugboardold.lua but got the same error.

Looking at the jeenodeapplet.lua in the samples there seem to be differences:

 

1) monitor = require("xap.jeenode").monitor   still seems to have the .monitor at the end - is this correct?

2) the definition of local nodes seems to have changed - using instance= instead of base =  - presumably I have to change that as well?

3) target= seems to have disappeared 

I suspect my white stick is showing here!

Regards

 

Kim 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
If you are looking at the

If you are looking at the samples that ship you can bet these are correct.   If your code differs you will need to amend the obvious.

I think base= is still supported but instance= is better, this was done so that that scripts could work on a portable distribution that was not named "livebox".

Yes this correct.

monitor = require("xap.jeenode").monitor

To switch you code over replace this
-- Keyed by NODE ID local nodes = { [2] = RoomNode{base="dbzoo.livebox.2.jeenode:test", endpoints={temp=1,light=1,lobat=1,moved=1,humi=1}, ttl=360}, [3] = BoilerNode{base="dbzoo.livebox.2.jeenode:util", endpoints={temp=1,light=1,lobat=1,moved=1}, ttl=360}, [4] = BoilerNodeTwin{base="dbzoo.livebox.2.jeenode:test2", endpoints={temp=1,light=1,lobat=1,moved=1,temp2=1}, ttl=360}, }
with
local nodes = { [2] = RoomNode{instance="jeenode:test", endpoints={temp=1,light=1,lobat=1,moved=1,humi=1}, ttl=360}, [3] = BoilerNode{instance="jeenode:util", endpoints={temp=1,light=1,lobat=1,moved=1}, ttl=360}, [4] = BoilerNodeTwin{instance="jeenode:test2", endpoints={temp=1,light=1,lobat=1,moved=1,temp2=1}, ttl=360}, }
This concept of naming each livebox if you have multiple has gone the way of the dodo.
dbzoo.livebox.2.jeenode

What happens now is that you hostname is used to defined the middle part.
dbzoo.<hostname>.jeenode

There is no concept of instance for a livebox anymore. Again thsi was done do support portable
and because its a much more sane way to do things.

This may break a few other thing where you have relied on this nomenclature for naming.

Brett
kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
still trying ...

Thank you for this. I have 'upgraded' the jeenodeApplet.lua to refer to instance.  The hostname is, and was, livebox2.  The other is just livebox.

Attached is the new lua - I also removed the line under local jeemon= i.e removed target="dbzoo.livebox.2.serial".  I hope that was right.

Still getting same errors

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

 ps

  PID USER       VSZ STAT COMMAND

    1 root      1808 S    init

    2 root         0 SW   [keventd]

    3 root         0 RWN  [ksoftirqd_CPU0]

    4 root         0 SW   [kswapd]

    5 root         0 SW   [bdflush]

    6 root         0 SW   [kupdated]

    7 root         0 SW   [mtdblockd]

    8 root         0 SW   [khubd]

   33 root         0 SWN  [jffs2_gcd_mtd2]

   99 root      1804 S    udhcpc -T 10 -i br0

  109 root      1668 S    dropbear -p 22

  118 root      1788 S    telnetd -p 23

  128 root      1796 S    tcpsvd -vE 0.0.0.0 21 ftpd -w /

  138 root      1032 S    /usr/bin/xap-hub

  141 root      1072 S    /usr/bin/xap-livebox -s /dev/ttyS0

  148 root      1044 S    /usr/bin/xap-serial

  150 root      4096 S    /usr/bin/kloned

  166 root      1740 S    dropbear -p 22

  167 root      1820 S    -ash

  168 root      1796 R    ps

# xap-plugboard

Loading /etc/plugboard/RebootApplet.lua         [ Auto reboot after set time ]

lua: /etc/plugboard/jeenodeApplet.lua:33: attempt to call global 'BoilerNode' (a table value)

stack traceback:

        /etc/plugboard/jeenodeApplet.lua:33: in main chunk

        [C]: in function 'require'

        /etc_ro_fs/plugboard/plugboard.lua:23: in function 'fun'

        /usr/share/lua/5.1/pl/tablex.lua:409: in function 'foreach'

        /etc_ro_fs/plugboard/plugboard.lua:66: in main chunk

        [C]: ?

Loading /etc/plugboard/jeenodeApplet.lua        #

--------------------------------------------------------------------
I have looked through the other "lua's" in plugboard and can't find any "base=" sections.
It is very good of you to keep giving me feedback.  When we get it going I shall let you know why this system is so useful.
Regards
Kim 
AttachmentSize
jeenodeApplet.lua 966 bytes
brett
Offline
Providence, United States
Joined: 9 Jan 2010
KimLook at the sample

Kim

Look at the sample boillernode.lua script and then look at yours.  In the new sample there is a "return BoilerNode" line at the end of the file.  You need this in your code too this is what the error above is about.

ps: You don't need your code as this is now built-in !   Just comment it out of the way in your /etc/plugboard directory.

replace  BoilerNode= require("boilernode")   with

BoilerNode= require("xap.boilernode")

However you will need to fix your boilerNodeTwin script as I mention above.

Brett

kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
Starting to get somewhere....

I decided to remove all the etc/plugboard lua and build them up one by one.

1) xap-plugboard works with rebootapplet - though I haven't checked that it actually works

2) xap-jeenodeApplet.lua works when I have commented out BoilerNode and BoilernodeTwin

So there can't be much wrong.  Now trying to confirm the jeenode radio is actually working and then will return to BoilerNode and BoilernodeTwin

which if I remember were hacked versions of jeenode to get different reporting options.

Will come back to you when I have "tried" a bit more.

 

Regards

Kim 

kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
our messages crossed.

... thanks for the latest idea.

 

Kim

kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
Getting there....

Boilernode now works - so two out of three.

I can't find a sample boilernode.lua in the plugboard/samples directory.  Is it somewhere else?

Also I am now considering the question of when I upgrade the other livebox from 309

The other box does the xively update for both boxes as well as monitoring the power and temperature directly from the board installed.

But I am thinking that when I upgrade to 317 the xively entries will need to change.

Attached is a screenshot of the xively entry - would I just change, say, 

dbzoo.livebox.2.jeenode:test.temp   to livebox2.jeenode:test.temp   ??

I would just try it but I remember this file was a bit of pig once the number of entries got high.

My xively entry is https://personal.xively.com/feeds/2128585885 - note the compost is now the garage

pipes - which I monitor in the winter to ensure they don't freeze!!

p.s. I am not going to do the other livebox upgrade today - you have been answering questions long enough!!

 

Regards

 

Kim 

AttachmentSize
xively.jpg 56.02 KB
kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
success ....

I just found out that you can do a file search in filezilla

Found boilernode.lua in /usr/share/lua/5.1/xap

And now it works!  How satisfying is that.

Thanks for all your help - do you have an email address I can send a paypal donation to - must be worth

a beer after all your efforts.

Incidently livebox has proven very useful on at least three occasions in the past:

1) When selling our old house in winter we were away when an electrician called to do a wiring report - he didn't turn the central heating back on and without HAH livebox I would not have seen the house temperature slowing dropping while we were away. Saved the pipes bursting.

2) Last november a similar thing when the boiler cut off.  I have a neon light on the boiler going to the light sensor (all taped together) - so I know when the boiler is actually going on and off. A neighbour came and reset the boiler. So the cats didn't get cold.

3) Diagnosing why the boiler cut off proved difficult - it was the fire sensor going off - I found the fire sensor was tripping at 48 degrees internally - instead of 65 degrees - Livebox was able to monitor the temperature inside the boiler housing to make sure it was really safe.

So thank you for all the work you put into this over the years.  It remains great fun.  Now I can go on 

holiday with less worry knowing I can check the house. ... and play with getting livebox 1 up to date when I return.

Regards

 

Kim 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Kim,Glad its up and

Kim,

Glad its up and running.   I would be tempted to leave the other livebox alone.  It ain't broke don't touch it!

Anyway you have one upgraded so you can poke about and see what has changed.   Quite a bit I suspect.

It been a while since I have done any HAH development, so it was a bit of fun to stoke some of my brain cells into giving me information I have not accessed for a while.  Donations are not necessary I'm just happy its up and running and stuff I've writting is useful.    Thanks for the summary of how its helped you out - very cool.

Cheers

brett
Offline
Providence, United States
Joined: 9 Jan 2010
It will be much easier to

It will be much easier to edit your /etc/xap/xap-xively.ini file by hand....

This kind of change looks good to me.   You can verify the name change using the xFxViewer to see how things are appearing on your network now.

dbzoo.livebox.2.jeenode:test.temp   to dbzoo.livebox2.jeenode:test.temp   <-- I would think so.
kim
Offline
Throwleigh, United Kingdom
Joined: 1 Dec 2010
yup ...... all ok now

So for now will keep xively reporting livebox on old version - so I edited xap-livebox.ini directly.  Thanks for advance notice of new file name when I upgrade.

Hardware Info