Page 1 of 12 12345611 ... LastLast
Results 1 to 10 of 118

Thread: xAP on the Joggler

  1. #1
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    558

    Default xAP on the Joggler

    I have been playing with a touchscreen application that allows xAP (BSC) control from the O2 Joggler , currently amazing value as they're on offer until the end of May at £50 with free delivery .

    http://shop.o2.co.uk/joggler

    I don't know Flash at all so I'm still finding my feet here but I have got all the xAP bits working , connecting via the xAP router applications running on a Windows PC. The xAP router handles logon/security and access privileges for multiple concurrent clients as well as xAP message filtering to offload such needs from the Jogglers. The router is necessary to work within the Flash security policy model and Flash's UDP restrictions. The xAP control application launches from within the existing Joggler interface so minimal chnages required on the Joggler - just basically a way to upload an application onto it.

    One thing I must stress is that at the moment the Flash code is customised for my own system and I need to explore how I can make this more useful to everyone else. You could use the code and recompile it if you own Flash already (or something that compiles Flash CS4 / AS3 content) but obviously that's rather restrictive.

    Also I'm not intending spending huge amounts of time on the interface and graphics, I'm not graphically gifted and so everything takes me forever and still looks poor . What I hope to do is provide the code examples for xAP and a basic interface then each user can develop their own graphics and device interactions as they desire. Hopefully someone with Flash experience might pop up and contribute their help here.

    There's a few threads around in various target forums so I'm going to make an effort to pull them all into one place...here, as this seems as good a place as any. So below are a few links to existing threads and then I'll continue here as the main xAP Joggler thread.

    Cheers Kevin

    http://www.automatedhome.co.uk/vbull...ead.php?t=2755
    http://groups.yahoo.com/group/ukha_d/message/160075
    http://groups.yahoo.com/group/ukha_d/message/160004

  2. #2
    Automated Home Jr Member Simon300's Avatar
    Join Date
    Apr 2010
    Posts
    34

    Default

    Quote Originally Posted by Kevin View Post
    ...I have got all the xAP bits working , connecting via the xAP router applications running on a Windows PC. The xAP router handles logon/security and access privileges for multiple concurrent clients as well as xAP message filtering to offload such needs from the Jogglers. The router is necessary to work within the Flash security policy model and Flash's UDP restrictions. The xAP control application launches from within the existing Joggler interface so minimal chnages required on the Joggler - just basically a way to upload an application onto it.
    ...
    Hmmm, the xAP router applications running on a Windows PC would be a problem for me.

    I was planning to try Stephen Ford's Ubuntu NR image on my Joggler http://www.stephenford.org/joggler/ - this upgrade approach is straightforward and seems well received (and can be reverted to the stock firmware by removing the USB stick). With that you wouldn't need to write the xAP app in Flash - you could use whatever other Unix bobbins you liked (Perl, PHP, C etc).


    Simon
    PS. There's fervent activity (perhaps encouraged by the £50 promotions) on http://www.joggler.info/forum/ at the moment, including someone trying to wall mount theirs...

  3. #3
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    558

    Default

    Hi Simon,

    Unfortunately I know nothing about Linux and my plans are to integrate within the standard Joggler as much as possible. Linux would take me too far out of my comfort zone (VB or embedded C). Because Flash restricts UDP the router approach is mandatory. This probably isn't the solution for you.

    However I totally understand that enlisting a Windows application isn't to everyones taste. xAP is in no way Windows centric as it's simply UDP datagrams. Most xAP apps have been written on Windows only because that's the biggest user base. There are xAP libraries in C C++ C# Perl, Java, Python, VB etc etc. Several Linux based embedded xAP controllers have been released too. In fact I have a small embedded controller that also runs the xAP Server application so a Win PC isn't mandatory - just the free/easy way.

    How's about someone with good Linux skills developing a Home Automation application to run on the Joggler ? Using xAP would be a great way of allowing control of many different automation devices without lots of different specific device support. Some xAP conduits are implemented on a Windows PC though ... simply because....

    I should perhaps mention that James (mi4) has an Ajax web based front end for xAP called xAP Floorplan. Although so named it isn't tied to a floorplan layout and you could design a button type touchscreen layout and access this via a browser from Ubuntu Remix. There's also a great telephone call application called xAP Switchboard. However ... xAP Floorplan and xAP Switchboard both run on Windows still.

    http://www.mi4.biz/modules.php?name=...howpage&pid=37


    K
    Last edited by Kevin; 17th May 2010 at 05:46 PM.

  4. #4
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    558

    Default

    Hmm - ding ! I just had a thought that I could probably do away with the Windows app.... and exploring another channel re an Ubuntu app...

    K

  5. #5
    Automated Home Sr Member SiliconPixel's Avatar
    Join Date
    May 2007
    Posts
    52

    Default

    Well, count me in as before.

    second and third Jogglers due to arrive hopefully today

    Will test the latest Flash later today.

    Let me know when you want some more graphics help.

    Paul.

  6. #6
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    558

    Default

    I sent an update out to those trying the very early code last night (with a totally unrelated email subject line - sorry) . Let me know how you all get on.

    I have also updated the iServer beta (v 0.8.0.2) download page for anyone just using iServer. The Joggler update zip includes this later version , shown as 0.1.0.8 beta in info window.


    K

  7. #7
    Automated Home Jr Member Simon300's Avatar
    Join Date
    Apr 2010
    Posts
    34

    Default Joggler - initial observations

    Quote Originally Posted by Kevin View Post
    Hi Simon,
    ...
    How's about someone with good Linux skills developing a Home Automation application to run on the Joggler ? Using xAP would be a great way of allowing control of many different automation devices without lots of different specific device support. Some xAP conduits are implemented on a Windows PC though ... simply because....
    ...K
    Here are some initial observations:
    • They look pretty good - whilst not exactly in the Apple design league they are still pretty stylish and reasonably compact too.
    • Bending the bracket for wall mounting is not going to be easy though perhaps not such a priority (keep an eye on this: http://www.joggler.info/forum/viewtopic.php?f=34&t=501 though).
    • According to my (Maplin) power meter with the stock OS the Joggler runs at 9-10W (+/- 1W?) depending on brightness. It would be interesting to see what it is with the display backlight fully switched off.
    • The touch screen is reasonably responsive, though it's quite small of course, so the interface needs to allow for that.
    • The built-in speakers are pretty terrible (as you might expect given their size - why didn't they put in one larger one instead of two?) - even listening to Radio4 they were annoyingly tinny. Fine for alert sounds, though as a standalone radio you definitely need external speakers.

    Now, there are several ways to customise the device:
    1. Install apps from O2's appstore, i.e. the iPhone model (onboard)
    2. Access the device by telnet and install your own Flash apps (onboard)
    3. Use Pimp My Joggler, aka PMJ, scripts (http://www.joggler.info/forum/viewtopic.php?f=33&t=242) to add some apps produced by the community, e.g. Twitter (onboard)
    4. Install Stephen Ford (aka dysentry)'s Ubuntu 9.10 Netbook Edition image http://www.stephenford.org/joggler/(USB stick)
    5. Install Mike (aka disca)'s Ubuntu 9.10 Desktop http://www.fuzzylogic.co.uk/index.html (USB stick)
    6. Do a custom install of Ubuntu or another OS


    The good thing about booting from the USB stick is that you can easily remove it and revert to stock functionality - i.e. reducing the risk of breaking it. You can easily make backups, and it also it gives you up to 4GB (the Ubuntu images take about 2.5GB) as compared to the onboard 1GB memory. Using a USB stick does use up the only external USB connector though.

    As I posted earlier my initial thought was definitely to install Ubuntu NE and work from there. Having done that I'm now not convinced - here are my reasons:
    • The screen is too small for very fine work - you just want big, simple buttons. Even the UNE launcher panel is probably too detailed (especially at the top).
    • There's quite a lot of tuning work required even for UNE to work on an embedded device like this (i.e. with no proper disk drive).
    • An image for Ubuntu 10.04 LTS (long term support) hasn't yet been made for the Joggler - looking at some of the previous issues I suspect there may be some work to be done. Ideally we'd be on the LTS release and not have to touch the OS much.
    • A fuller Ubuntu installation may well put more load on the processor, increasing power consumption and heat output (and possibly reliability).


    What I can see is that there's already Linux on the Joggler, and so OpenPeak have already presumably put quite a lot of work into optimising it for the hardware. Therefore from an HA perspective I think we should be concentrating on building apps that add solid HA functionality and make best use of what is a very nice display - in other words, Kevin's approach using Flash!

    I don't know much about Flash and even less about xAP. I wonder though if it's possible to build on some of the previous work done on the xAP Perl libraries to write relatively simple scripts that could be called from Flash buttons? I suppose we need to come up with a list of common HA functions we'd be wanting to control and items to display and then work up from there.

    From my CH perspective my latest thinking have an opn-one which will then have a 1-wire network to take temperature readings and control boiler demand/zone valves. Hopefully the opn-one would manage all the logic/timing (and work standalone) but the Joggler would be used to change settings and display temps etc.


    Simon

  8. #8
    Moderator Kevin's Avatar
    Join Date
    Jan 2004
    Location
    West Yorkshire
    Posts
    558

    Default

    Hi Simon,

    Nice summary - one thing for sure at £50 the Jogglers are great.

    Flash has certain security restrictions imposed for IP communications and also the UDP implementation is not very good - which is why I have had to enlist the help of an intermediary router on a PC (iServer). This has an added benefit that the PC can do a lot of filtering of xAP traffic and only pass useful messages to the Joggler - but it's another step, another thing to fail and it requires a Win PC so all in all it's a pain.

    However what we might be able to do is port this router onto the Joggler itself, as an adapted hub. However OpenPeak are not very forthcoming with the needed info ..keychain etc.. presumably because they want Flash apps only. I'm not familar with Linux either so I'm hoping that someone more capable will take a look (underway) and then we're much better off. What I have done is modified the iServer such that it needs no configuration on the PC and then any derivative version on the Joggler itself would be just a case of running at startup.

    Whilst calling Perl scripts sounds interesting - I've no idea if that's do-able from Flash. Also MisterHouse is a xAP capable Linux application and most of that is Perl based - is that any use to you ? Is Perl installed on the Joggler , or does it install nicely ?

    K
    Last edited by Kevin; 20th May 2010 at 12:17 AM.

  9. #9
    Automated Home Jr Member Simon300's Avatar
    Join Date
    Apr 2010
    Posts
    34

    Default

    Quote Originally Posted by Kevin View Post
    ...
    Flash has certain security restrictions imposed for IP communications and also the UDP implementation is not very good - which is why I have had to enlist the help of an intermediary router on a PC (iServer). This has an added benefit that the PC can do a lot of filtering of xAP traffic and only pass useful messages to the Joggler - but it's another step, another thing to fail and it requires a Win PC so all in all it's a pain.

    However what we might be able to do is port this router onto the Joggler itself, as an adapted hub. However OpenPeak are not very forthcoming with the needed info ..keychain etc.. presumably because they want Flash apps only. I'm not familar with Linux either so I'm hoping that someone more capable will take a look (underway) and then we're much better off. What I have done is modified the iServer such that it needs no configuration on the PC and then any derivative version on the Joggler itself would be just a case of running at startup.

    Whilst calling Perl scripts sounds interesting - I've no idea if that's do-able from Flash. Also MisterHouse is a xAP capable Linux application and most of that is Perl based - is that any use to you ? Is Perl installed on the Joggler , or does it install nicely ?

    K
    Just a quick lunchtime post...
    Firstly, what is iServer? Crestron/HomeSeer/open source? (there are quite a few things called this)

    The OpenPeak stock firmware is running a kernel called 2.6.24-19-lpia and uses busybox so has a fairly limited command set. There's no Perl but I don't know how difficult that would be to install. xAP utility libraries written in C might be better - depending on what you can call from Flash. My assumption here is that you'll need something quite low level to convert the UDP xAP messages into something more useful.

    I think one early priority will be to work out the best way to back up the onboard 1GB to a stick and write a restore procedure - if nothing else you might want to set the joggler back to the default install. So far I've configured telnet, but even after that there I had a nervous moment when it crashed (don't know why - it's been fine since). I'll look into PMJ tonight to see if I can get more clues.

    Plus I need to get a better idea of our requirements so that we can work out the right architecture and what can be reused/ported. Does Kevin's screenshot show one app per HA device? My thinking is that you'd want a single flash app with config files to control what buttons or sensors are displayed.

    Simon

  10. #10
    Automated Home Sr Member Quinten's Avatar
    Join Date
    May 2004
    Posts
    85

    Default

    You can get perl on the standard joggler: http://ubu05.pgregg.com/joggler/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •