I am having issues with my Livebox and am considering the new enhanced Raspberry Pi 2. Has anyone got a fully functional set up hooked up to the HAH pcb with RF etc and jeenode. Any advice appreciated.
I think the newer version is faster, more ram, and more USB ports but is compatable with the original. I can't find anything on the forum about connecting it to the PCB. What about firmware upgrades, does this build get left behind? Are there any disadvantages of using the PI?
power can also come from gpio pins (a pi gpio breakout adapter is recommended) but you will need to supply 12v from a wall wart to the rf module if you use it.
as for firmware upgrades, Brett has been good at mirroring any changes to the portable distro but I have been installing these updates manually. Maybe Brett could comment on the ease of applying updates from the portable branch more simply?
as for benefits of the pi, I like it cos I can install other complimentary stuff such as apache and php for local web control pages and charting apps like cacti.
My livebox has been dead now for several months. I thought it was the power supply but I got a new one and its still not happy :( I need to pull it off the wall in my cupboard and see what is going on. Anyway I use a beaglebone (original) for all my xAP stuff and updating is a snap, I just "svn update" then "INSTALL_DIR=/ make install" to build it and install it back over the top of what's there.
for FTP you will need to install something like vsftp on your PI.
restore from settings won't work, once setup it's best you image your SD card and backup the whole PI.
I setup my static IP using my router. Works ok..
version 313 is still showing in google code repo for the portable branch. Not sure this has been keeping upto date. Don't worry.
in summary, some of the functions on the webpage won't work or make sense. But other than save settings, there is nothing broken of any real detriment to day to day use. At least not that I've found.
Thanks for that. I can input all the settings again. FTP I use with a homebrew VB app to edit all my lua files. If I can get that to work as well as Jeenodes and plugboard scripts, I'll be happy.
Not strictly on topic but is there an easy way to temporarily disable the HAH stuff on a pi (particularly the web server) in order to experiment with an apache web server set up?
I know I could just use a seperate SD card without the HAH stuff installed but it would be nice to just be able to switch it on and off.
i have both running. The way I did it was to change the Klone port (webserver) and rebuild so it responds on port 8000. I'll try to put some notes together for you if you want but it will be tomorrow now.
Other easier option may be to alter the apache port. If that's possible! Have a google
garry
or edit the /etc/init.d/xap script to stop Klone booting.
subsystem="hub xively iserver serial twitter livebox web currentcost plugboard"
I'm going round in circles. I installed apache and it commandeered port 80. I then, as per Bretts post, moved HAH webserver port to 88. Now I can't access it on 88. Can both co-exist? My goal is to generate some PHP script to do various tasks but I would like to keep the HAH gui.
Both can exist. I have a web Page running php scripts to contol my heating, etc. although I hadn't realised that you could change the Klone port via an external conf file so I have done it before compiling.
Ill check what I did and see if I can change the port via an external conf file and get back to you.
I'm still having no success in resurrecting the HAH web page. Apart from re-installing the entire portable, is there any way to establish that the server is running. Sorry very weak on linux....
John you probably already have something listening on port 80.
# lsof -i:80
This will tell you what it is. By default httpd is installed on the raspPI and it wants this port. Move kloned to another port as per a comment I made a few posts back.
I'm forging ahead with my PI build with some success. I've managed to get the PI to talk to the HAH board, but still fighting with jeenode. I get responses from microcom but XFX shows no valid serial or jeenode responses? Garry has been helping me with some PHP script which requires the webserver lua. I have a problem which is probably obvious to the initiated but not me. I get plugboard error:
lua: /usr/share/lua/5.1/xap/init.lua:484: /etc/plugboard/xapCacheWebserverApplet.lua:120: attempt to index field 'xap-header' (a nil value)
xAP Message being processed.
xap-header
{
uid=FF00DB60
source=dbzoo.raspberrypi.Controller:relay.1
hop=1
class=xAPBSC.event
v=12
}
output.state
{
state=on
displaytext=Relay 1 on
}
stack traceback:
[C]: in function 'error'
/usr/share/lua/5.1/xap/init.lua:484: in function 'dispatch'
/usr/share/lua/5.1/xap/init.lua:91: in function 'fun'
/usr/share/lua/5.1/pl/List.lua:392: in function 'foreach'
/usr/share/lua/5.1/xap/init.lua:90: 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/plugboard/plugboard.lua:67: in main chunk
[C]: ?
Loading /etc/plugboard/xapCacheWebserverApplet.lua[ xAP Caching web servlet ]
Running...
Garry thanks that sorted it and also makes my PHP script links to end points work.
Any idea why microcom -s 57600 -p /dev/ttyUSB0 shows incoming rf packets but XFX sees nothing except serial heartbeats. Is there another ini file I've missed?
Indeed it will be the jeenodeApplet.lua this is responsible for sending an xAP message to xap-serial asking it to open a serial port and relays input from it as xAP message. The argument below are the same as what xap-serial takes for configuration settings; port, baud, etc..: http://www.dbzoo.com/livebox/xap_serial#input_messages
local jeemon={ port="/dev/ttyUSB0",
...
function init() monitor(jeemon, nodes)
Make sure you have a port definition in its configuration. You may want to restart just the plugboard to send another configuration message to xap-serial . $ sudo /etc/init.d/xap restart plugboard
if you have XfXViewer active at the time make sure you don't see any error packets being sent from xap-serial.
I have now got the PI fully functional with jeenode, inputs, outputs, RF etc all working. Problem now is iServer. All IPs are the same as my old Livebox but I now have no connectivity from the Joggler . Any one else made this transition?
edit:
Part of the issue seems to be the mapping to PI from Joggler ie:
http://x.x.x.x/live
I've tried changing to http://x.x.x.x/etc/www but no good.
EDIT:
I moved the config file from the livebox to the joggler and changed the mapping to /media/appshop/xAP
I then got an interface but endpoints were not updating.
Erasing what I previously wrote. I copied over the xapconfig.xml from my joggler to my Beaglebone, adjusted the IP inside the file to use the local iServer, and it just worked.
The file in this location is served up by the virtual directory /live So for me as my beaglebone is called power.local this URL accesses it -> http://power.local/live/xapconfig.xml
This works because /usr/share/flash/config.xml says this is where local configuration can be found.
I believe it's Klone that serves up the /live folder. As you have made changes to Klone to serve gui on port 88 I'm guessing that's the reason. I don't use a joggler /iserver so can't test but wondering if you can alter the port in he xap flash files somewhere?
12v goes into same place as it did originally from the livebox, other side off the board near the LCD contrast adjuster. Another pic to try to show this, see the red wire hiding near the pot?GND shared with nearest available point.
maybe your way would be easier?
coiled antennae came from EBay
I have some spare coils and Perspex plates if you want then, just DM me.
I think you could connect to the voltage regulator with an existing Livebox PSU ia long as you connect to the correct pin on the voltage regulator, see circuit attached or here for a bigger view : http://www.dbzoo.com/_media/livebox/pcb_rev1.jpg
Thanks for you help Garry. I've now got this going, just a couple of things that weren't obvious to me and could maybe do with being added to the portable wiki page, happy to do that myself if given access.
I didn't realise I needed to get the 5v from the RJ11, I though the 15/12v supply was also reduced to 5v for the rest of the board.
I needed to edit the /etc/xap.d/xap-livebox.ini file to get the web interface working properly, setting enable=1, adding the correct serial port for the Raspberry Pi, port=/dev/ttyANA0 and uncommenting the initserial=+++ line. I appreciate that the port is probably different for the BeableBone, I don't have one so can't say what it should be.
Member for
15 years 7 monthsHi John, I have all the above
Hi John,
I have all the above on the original pi. Not sure what has changed on the pi 2 and whether this would make any differences. I'll have a read up.
Garry
Member for
14 years 6 monthsGarryI think the newer
Garry
I think the newer version is faster, more ram, and more USB ports but is compatable with the original. I can't find anything on the forum about connecting it to the PCB. What about firmware upgrades, does this build get left behind? Are there any disadvantages of using the PI?
John
Member for
15 years 7 monthsJohn,the pcb will hang nicely
John,
the pcb will hang nicely off the pi gpio port, pins 14 and 15. These relate to pi serial port ttyAMA0.
you will need to disable console and boot up info on this port first as per: http://www.hobbytronics.co.uk/raspberry-pi-serial-port
power can also come from gpio pins (a pi gpio breakout adapter is recommended) but you will need to supply 12v from a wall wart to the rf module if you use it.
as for firmware upgrades, Brett has been good at mirroring any changes to the portable distro but I have been installing these updates manually. Maybe Brett could comment on the ease of applying updates from the portable branch more simply?
as for benefits of the pi, I like it cos I can install other complimentary stuff such as apache and php for local web control pages and charting apps like cacti.
Not really found any disadvantages yet.
cheers
Garry.
Member for
16 years 10 monthsMy livebox has been dead now
My livebox has been dead now for several months. I thought it was the power supply but I got a new one and its still not happy :( I need to pull it off the wall in my cupboard and see what is going on.
Anyway I use a beaglebone (original) for all my xAP stuff and updating is a snap, I just "svn update" then "INSTALL_DIR=/ make install" to build it and install it back over the top of what's there.
Pretty much what is documented here http://www.dbzoo.com/livebox/portable
My xAP server, and now MQTT server, lives outside /content/pvouput
Member for
14 years 6 monthsGarry/BrettThanks for the
Garry/Brett
Thanks for the info, I'll have a go at setting it up.
John
Member for
13 years 11 monthsMy Livebox is also dead but
My Livebox is also dead but with the magic work taking place on the ESP module im about to get things backup and running
I have a Beaglebone black and a couple of Rasberry Pis sitting here, Mark & Brett both are using the BBs, Garrys using the Pi
Decisions.....
Member for
14 years 6 monthsrasp pi
I managed to install HAH on my PI and can SSH but now I'm out of my depth.
1. Version 313. Is that correct?
2. I cannot restore from a settings file
3 I cannot get FTP to work
4. I get a strange behaviour when I try to set static IP
Maybe these are restrictions on this build.
John
Member for
15 years 7 monthsHi John. for FTP you will
Hi John.
for FTP you will need to install something like vsftp on your PI.
restore from settings won't work, once setup it's best you image your SD card and backup the whole PI.
I setup my static IP using my router. Works ok..
version 313 is still showing in google code repo for the portable branch. Not sure this has been keeping upto date. Don't worry.
in summary, some of the functions on the webpage won't work or make sense. But other than save settings, there is nothing broken of any real detriment to day to day use. At least not that I've found.
Garry
Member for
14 years 6 monthsGarryThanks for that. I can
Garry
Thanks for that. I can input all the settings again. FTP I use with a homebrew VB app to edit all my lua files. If I can get that to work as well as Jeenodes and plugboard scripts, I'll be happy.
John
Member for
15 years 1 monthNot strictly on topic but is
Not strictly on topic but is there an easy way to temporarily disable the HAH stuff on a pi (particularly the web server) in order to experiment with an apache web server set up?
I know I could just use a seperate SD card without the HAH stuff installed but it would be nice to just be able to switch it on and off.
Member for
15 years 7 monthsHi Alan,i have both running.
Hi Alan,
i have both running. The way I did it was to change the Klone port (webserver) and rebuild so it responds on port 8000. I'll try to put some notes together for you if you want but it will be tomorrow now.
Other easier option may be to alter the apache port. If that's possible! Have a google
garry
or edit the /etc/init.d/xap script to stop Klone booting.
subsystem="hub xively iserver serial twitter livebox web currentcost plugboard"
remove web from this line.
garry
Member for
15 years 1 monthThanks Garry, I'll have a go.
Thanks Garry, I'll have a go.
Member for
15 years 1 monthremoving the word web from
removing the word web from the line in that file worked a treat.
Thanks.
Member for
16 years 10 monthsExternal kloned.conf
I added the capability to have an external kloned.conf file way back on release 305.
For the portable distribution its even easier just edit /etc/kloned.conf and move it to a different port.
app_http
{
type http
addr.type IPv4
addr.port 80
Member for
14 years 6 monthsI'm going round in circles. I
I'm going round in circles. I installed apache and it commandeered port 80. I then, as per Bretts post, moved HAH webserver port to 88. Now I can't access it on 88. Can both co-exist? My goal is to generate some PHP script to do various tasks but I would like to keep the HAH gui.
thanks
John
Member for
15 years 7 monthsBoth can exist. I have a web
Both can exist. I have a web Page running php scripts to contol my heating, etc. although I hadn't realised that you could change the Klone port via an external conf file so I have done it before compiling.
Ill check what I did and see if I can change the port via an external conf file and get back to you.
Garry
Member for
14 years 6 monthsI'm still having no success
I'm still having no success in resurrecting the HAH web page. Apart from re-installing the entire portable, is there any way to establish that the server is running. Sorry very weak on linux....
John
Member for
15 years 1 monthDunno if it will work on your
Dunno if it will work on your machine but you could try:
sudo ps aux | grep klone
to see if the kloned is running.
Member for
14 years 6 monthsresponse ispi 2403
response is
pi 2403 0.0 0.4 3552 1832 pts/0 S+ 16:02 0:00 grep --color=auto klone
No idea what that means
Member for
15 years 1 monthI think that means that the
I think that means that the klone deamon is NOT running.
It should say something which will include /user/bin/kloned.
Unfortunately I'm away from my box for the weekend so I can't be too much help but it looks like the daemon is not starting successfully.
Member for
16 years 10 monthsJohn you probably already
John you probably already have something listening on port 80.
# lsof -i:80
This will tell you what it is. By default httpd is installed on the raspPI and it wants this port.
Move kloned to another port as per a comment I made a few posts back.
Brett
Member for
14 years 6 monthsBrettThis tells me that
Brett
This tells me that apache is on there, which I know. I had moved Kloned to 88 but my problem is that it appears not to be running.
I ran # lsof -i:88 and it shows nothing.
thanks
John
Member for
15 years 7 monthsHi Johnif it's not starting,
Hi John
if it's not starting, try
sudo /etc/init.d/xap start web
to attemp a startup. Check it's still not running, if not look in log
/var/log/messages
let us know what it says about kloned
Garry
Member for
14 years 6 monthsI'm forging ahead with my PI
I'm forging ahead with my PI build with some success. I've managed to get the PI to talk to the HAH board, but still fighting with jeenode. I get responses from microcom but XFX shows no valid serial or jeenode responses? Garry has been helping me with some PHP script which requires the webserver lua. I have a problem which is probably obvious to the initiated but not me. I get plugboard error:
lua: /usr/share/lua/5.1/xap/init.lua:484: /etc/plugboard/xapCacheWebserverApplet.lua:120: attempt to index field 'xap-header' (a nil value) xAP Message being processed. xap-header { uid=FF00DB60 source=dbzoo.raspberrypi.Controller:relay.1 hop=1 class=xAPBSC.event v=12 } output.state { state=on displaytext=Relay 1 on } stack traceback: [C]: in function 'error' /usr/share/lua/5.1/xap/init.lua:484: in function 'dispatch' /usr/share/lua/5.1/xap/init.lua:91: in function 'fun' /usr/share/lua/5.1/pl/List.lua:392: in function 'foreach' /usr/share/lua/5.1/xap/init.lua:90: 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/plugboard/plugboard.lua:67: in main chunk [C]: ? Loading /etc/plugboard/xapCacheWebserverApplet.lua[ xAP Caching web servlet ] Running...Member for
15 years 7 monthsJohn change to the following
John
change to the following text in line 120 the applet
vfs.data[frame:getValue('xap-header','source')] = frame
Brett, can you update the sample in github?
thanks
Garry
Member for
14 years 6 monthsGarry thanks that sorted it
Garry thanks that sorted it and also makes my PHP script links to end points work.
Any idea why microcom -s 57600 -p /dev/ttyUSB0 shows incoming rf packets but XFX sees nothing except serial heartbeats. Is there another ini file I've missed?
John
Member for
15 years 7 monthsI assume you have your
I assume you have your jeenode applet setup? If so can you post a copy.
If you have serial heartbeats then xap serial must be running, I can only think its related to jeenodeApplet.lia
ill keep thinking.
Garry
Member for
16 years 10 monthsIndeed it will be the
Indeed it will be the jeenodeApplet.lua this is responsible for sending an xAP message to xap-serial asking it to open a serial port and relays input from it as xAP message. The argument below are the same as what xap-serial takes for configuration settings; port, baud, etc..: http://www.dbzoo.com/livebox/xap_serial#input_messages
local jeemon={
port="/dev/ttyUSB0",
...
function init()
monitor(jeemon, nodes)
Make sure you have a port definition in its configuration.
You may want to restart just the plugboard to send another configuration message to xap-serial .
$ sudo /etc/init.d/xap restart plugboard
if you have XfXViewer active at the time make sure you don't see any error packets being sent from xap-serial.
Member for
14 years 6 monthsPI Iserver
Hi
I have now got the PI fully functional with jeenode, inputs, outputs, RF etc all working. Problem now is iServer. All IPs are the same as my old Livebox but I now have no connectivity from the Joggler . Any one else made this transition?
edit:
Part of the issue seems to be the mapping to PI from Joggler ie:
http://x.x.x.x/live
I've tried changing to http://x.x.x.x/etc/www but no good.
EDIT:
I moved the config file from the livebox to the joggler and changed the mapping to /media/appshop/xAP
I then got an interface but endpoints were not updating.
John
Member for
16 years 10 monthsJohn,I'm confusing you are
John,
Erasing what I previously wrote.
I copied over the xapconfig.xml from my joggler to my Beaglebone, adjusted the IP inside the file to use the local iServer, and it just worked.
# scp joggler.local:/media/appshop/xAP/xapconfig.xml /etc/www/
The file in this location is served up by the virtual directory /live
So for me as my beaglebone is called power.local this URL accesses it -> http://power.local/live/xapconfig.xml
This works because /usr/share/flash/config.xml says this is where local configuration can be found.
# more /usr/share/flash/config.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<joggler>
<version>0.5</version>
<name>HAHflash</name>
<xAP>
<uid>0738</uid>
</xAP>
<usejogglerapi>false</usejogglerapi>
<configfilelocation>local</configfilelocation>
<configfile>/live/xapconfig.xml</configfile>
</joggler>
Be sure when you copy the file to your PI that you update the IP inside it to be the PI's IP.
<?xml version="1.0" encoding="windows-1252"?>
<joggler>
<version>0.5</version> <!-- version number -->
<config> <!-- config section -->
<iserver> <!-- iserver section -->
<port>9996</port> <!-- iserver port -->
<ip>192.168.1.8</ip> <!-- iserver ip address -->
</iserver>
Brett
Member for
14 years 6 monthsBrettMy setup is exactly as
Brett
My setup is exactly as per your instructions, however I have no connectivity to the virtual directory http://xx.xx.xx.xx/live.
It does not seem to exist. Could it have anything to do with me moving the GUI to port 88?
John
Member for
15 years 7 monthsJohn, I believe it's Klone
John,
I believe it's Klone that serves up the /live folder. As you have made changes to Klone to serve gui on port 88 I'm guessing that's the reason. I don't use a joggler /iserver so can't test but wondering if you can alter the port in he xap flash files somewhere?
Garry
Member for
14 years 6 monthsI'm just taking the easy
I'm just taking the easy option and moving xapconfig.xml to the joggler so that I don't have to map to a virtual folder.
John
Member for
16 years 5 monthsConnecting it Together
Hi Garry,
Do you have any pictures of how you've got it all connected together, Pi, HAH board and 12v supply?
Many thanks
Karl
Member for
15 years 7 monthsHi Karl, images attached. Pi
Hi Karl,
images attached. Pi connected via breakout adapted to HAH board. 12v via wall wart into a 3.5jack.
Custom see through protection covers made with Perspex
Garry
Member for
16 years 5 monthsThat looks great
That looks great Garry, thanks for going to the trouble of doing that.
It looks like you've wired the 12v to the JP1 connection, is that correct? the 12v nearest the RJ12 and the GND nearest the mounting hole.
Loving the perspex finish, very professional. Where did you get the coiled antenna?
Thanks again,
Karl
Member for
15 years 7 monthsCheers Karl.yeah 12v goes
Cheers Karl.
12v goes into same place as it did originally from the livebox, other side off the board near the LCD contrast adjuster. Another pic to try to show this, see the red wire hiding near the pot?GND shared with nearest available point.
maybe your way would be easier?
coiled antennae came from EBay
I have some spare coils and Perspex plates if you want then, just DM me.
Garry
Member for
16 years 5 monthsLike Yours
My 12v connects like your's, where the LCD connects, and on the new picture I can see it wrapped from underneath the board.
Great, now to DM you :)
Member for
16 years 5 monthsPower Connection
I think you could connect to the voltage regulator with an existing Livebox PSU ia long as you connect to the correct pin on the voltage regulator, see circuit attached or here for a bigger view : http://www.dbzoo.com/_media/livebox/pcb_rev1.jpg
Karl
Member for
15 years 7 monthsAgreed. This is probably the
Agreed. This is probably the safest option anyway. Wallwarts are not that accurate or stable.
Garry
Member for
16 years 5 monthsGot it Going
Thanks for you help Garry. I've now got this going, just a couple of things that weren't obvious to me and could maybe do with being added to the portable wiki page, happy to do that myself if given access.
I didn't realise I needed to get the 5v from the RJ11, I though the 15/12v supply was also reduced to 5v for the rest of the board.
I needed to edit the /etc/xap.d/xap-livebox.ini file to get the web interface working properly, setting enable=1, adding the correct serial port for the Raspberry Pi, port=/dev/ttyANA0 and uncommenting the initserial=+++ line. I appreciate that the port is probably different for the BeableBone, I don't have one so can't say what it should be.
Just posing this here to help anyone else.
Next to hook up currenct cost, jeenodes, etc :)