Raspberry Pi

32 replies [Last post]
brett
Offline
Providence, United States
Joined: 9 Jan 2010

Raspberry Pi has gone to manufacture.  This would make a COOL nextgen HAH platform.

Read about it http://www.raspberrypi.org/archives/509

Then considering signing this petition that discorages British Manufacturing for electronics.

http://epetitions.direct.gov.uk/petitions/27158

Brett

davidnewton
Offline
Shrivenham, United Kingdom
Joined: 23 Nov 2010
They indeed do sound COOL

You can still obtain a Beta version here ;-)

http://www.ebay.co.uk/itm/Raspberry-Pi-Model-B-beta-board-02-limited-series-10-/180786868461?pt=LH_DefaultDomain_3&hash=item2a17bcb0ed

Providing you don't mid spending a few thousand! - cant wait for production units to be made available.

Petition signed.

David

kevin
Offline
Huddersfield, United Kingdom
Joined: 17 May 2010
VM
davidnewton
Offline
Shrivenham, United Kingdom
Joined: 23 Nov 2010
anyone ordered

I'm waiting for expected delivery around mid may - well that was before they discovered the wrong network socket had been fitted.

davviss (not verified)
I'll definitely join your

I'll definitely join your "fan club" , I was waiting for this news for a long time. I got my first Raspberry from a local San Diego classifieds source and it was all I needed to become hooked. Now I am eagerly waiting for the next generation of mini-computers, I find them revolutionary.

kevin
Offline
Huddersfield, United Kingdom
Joined: 17 May 2010
Just been told mine has

Just been told mine has shipped - so if you got in there early they're on their way :-)

DoubleSpeed
Offline
Bristol, United Kingdom
Joined: 31 Mar 2012
I’ve literally only just got
I’ve literally only just got my HAH LiveBox and I am in no rush to change and I'm probably stating the obvious however as there is only a finite number of LiveBoxes out there and for the project to live and grow alternative hardware will be needed and the low cost Linux based Raspberry Pi seems the obvious solution???
brett
Offline
Providence, United States
Joined: 9 Jan 2010
Was thinking about the PI

Was thinking about the PI project and reflecting on some of the HAH decisions I made.

  • xAP Protocol (GOOD)
  • xap-livebox.ini (seems GOOD, but constricting see below)
  • kloned (GOOD - for its usage on livebox, would not reuse if had large memory/flash space)
  • turnkey flashable upgrades (GOOD) - YUM/RPM packages would be better with a larger distro available on the PI.
  • Lua (GOOD) - xap-plugboard is key to customizations.

What are we missing?

  • Pachube is fine for off site data feeding but local mysql database logging for all values would be nice. Careful not to reinvent the wheel here with yet another data logging, charting solution. Ie is integrating with Cacti for example better?
  • User plug-able web interface controls. Lua provides a scripting framework but provides no way to expose a user interface for command and control. Think about how the Squeezeplayer provide an Applet interface and a GUI like control language to build an X based GUI. Presenting values from HAHnodes on a UI would be a great feature.
  • Applet repository for publishing user supplied scripts, and having this searchable. Again squeezeplayer model
  • GUI - xAPFlash works for the Joggler but its screen size is HARDCODED for these dimensions so it's not surface aware.
  • XBMC - is already being ported to the PI - if its easy to surface objects into this perhaps this could be a nice gui, I mean you have video, music, etc.. + xAP. There many XBMC integration with various products, your get glam which is missing for the HAH.
  • RESTful services - aid integrations. CachingWebServerApplet.lua is small step in that direction.

xAP was a good choice. Need to overhaul the components to use the v13 specification.

Nomenclature should have been this - Can retro fit that to the livebox too.

  • <vendor>.<device>.<instance> - dbzoo.<hostname>.<instance>

I hardcode the hostname to be "livebox" I should pick up the livebox hostname and default this to "livebox" to remain compatible with this replacement naming.   This would remove a level of source addressing and make the system more flexible for multiple boxes and for porting the sofware onto another device.

A lot of effort has gone into producing the xAP framework and debugging the components, I see no reason to throw these away.

  • xap-hub, xap-serial, xap-twitter, xap-pachube, xap-currentcost, iServer, xap-sms and xaplib2 minor changes needed keep them.
  • xap-livebox - rework may not even fit into the new raspberry pi framework - possibly ditch.

Err on not putting ANY additional hardware on the raspberry PI, bar say USB pluggable devices. Here is my logic - xAP is a distributed protocol so use things like NetDuinos/JeeNodes for offloading, 1wire, URF, I2C, SPI etc.. Once the xAP message is on the wire its easy enough to just consume it from anywhere.

Once I had 1wire working on the JeeNode I found there was minimal need for 1wire directly tethered to the base livebox.

URF - this is a tricky one as the RF transmitter should be driven with 12v for maximum range. Consider building a standalone board simply for 433Mhz transmission. Arduino/JeeNode/NetDuino etc. A dedicated board would not be expensive to fab. Really just needs a cheap micro (like a 328 is overkill) the RF module itself and a little 12V reg. Add a cheap 433MHz magmount antenna and you have a workable unit.

Windows INI file format and single file - this seemed like a good idea but in hindsight with many programs accessing a single database I should have implemented locking and mutex to prevent collisions which result in random corruption of the xap-livebox.ini file.  Program to config file should be 1:1 Use something like UCI from Openwrt which has SHELL/C/LUA interfaces. This is something that should be ported onto the livebox HAH as well to get it into a better shape.

Kloned webserver. This was chosen on the livebox due to memory and flash space budgets. This decision of using C would not be the right one for the PI. Something like PHP, Python or Java (Lua maybe) would be better as there are more frameworks and libraries about. Cough Ruby even?

If anybody is thinking about the bigger picture here and has some thought I'd love to here them.

Brett

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
It's arrived

WOW its small.

 

just had delivered a model b small form factor twin usb hdmi, ethernet, audio out and composite.

 

in 20 minutes i had it hooked up and was browsing the internet.

 

now hows the hah integration going, i think priority one is RF 2,3 and 4 using the i/o to get relays and inputs working.

what do others think?

 

does anyone else have one?

kevin
Offline
Huddersfield, United Kingdom
Joined: 17 May 2010
xAPFlash..

Brett said : "GUI - xAPFlash works for the Joggler but its screen size is HARDCODED for these dimensions so it's not surface aware."

Yes - very true and also there's also the aspect that the Joggler doesn't implement the Flash stage in the normal way.  I could spend some time removing the hardcoded screen sizing but TBH Flash seems to be on it's way out - with latest 'Jelly Bean' Android not supporting it in Chrome.   The XML that configures xAPFlash is also badly structured as it just evolved rather than being well thought through.  Configuration isn't easy and there should be a graphical layout editor.   However whilst I've seen lots of recommendations for HTML5 / websockets I haven't seen much practically that really compares to Flash as it's used here .. and I'm not familiar enough to know how XBMC might serve the client / device base.

  I think looking at alternatives is a good plan but should you end up back at xAPFlash I'll take a look into this.

 

K

AlexS
Offline
United Kingdom
Joined: 5 Dec 2011
my 50p

Hi Brett 

Would like to see an opkg or similar, I think HaHub should go platform agnostic, there are plenty of NAS, plug computers etc that could easily run it. If we move to pure fat linux you have reduced the target market.

In that vein I agree seperating the electronics from the server makes sense. An Arduino shield with RF & relays may be a way to keep the core hardware without too much redesign. Communicate with XAP and usb serial. 

I believe making the web RF device screen into general devices so you can select either inbuilt (e.g. RF,Relay,LED,UDP), custom written plugins or LUA script based plugins. You can then roll these into source XML for xapflash.

So

device.1.type= RF, Tx.On=110FF00, Tx.Off=110FF01, RF=N/A, XAP_monitor=liveduino.RF.3,Page=Lounge,X=100,Y=200,image=Projector.state

device.2.type= Relay, TX.on=LUArelay On Latch, Tx.off=LUArelay 6 Off Latch, RX.on=Plugboard.Relay6.closed, XAP_Monitor=N/A Page=Lounge,X=100,Y=200,image=Aircon.state

you can then use the device settings to create a standard xapflash config.xml from the web interface. Makes it much more approachable, you configure the devices once and the fancy interface works.

If that is where you are going with the plugins I'm ll for it.

Agree local storage, maybe in eeml format? on a low resource DB.

Glam for the control (SWMBO) interface is important, for set up its not so necessary IMHO.

How about an interface to openremote? HAHhub does the clever stuff (bit like the Vera) , Openremote does the Bling? 

You can keep XAPflash in case Openremote goes the wrong way.

Maybe an iServer / openremote gateway?

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I had a brief, and I mean

I had a brief, and I mean very brief, look at openremote - the UI pretty nice for designing the controller panels.  No point in reinventing the wheel here especially as they have a plug in model for protocols.  I think contributing xapBSC as a protocol would get us 90% of the way and a generic xAP for the remaining 10% - as openremote is java based this shouldn't be to hard.  I know java use to have issues sending UDP broadcast datagrams but that been fixed since jdk 1.6 so we are good now.  Openremote has a UDPListener protocol not sure if these are broadcast or unicast packets, I suspect unicast, in anycase its would be a minor tweak to take this protcol plug in and hack it up to be an xAPBSC.event listener.  This would give 90% of all feedback events that would need monitoring.

Openremote is designed to run on hardware well in excess of the tiny router which the HAH uses but something like the Pi should be able to handle it without too much bother and would definately be an ideal candidate for porting to if it doesn't.

If nothing else adding a few protocols to openremote and getting it working would allow others to play and see what else it can do.  So for a small investment of my time we'd open up a new avenue for exploration and integration.  I'll start looking into this - in my (cough) free time.  4 weeks after moving countries I'm not really back up to speed with HAH stuff just yet - but I'll allocate what spare time I can afford.

I agree that packaging each component as a opkg/ipkg installable is the way forward and its certainly where I/we should head.  As you say there are a ton of NAS devices out there that are all capable of running a simple set of xAP services.  So why not open up for this market. 

Moving into that market involves decoupling the software from the hardware so its more independent and using some sort of plug-in web UI model for its setup and configuration.  The nice thing about XAP is that its already a distributed protocol that doesn't care about IP address which makes separating hardware/software rather easy.

The world will slowly moving away from flash buts its going to a very long time before it dies, so there is a lot of life left in xAPFlash yet.

Brett

AlexS
Offline
United Kingdom
Joined: 5 Dec 2011
more thoughts

Android may be another platform. Plenty of TV set top boxes being sold, soon they will have DVR so will be allways on.

XBMC is now ported in Alpha.

I think we need to see HAH hub as the engine and let other people provide the bodywork.

Have you seen this, looks lik a COSM competitor with cooler Graphs?

http://open.sen.se/

EJ-Ambient
Offline
Ringwood, United Kingdom
Joined: 5 Aug 2011
Well spotted - I've got 4

Well spotted - I've got 4 invites if anyone wants one...... the graphs look cool and they are in 'real-time'!!!

EJ

g8kmh
Offline
United Kingdom
Joined: 9 Jan 2013
xAP Hub

I thought I'd have a go at moving Brett's xap-hub to the ARM platform and it went without too much difficulty, other than static library linking, with a few extensions to base UID on IP address to allow multiple Pi's without needing config. I'm using it on openelec (xbmc) as I'm part way through creating a xAP plugin for xbmc and wrestling with Python(!). I'd previously used a hub based on an assortment of code but this one should be able to track any changes.

Attached is the binary for anyone interested, together with the startup script for openelec.

Regards,

Lehane

AttachmentSize
xaphub2.zip 16.58 KB
brett
Offline
Providence, United States
Joined: 9 Jan 2010
It should compile without any

It should compile without any problem - I run the xap-hub my joggler.

I've been thinking about doing a rasp-pi port of all this code - however I found my pi boots up fine but once X is running its beyond usable. I installed openelec and it can take up to 30sec for the damn pointer to move !?

I've been looking around for a distribution that boots up into text mode.   F*cking graphics since when did a linux distriubution default to a GUI interface?  And why is my PI so SLOW?  Could the class 4, 4Gb SD card really be the cause?  Do I really need a class 6 or higher - does it make THAT much difference?

Brett

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Arch Linux

Arch Linux boots to a cli and seems quite compact. Maybe that would do the trick

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Pi Speed

Rasbian boots to CLI by default in about 30 seconds.  The card class does make a difference, espically to XBMC.  There are also a few tuning things you can do to make it a little quicker.

I've also had mine reading the data received by the JeeNode basenode.   I think it would also connect easily enough to the HAH PCB using the serial connection, this is something else that's on my list, it's a long list.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I've downloaded and flashed

I've downloaded and flashed ARCHLINUX when I get a chance I'll boot this up and see how it goes.  I think the class of the SD card as Karl rightly points out does make a difference too.  I'll have to get something faster.

I wonder if the new UHC specification is supportted?  Those suckers are muy rapido.

Brett

aivo
Offline
Tallinn, Estonia
Joined: 2 Mar 2011
XBMC on Raspberry Pi

Hi, for Pi + XBMC + resources over I would also suggest looking at XBian.  Similar to openelec but more open.  Third in same line is raspbmc.

http://xbian.org/community/what-is-xbian/

Br,

Aivo

g8kmh
Offline
United Kingdom
Joined: 9 Jan 2013
PI speed

I've moved openelec to a 512Mb RAM version which is noticeably better (no surprise!) and using an Kingston 8Gb SDHC Class 10.

Lehane

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Have to agree with the above,

Have to agree with the above, 512MB version of the Pi really is an improvement

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Thanks for the updates - I do

Thanks for the updates - I do have a 256Mb version and Archlinux boots pretty quickly on this.  It must be that due to limit RAM and with a slow SD card swapping just kills the poor thing with I/O.

Brett

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Not sure it the same applies

Not sure it the same applies where you are based Brett, but i mananged to sell my 256mb version 2nd hand on ebay for the same price it cost me to order the 512 from cpc / rs the same day.

also i use a UHS spec SD card, i was worried a low class would impact performance

nygma
Offline
Joined: 25 Jan 2013
TL-WR702N

Would this be an option?

http://www.tp-link.com/en/products/details/?categoryid=241&model=TL-WR702N

I know these are available on ebay under £20. It has a USB port which idea to connect a UBS-Serial connector, hackers put OpenWRT on this for various projects.

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Old tin is good

The Rasp Pi et al are all fine. That nice TP Link box looks good too.

However, (in the UK) I can still buy a Livebox on eBay for around GBP10 delivered (as I type, one is closing with 9mins to go at £11 delivered and no bids). Don't forget that this includes a switched mode PSU and a case. 

The HAH firmware has been running on this platform for a fair while. It's generally stable - and where there are any issues, there are folks to help out. 

New ports are fine ... but in the fashion industry of HA, IMHO it's sometimes better to pick a nicely architected platform and to go from there.

Cheers,
Derek

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
Live box on auction site

I've bought a couple of those recently. Seems there are at least 2 a week on there. The last one I got actually cost more in postage alone than I paid for it.

magill
Offline
Joined: 27 Apr 2012
Raspberry

Anyone help please.

I have been following the PI install on the wiki, but I have very little linux knowledge and am at a loss. What does this mean?

pi@raspberrypi ~ $ sudo update-rc.d -f apache2 remove
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'mathkernel' missing LSB tags and overrides
pi@raspberrypi ~ $ sudo make arm-deb
make: *** No rule to make target `arm-deb'.  Stop.
pi@raspberrypi ~ $ sudo dpkg -i build/*.deb
dpkg: error processing build/*.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 build/*.deb
pi@raspberrypi ~ $ sudo INSTALL_DIR=/ make install
make: *** No rule to make target `install'.  Stop.

thanks

John

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
John,first error is cos

John,

first error is cos apache isn't a default install on Pi so you don't need to remove it.

second is probably cos your in wrong directory. Make sure your in the /portable. Directory where you checked out the code to.

other errors are cos .deb didn't build due to above!

 

at least I think this is the case!

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Wiki page on getting this running on a PI / beaglebone

There is a wiki page on getting this running on PI you may wish to visit

http://www.dbzoo.com/livebox/portable

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Had a go but it ended like

Had a go but it ended like this:

 

/target/klone-core-2.3.0/libu/include -c utils.c -o utils.o
gcc -pipe -I../include -I/home/pi/portable/userapps/hah/klone/klone-2.3.0/build/target/klone-core-2.3.0 -I/home/pi/portable/userapps/hah/klone/klone-2.3.0/build/target/klone-core-2.3.0/libu/include -c tcurl.c -o tcurl.o
In file included from tcurl.c:16:0:
../include/tcurl.h:13:23: fatal error: curl/curl.h: No such file or directory
compilation terminated.
make[5]: *** [tcurl.o] Error 1
make[5]: Leaving directory `/home/pi/portable/userapps/hah/klone/liblivebox'
make[4]: *** [/home/pi/portable/userapps/hah/klone/liblivebox] Error 2
make[4]: Leaving directory `/home/pi/portable/userapps/hah/klone/klone-2.3.0'
make[3]: *** [.real-subdirs] Error 2
make[3]: Leaving directory `/home/pi/portable/userapps/hah/klone/klone-2.3.0'
make[2]: *** [target-options-default] Error 1
make[2]: Leaving directory `/home/pi/portable/userapps/hah/klone/klone-2.3.0'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/pi/portable/userapps/hah/klone'
make: *** [install] Error 2

Now I'm stuck :-(

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Sounds like you have an issue

Sounds like you have an issue with curl install.

what happens if you try 

sudo apt-get install libcurl4-openssl-dev
I assume you did do this step 
sudo apt-get install build-essential libxml2-dev libcurl4-openssl-dev flex
From the wiki?
allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Hand up

Thanks Garry, I failed to follow that vital instruction in the wiki. All sorted, compiled and running.

 

Hardware Info