Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - uplink

Pages: 1 [2] 3 4 ... 13
16
So what you want is to create your device template, fill in the MAC address and let DHCP Plugin do its thing when the fruity gadgets request their IPs? Is that it?

17
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« 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.

18
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« 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 :)

19
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« 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).

20
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« 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 :)

21
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« 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 :)

22
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« on: March 27, 2013, 05:16:29 pm »
Inventory command is OK. RESTful /what/ever/path/to/object doesn't interfere with it, it can just provide reduced sets when needed, rather than transferring a full schema all the time (reload Orbiter? :P). Both can co-exist on top of the same data layer.

I don't like the JSON-RPC structures because you have to wrap the useful data with extra crud that stays fixed. Are you planning to set request.method to anything else but "message"? Because only request.params contains useful information, and that's pretty much what I've exemplified. Any reason not to pass just the contents of request.params around?

I assume that you have libs that do json_rpc_call($method, $params), that's why you say it's "standard". So is ad-hoc JSON then :) The params are that ad-hoc JSON anyway. The method can go in the URL. I'd say that would be a lot more readable and properly separated. But that's just me. Hell, you could tail the web server log and see what commands are coming in (without their parameters), just to make sure you're sending the right commands or that the commands get to the server - helpful if your server isn't sitting there idle just for you and you need to grep the tail.

So, what I'm suggesting would look like this with jQuery for the example you gave:

Code: [Select]
$.ajax({
  url: '/message',
  method: 'POST',
  data: {
    command: 'setlevel',
    uuid: uuid,
    level: level
  },
  onSuccess: function() { do_my_thing(); },
  onError: function() { moan_loudly(); }
});

RESTfully, it would look like this I guess:

Code: [Select]
$.ajax({
  url: '/' + uuid + '/setlevel',
  method: 'POST',
  data: {
    level: level
  },
  onSuccess: function() { do_my_thing(); },
  onError: function() { moan_loudly(); }
});

Now that I wrote the second one, it does look a tiny bit uglier, because I have to compose that URL :) Hmm... But neither is uglier than JSON-RPC so far.

23
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« on: March 27, 2013, 02:22:53 pm »
totallymaxed, please use jquery as JS library, i'm sick of all the other JS libraries ....

;-) ...

No argument here: jQuery is what will be used.

24
Developers / Re: Building Dynamic Orbiters with JSON/AJAX/HTML5
« on: March 26, 2013, 08:30:03 pm »
It appears I need to take a look at this Ago Control thing to see what it can do :) Bolting new features onto Pluto is getting a bit old.

Can it play media? If not, does it have the infrastructure in place? If not, I have a few ideas of my own - just not the time, or I'd jump right in.

The JSON-RPC interface can be designed in such a way that it's the same for both LinuxMCE and Ago Control. The way I see it, it should present high-level objects, and avoid providing access to the low level infrastructure as much as possible.

I'm still to invent what the data exchange protocol should look like, but I'm sure it has to NOT look like what's in the Ago Control wiki.


Here's a quick example I'm inventing as I'm writing it:

Request:
Code: [Select]
GET /lights/list

or:
Code: [Select]
GET /lights/list/+room/<id>

Reply:
Code: [Select]
{
  "lights": [
    {"id": "<id1>", "type": "<simple|dimming>", "power": "<on|off>", "level": "<0..100>"},
    {"id": "<id2>", "type": "<simple|dimming>", "power": "<on|off>", "level": "<0..100>"},
    {"id": "<id3>", "type": "<simple|dimming>", "power": "<on|off>", "level": "<0..100>"}
  ]
}

Request:
Code: [Select]
POST /lights/<id1>

{
  "power": <on|off>,
  "level": <0..100>
}

Reply:
Code: [Select]
HTTP/1.1 200 OK

Request:
Code: [Select]
GET /lights/<id1>

Reply:
Code: [Select]
{
  "power": "<on|off>",
  "level": "<0..100>"
}


That doesn't look like JSON-RPC. It's plain new RESTful. That's what I'd like to have. Essentially, the HTML5 Orbiter I have in mind won't be very different from a Web 2.0 web service.

As usual, I lack the time. While Andy made it sound like an HTML5 Orbiter is my main priority right now, that's not the case. I have some ideas, and I was hoping somebody else around here had enough knowledge to work on it, but I found out, after a few trials, that the person in question has a very steep mountain to climb first in terms of knowledge.

The concept is very promising. It just needs resources.

25
Users / Re: Dianemo S (12.04) GC100 serial port won't save
« on: February 11, 2013, 06:26:27 pm »
I never broke it as far as I remember.

26
Installation issues / Re: Dianemo S12.04 Raid 5
« on: December 17, 2012, 12:31:57 am »
Hmm... I wonder if this point is related:

Quote
4. In 10.04, at the moment, a manual fix before reboot seems necessary: sudo mdadm --detail --scan >> /etc/mdadm/mdadm.conf

Whoever wrote that forgot to say why that fix is needed.

27
Users / Re: Dianemo S: UpdateMedia Errors
« on: December 14, 2012, 07:19:10 am »
I'd say this: if it's not causing you any problems that you can feel, don't worry about it. It's the Pluto rule that says that "if it says FATAL ERROR, it's probably nothing" :)

28

Update ran just fine,  I look forward to the wiki updates, so I can have a try of the new telecoms features.


The new _old_ telecom functionality, as it was in 7.10. :) If there are wiki pages from that time period for telecom still in existence (LinuxMCE moved away from FreePBX and related, so they may have been updated to reflect that), they should be useful too.

29
Installation issues / Re: Dianemo S: MD - Package has been kept back
« on: October 22, 2012, 03:04:21 pm »
I've pushed an update that includes a change to Diskless Setup just in case there are other people out there in this situation.

30
Installation issues / Re: Dianemo S: MD - Package has been kept back
« on: October 22, 2012, 12:25:06 pm »
how do i update manually?

With a powered on MD:

ssh in
apt-get install dianemo-base-packages

Pages: 1 [2] 3 4 ... 13