Author Topic: Testers wanted for Flash based Orbiter on the Chumby  (Read 13761 times)

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Testers wanted for Flash based Orbiter on the Chumby
« on: July 11, 2008, 01:37:13 am »
Hi all,

I have implemented a lightweight flash based orbiter for the intention of running it on the Chumby (see www.chumby.com and http://wiki.linuxmce.org/index.php/Chumby)

It is still pretty rough but I am keen to get some feedback so that it will be usable by others.
Please see http://wiki.linuxmce.org/index.php/ChumbyOrbiter for setup details.

The key thing to note here is that this uses the ProxyOrbiter to do all the real work so it is suggested that before you even attempt to use this one you get the web based orbiter working first.

Then make sure you have a config file with the correct filename and all the settings required.
Resolution should not matter in the orbiter settings as it will scale whatever it gets to 320x240 to suite the chumby anyway.

Error handling is not a strong point at the moment as I was learning actionscript as I developed this.

I will use this forum thread to take feedback on it and try to enhance over the next few weeks. I will try and make myself available on the IRC channel as well but this is likely to only be of an evening Australian eastern time (GMT+10).

Also note - this is just a flash movie so potentially should run on anything that has a flashplayer. I can work with people that want to use it on other platforms (phones, PDAs, embedded in browser etc). I have not tried any of these yet myself though. I will also post the current source onto the wiki when I get a chance.

regards
Darren

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #1 on: July 11, 2008, 01:09:52 pm »
I won't have time to check it out until this weekend (I was just going to test it in a web browser as I don't think I have any other devices to use flash).

But just a few thoughts...
Why scale it to 320*240 automatically? I think it would make more sense to use the orbiter settings to set resolution. That way,  as a "Flash MO" it will be more generic for many more devices. I understand that your interest is in the Chumbly, but by making it more generic and not device-specific, it will serve to open doors to possibly many more devices in the future.

Anyways, great work! I'm sure it is going to be useful to many people

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #2 on: July 11, 2008, 01:34:50 pm »
Hi all,

I have implemented a lightweight flash based orbiter for the intention of running it on the Chumby (see www.chumby.com and http://wiki.linuxmce.org/index.php/Chumby)

It is still pretty rough but I am keen to get some feedback so that it will be usable by others.
Please see http://wiki.linuxmce.org/index.php/ChumbyOrbiter for setup details.

The key thing to note here is that this uses the ProxyOrbiter to do all the real work so it is suggested that before you even attempt to use this one you get the web based orbiter working first.

Then make sure you have a config file with the correct filename and all the settings required.
Resolution should not matter in the orbiter settings as it will scale whatever it gets to 320x240 to suite the chumby anyway.

Error handling is not a strong point at the moment as I was learning actionscript as I developed this.

I will use this forum thread to take feedback on it and try to enhance over the next few weeks. I will try and make myself available on the IRC channel as well but this is likely to only be of an evening Australian eastern time (GMT+10).

Also note - this is just a flash movie so potentially should run on anything that has a flashplayer. I can work with people that want to use it on other platforms (phones, PDAs, embedded in browser etc). I have not tried any of these yet myself though. I will also post the current source onto the wiki when I get a chance.

regards
Darren


Hi Darren,

I'd be happy to do some testing on this for you... especially interested in how this might work on other Flash enabled devices.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #3 on: July 11, 2008, 02:29:40 pm »
Why scale it to 320*240 automatically? I think it would make more sense to use the orbiter settings to set resolution. That way,  as a "Flash MO" it will be more generic for many more devices. I understand that your interest is in the Chumbly, but by making it more generic and not device-specific, it will serve to open doors to possibly many more devices in the future.

I started out that way but there were two main reasons why I chose to scale it rather than change it for the orbiter device.
The first was that a 320x240 image from the orbiter looked worse when on the chumby. I think this may have been due to font rendering at that resolution. The flash scaling gave a better picture.
The second reason was that I am currently sharing the proxy orbiter device (with the web based orbiter) and I wanted to keep the web based orbiter at a higher res.

What I think that it should do is scale whatever it gets to the dimensions of the flash movie. Then it works in all scenarios. I just have not coded it to do that and will have to work it out - but I will put that on the list.

Appreciate you (and Andrew) having a look.

Darren

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #4 on: July 11, 2008, 02:34:37 pm »
Just a note for anyone that tries to run this using gnash. I just tried it and it is not doing the screen redraws properly on my machine. This was working earlier on when I tried it with gnash so not sure what has happened there. It is getting the events and sending to the server, just not doing the redraw at all.
This will be evident by pressing a screen position (and nothing happening) and then if you exit and restart it will display the result of your press.

This is a strange one as this does not occur on the chumby or using the flashplayer from eclipse....

justnulling

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #5 on: July 21, 2008, 10:57:26 pm »
Hi darrenmason,

Just tried your flash based orbiter and looks like there is a bug.
var imageUrlPage =
"include/image.php?imagepath=/var/www/pluto-admin/security_images/64_web.png";
changed it to use deviceID (54 in my case)
However it stilll will not work, this is what I get when I run it.

2008-07-21 16:48:59 BtPlayObject::Pump(cycle 0) got 2 responses, executed 0 deferred actions
2008-07-21 16:48:59 ClientObject::DoTimeCheck() elapsed time = 1216673362s now=1216673362 next check=1216674000
2008-07-21 16:48:59 si_object.cpp:assureTimeZoneOffset(): changed offset from 0 to 18446744073695151616, zone=EDT
2008-07-21 16:48:59 NetStreamRequest::Open(2): Opening protocol 'http://' host '192.168.80.1' port 80 location '/pluto-admin/
include/image.php?imagepath=/var/www/pluto-admin/security_images/54_web.png'
2008-07-21 16:48:59 NetStreamRequest::Open(2) opened http object id 1
2008-07-21 16:48:59 NetStreamRequest::ProcessHeaders(2) content-type: text/html
2008-07-21 16:48:59 NetStreamRequest::Step(2) done, closing stream (612 of 612 bytes, avail=0) status=200 (ok)
2008-07-21 16:48:59 SI_Object::SI_GetImageInfo(405415d4,1879089880,{40579e28,612})
2008-07-21 16:48:59 ImageObject::DetectImage() unable to determine type of image with 612 bytes starting 3c 48 54 4d
2008-07-21 16:48:59 ImageObject::DetectImage() unable to determine type of image with 612 bytes starting 3c 48 54 4d
2008-07-21 16:48:59 SI_Object::SI_GetImageInfo() - Image id 1879089880 type 0 (Unknown) not supported
2008-07-21 16:48:59 SI_NotifyError(0x405415d4): Error 6 (FI_BadImageDataError)
2008-07-21 16:48:59 ClientObject::ProcessSoftEvent(mmobj=0x405415d4) type=WidgetLoadStatus value=aserror comments=6
2008-07-21 16:48:59 FI_SendEvent(0x405415d4,3,...) sending event
2008-07-21 16:48:59 ClientObject::ProcessSoftEvent(WidgetLoadStatus,aserror,6) - failed to send event
2008-07-21 16:48:59 ClientObject::ProcessSoftEvents() - 1 events processed
2008-07-21 16:48:59 ClientObject::DoUpdate(id=1 master=Y): got FI_FrameBufferUpdatedWithError


not sure why it failed, I can wget 54_web.png from chumby however this is a jpeg file not png.

linuxmce@dcerouter:/var/www/pluto-admin/security_images$ file 54_web.png
54_web.png: JPEG image data, JFIF standard 1.01


Let me know if I am doing something wrong.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #6 on: July 22, 2008, 01:21:24 am »
Hi,

Sorry - that filename should be generated from the device number as you have realised.
But if you can retrieve it then that should not be the problem.

Please confirm that normal web orbiter works as expected.

I will try and get it to work with a different device number to see what problems arise and that might help me track down what is not working.

Regards
Darren

justnulling

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #7 on: July 22, 2008, 08:49:02 am »
But if you can retrieve it then that should not be the problem.
Well, the error I posted is after deviceID was corrected.

Please confirm that normal web orbiter works as expected.
Web orbiter works fine, that is where I got the config string as per your wiki.

Thanks.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #8 on: July 22, 2008, 10:02:49 am »
great job, looks very interresting, I'll buy one to try !
thks
http://www.domotiqa.com - home automation

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #9 on: July 22, 2008, 12:32:57 pm »
justnulling,

Tried a few things - stuggling with error handling as the retrieve is working, it is just not getting the image file.

The file is meant to be JPEG - no problem there. It is just the way the proxy orbiter names it. It think it uses png for higher resolutions or something.

The only thing that I can think at the moment is perhaps your conf file has a carriage return at the end (from being created in windows). I tried inserting one into mine and got a similar log to you. Try editing the conf file on the chumby and removing any new lines or carriage returns in the file and see if that helps.

I have fixed the code and uploaded a new version so that it calculates the URL with the device id rather than using 64 as well.

When I get some more time I will attempt some more debugging.

Regards
Darren

justnulling

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #10 on: July 22, 2008, 07:38:06 pm »
Darren,

The only thing that I can think at the moment is perhaps your conf file has a carriage return at the end (from being created in windows). I tried inserting one into mine and got a similar log to you. Try editing the conf file on the chumby and removing any new lines or carriage returns in the file and see if that helps.

It has no new lines/carriage returns, it was create on chumby.

Thanks

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #11 on: July 23, 2008, 06:27:21 am »
Ok, will need to look further. Unfortunately not home tonight so might be a couple of days.

When you enter http://192.168.80.1/pluto-admin/include/image.php?imagepath=/var/www/pluto-admin/security_images/54_web.png as the URL in a browser somewhere on your internal network what do you get?

You should just get the orbiter image, if your are getting something else then please post it here.

What IP Address did your chumby get? Is it 192.168.80.something?

I have not tried accessing from anything other the same subnet, the chumby would probably need a crossdomain.xml defined if it is doing that???

justnulling

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #12 on: July 23, 2008, 07:50:20 am »
Darren,

SOLVED.

After looking at apache log (should have done it sooner), I noticed that it was loading pluto-admin page.

192.168.80.119 - - [23/Jul/2008:01:20:37 -0400] "GET /pluto-admin/ HTTP/1.1" 200 612 "-" "Mozilla/5.0 (compatible; U; Chumby; Linux) Flash Lite 3.0.4"

After I appended '&' to the config file, it started to work.

192.168.80.119 - - [23/Jul/2008:01:33:28 -0400] "GET /pluto-admin/include/image.php?imagepath=/var/www/pluto-admin/security_images/54_web.png HTTP/1.1" 200 64265 "-" "Mozilla/5.0 (compatible; U; Chumby; Linux) Flash Lite 3.0.4"

This is my current config file:

userID=xx&pass=xxxxx&installationID=xxxx&deviceID=54&baseurl=http://192.168.80.1/pluto-admin/&

Any ideas as to why it needs '&' at the end?

Now I have this annoying  flicker, is there a way to buffer new image before rendering screen?

Anyways, thanks a lot Darren, this is really cool to be able to use Chumby as an orbiter.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #13 on: July 24, 2008, 02:08:48 am »
Great work!

Having to add the ampersand is a bit strange. It seems like it is not concatenating the server url with the rest without it... This looks like it must have some sort of break character at the end of the line. I know you said that there was no line-feed or carriage return. Is there a chance of anything else? Tab or something?

If you are using vi then use the list command ":l" to show up unprintable characters. Anyway - you have a solution.

The flickering - Is it the refresh which is about every 5 seconds? I must admit this is a lot more annoying than I thought it would be.
There are probably a few options here;
- have an option to turn refresh off and only do it explicitly from the refresh button. The side effect is that you would have to refresh to see any orbiter screens that have changed as a result of stuff elsewhere.
- Increase the time from 5 seconds to a large value. Reduced flicker effect and hits on server but has similar side effects to the first option in that messages and whatever might not come up for a while.
- Load the refreshed image into the timeline for the flash movie and only advance to it when image is fully loaded (or even when image is changed). This would be similar to how some webcam viewers seem to work on the chumby and looks conceivable.

The first two options are pretty straightforward and should be brought out into config options. The last option is obviously the best as it has not got side effects. I might look into this one. I am sure I saw some actionscript code on the chumby wiki that did something similar for webcams....

The next step for me is to get the chumby setup so that you can switch between normal chumby operation and the orbiter easily. Havn't really put any effort into this yet but I think there are soem people doing similar stuff which might be able to be leveraged.

Anyway, I will keep you updated.

Darren

justnulling

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Testers wanted for Flash based Orbiter on the Chumby
« Reply #14 on: July 24, 2008, 06:21:32 am »
If you are using vi then use the list command ":l" to show up unprintable characters. Anyway - you have a solution.

Nothing there. :l ends with '&$'

The flickering - Is it the refresh which is about every 5 seconds? I must admit this is a lot more annoying than I thought it would be.
There are probably a few options here;

I have changed background from white to '343c53' (one of the shades of the orbiter background image) a little less annoying. Putting new images into timeline is much better solution, I must agree  :)