Raspberry Pi 2
Hi
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.
thanks
John
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.
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 http://homeautomationhub.com/content/pvouput
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.....
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
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.
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
Thanks Garry, I'll have a go.
removing the word web from the line in that file worked a treat.
Thanks.
I added the capability to have an external kloned.conf file way back on release 305.
- http://homeautomationhub.com/content/webserver-port-change
- http://www.homeautomationhub.com/content/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
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
Dunno if it will work on your machine but you could try:
sudo ps aux | grep klone
to see if the kloned is running.
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.
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
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
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
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
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.
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
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
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
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
Attachment | Size |
---|---|
image.jpeg | 27.04 KB |
image.jpeg | 40.99 KB |
image.jpeg | 40.35 KB |
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
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
Attachment | Size |
---|---|
image.jpeg | 35.96 KB |
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 :)
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
Attachment | Size |
---|---|
HAH PSU Conection.PNG | 41.69 KB |
Agreed. This is probably the safest option anyway. Wallwarts are not that accurate or stable.
Garry
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 :)
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