Author Topic: Building Dynamic Orbiters with JSON/AJAX/HTML5  (Read 36746 times)

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 192
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #15 on: March 28, 2013, 09:31:40 am »
yes, there are other methods besides "message". Regarding the inventory, that is only fetched at the first load. You'll get notifications for changes when you subscribe to them on ago control. When listening to the proper events you can keep it up to date without needing a "reload". With standard I mean this: http://www.jsonrpc.org/specification
Adhering to it allows clients from multiple languages to talk to the service without much hassle. You can e.g. batch requests and have a defined set of result codes. Anyway..

OK, I'll fold (for now?). The main purpose is to see where an HTML5 Orbiter can get us. If it's JSON-RPC that will be the information transport method, then so be it. :) I'll install Ago Control in a Virtualbox some time and have a play with it in the following days or so, then attempt to whip up a crude web interface for it.

Do you have any virtual devices I can configure? Or are they easy to make? I don't have any physical devices I can use with Ago Control right now, so a few fake ones (like, say, Upnp_Light) would be helpful :)

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #16 on: March 28, 2013, 09:56:03 am »
there is a simulator available, it will provide some fake devices. Ping me on IRC when you're going to have a look, I'll be more than happy to assist. Just be warned that the current resolver component was rewritten in c++ and still has some issues. There is a python one, too, which is quite stable already.
rock your home - http://www.agocontrol.com home automation

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 192
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #17 on: March 28, 2013, 10:05:13 am »
there is a simulator available, it will provide some fake devices. Ping me on IRC when you're going to have a look, I'll be more than happy to assist. Just be warned that the current resolver component was rewritten in c++ and still has some issues. There is a python one, too, which is quite stable already.
* uplink likes Python :)

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #18 on: March 28, 2013, 02:00:12 pm »
maybe we can join efforts with ago control and come up with an abstraction layer that hides the innards of DCE/ago control and talk the same JSON-RPC protocol. I've added JSON-RPC to ago control recently, this page describes the current protocol: http://wiki.agocontrol.com/index.php/RPC

It should be straightforward to add similar methods to the DCE RPC plugin. I'd volunteer to implement this.

I'm coming in late on the discussion on this but I think Uplink is warming to using JSON-RPC & seeing what we can do with ago ;-)

So joining efforts is exactly what we should do now we (or 'I' more likely!) understand your interested in much the same thing we are. If we can develop a common set of tools for Orbiter/UI building in LinuxMCE/Dianemo & ago that frees us all up from the current dependencies on PPL and also liberates us to build UI's that are not frozen in the past or reliant on the UI designer knowing anything more than some standard Web technologies like JSON/Javascript etc then that a big win.

What I'd like to see in this thread, in addition to the very important discussion about the Core/Backend technology, is some people step forward who have good Web based skill sets and have built projects around JSON/Javascript. In addition anyone who is willing to learn those skills and dig into building new Orbiter UI's using this stuff - lets hear from you too.

What we're discussing here will open up LinuxMCE/Dianemo/Argo development & allow a much broader group of people to participate in what we do here. And that can only be very positive development for the community.

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

polly

  • Administrator
  • Guru
  • *****
  • Posts: 209
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #19 on: March 28, 2013, 02:28:18 pm »
What I'd like to see in this thread, in addition to the very important discussion about the Core/Backend technology, is some people step forward who have good Web based skill sets and have built projects around JSON/Javascript. In addition anyone who is willing to learn those skills and dig into building new Orbiter UI's using this stuff - lets hear from you too.

*me steps forward*

im a web guy for quite a while now ....
@work i create webpages based on TYPO3, using jQuery and jQuerUI as Javascript Framework. Sometimes a bit server administration stuff ...  thats it.
Im not too bad @ designing stuff (i reckon) ... ;-)

Cheers,
ochorocho

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #20 on: March 28, 2013, 05:53:22 pm »
*me steps forward*

im a web guy for quite a while now ....
@work i create webpages based on TYPO3, using jQuery and jQuerUI as Javascript Framework. Sometimes a bit server administration stuff ...  thats it.
Im not too bad @ designing stuff (i reckon) ... ;-)

Cheers,
ochorocho

Great :-)

Keep an eye on this thread and join in the conversation if you can.

Welcome.

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

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #21 on: March 28, 2013, 06:21:20 pm »
I am replying, after a few days of mulling over an appropriate response.

Those of you who have been a part of this community, since the beginning, remember all the discussions that have been had, over and over again, over a next generation user interface, to replace Orbiter. We spent from 2007, until 2011, just _TALKING_ about it.

and _everybody_ had an opinion.

Lots of people just talked about it...over and over, with nothing getting done...

until...

golgoj4 finally sat down and _DID_ something. He has thus far built a functional orbiter engine, but it needs qml.

Yes, I understand what and why you guys are doing this, but by doing this, you're fragmenting developer resources even more than what we already have!

So basically, you're keeping this under wraps, until you're "ready" to show it off. Throwing it over the wall.

This didn't happen with qOrbiter. Langston put qOrbiter in the source repository from day one, and those of us who could, checked it out, built it, and tried to build things with it, and we did this from day one. golgoj4 built his basic skin, and I was building my skins for Harmattan, and more recently, for Android. And boy, did we discover all these little bugs, and things that needed to be refined. But only because the whole development process was open from the beginning.

So, fine. If you want to fragment developer resources, that's your perogative. But, trying to keep all this behind the wall, without any contribution from anyone else, is setting yourselves up for some nasty surprises when people start trying to build stuff with it.

-Thom

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 192
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #22 on: March 28, 2013, 07:56:02 pm »
Yes, I understand what and why you guys are doing this, but by doing this, you're fragmenting developer resources even more than what we already have!

You mean people that don't have the skills to help out in other areas will become scarce, so you'll have smaller numbers of people who can't code in other areas on interest? :)

So basically, you're keeping this under wraps, until you're "ready" to show it off. Throwing it over the wall.

What wall? We haven't even started any code yet. We're... err... talking about it :) We're having meetings about what we should discuss in our meetings :D

The plan is to start something, no matter how stupid, and hope people like polly take over once we have an idea about what we're getting into. Then we get a github repository or ninety (such is git :P).

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #23 on: March 28, 2013, 08:04:13 pm »
Well, totallymaxed initial statement hinted at: Dianemo will develop stuff inhouse, and once ready will open it for others, as opposed to what you are saying now... ;)

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 192
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #24 on: March 28, 2013, 08:25:01 pm »
Well, totallymaxed initial statement hinted at: Dianemo will develop stuff inhouse, and once ready will open it for others, as opposed to what you are saying now... ;)

totallymaxed is a bit overenthusiastic about it :) We don't have the manpower. All I can do is get this ball rolling and hope it snowballs.

We ran some very basic experiments, using dummy, ad-hoc data and structures. I was hoping another guy we know would be able to help out. He can't, on grounds of inexperience. This idea came about after I started working with HTML5 and jQuery for an unrelated project, then remembered the iOrbiter... which isn't that fancy, but it's acceptable in some environments. The idea was that I write some stupid UI using HTML5 and AJAX so there's a starting point, and then hand it over to whoever to continue it, 'cause I have a lot of other work to do :)

joerod

  • Guru
  • ****
  • Posts: 159
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #25 on: March 29, 2013, 09:40:00 pm »
I think it sounds very interesting.  I am a web developer and use various java frameworks, javascript (jquery), and often times use json to exhange data between different systems.  Ive been using linuxmce for about 4 years and have created some basic device templates in the past.  I have tried the UIDesigner in the past (but wasnt successful) and have a few devices that have had the web orbiter running.  I currently have 3 mds and a hybrid with ATSC tv, hd using vdpau, video cameras (both analog and IP), and two WEBDTs. 

I havent had a whole lot of free time lately because of work, but If you need a hand with something send me a PM.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #26 on: April 02, 2013, 04:25:24 pm »
Well, totallymaxed initial statement hinted at: Dianemo will develop stuff inhouse, and once ready will open it for others, as opposed to what you are saying now... ;)

Starting this thread was an attempt to see how many people in the community had the relevant Web based development skills and would be interested in getting their hands dirty and get involved. Obviously the thread has an expanded scope now...but that was my initial intention nothing more.

To help people understand what we were planning I explained our intentions so that everyone understood where this was coming from. Therefore initially I thought that we'd do the first steps internally here... do some basic stuff using Uplinks thinking on this (which has been going on for some time) and then open it up a little to people who had the Javascript/JSON/JQUERY skills to work on actual Orbiter UI's. At the same time if anyone wanted to dig into the Core end of the code they could do that too. I did explain that it would be sometime before we would be ready with anything to test against based on our own internal development resources... but of course with Ago we may get there faster than anticipated.

However things have moved on and it looks like Hari and his Ago project are going to be the basis of what we all build on to create a 'bridge' to LinuxMCE/Dianemo Core's. So we're not doing anything behind 'the curtain' at all everything is perfectly in the open. As Uplink has said here already I don't see any of this as fragmenting development resources as no one as far as I know that has voiced an interest so far has the skill or the inclination to get involved in qOrbiter. To be frank one of the major reasons we like the Ago/Javascript/JSON approach is that it opens up Orbiter development to a much broader audience and free's anyone designing an Orbiter UI from the limitations of both yesterdays Orbiters and HA Designer. In addition our approach here further simplifies the skill-set required to work on Orbiters in that you don't need to understand anything more than standard Web 2.0 style development.

We think this approach has a lot going for it.

All the best

Andrew

PS sorry for the typo in the original post where i confused the movie 'Argo' with Hari's Ago project... Freudian slip ;-). Typo now corrected!
« Last Edit: April 02, 2013, 05:54:09 pm by totallymaxed »
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

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #27 on: April 02, 2013, 05:36:56 pm »
* posde is sure hari does not like his project to be associated with argonauts...

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 192
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #28 on: April 02, 2013, 05:49:52 pm »
Well... so far I'm stuck with AgoControl, because setting a room for a device crashes AgoAdmin :D It crashes after it saves, so a restart of the services brings everything back, but it's quite annoying, so I'll wait for it to get fixed.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« Reply #29 on: April 02, 2013, 05:56:08 pm »
* posde is sure hari does not like his project to be associated with argonauts...

Ooops!...Argo is a movie :-)....Ago is Hari's project of course.

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