Page 1 of 3

Development Status

Posted: Thu Mar 18, 2010 5:07 pm
by RDNZL
I'm very busy with my work and other non-domotica related stuff, so I thought to post an "what am I doing now message"...

I have written basic PLCBUS support, i'm testing it with an PLC1141 controller and plugin light and application switch.

I ordered an Integra(Onkyo) 2-Zone, 7.2 Channel Network Receiver to listen to my music collection and to build support for controlling it via serial/and or TCPIP protocol.

Bert also send me an RFXCom RFXmitter module so I can code support for that interface too.

Re: Development Status

Posted: Fri Mar 19, 2010 1:12 pm
by SRG
Thanks for the information !

On my side in the next week, i would like to work a bit the php web interface, in order to add a few things (for example, the possibility to see graphs for configured sensors through the web interface, probably through popups), and the possibility to activate x10 controls (probably through a new sheet). Indeed, i'm right now looking for buying a 8" mini PC that will run a browser, pointing to my web server, in order to pilot / consult a few domotiga things.

Otherwise (but i don't think i'll have the time for now for this other point), as i have a SONOS sound system (works great by the way), maybe i'll investigate a bit to plug it with domotiga (at least to start / stop music and deal volume for the various zones) (it's driven by UPNP, there is a PERL and JAVA implementation of the SONOS Client, and i've found another Gambas project that works with UPNP, so that should be possible for me to add a minimalistic support for SONOS in Domotiga) (the project in Gambas running UPNP is Bashare : http://code.google.com/p/bashare/, with a C part for the UPNP stuff).

Re: Development Status

Posted: Fri Mar 19, 2010 4:08 pm
by dali
SRG wrote:On my side in the next week, i would like to work a bit the php web interface, in order to add a few things (for example, the possibility to see graphs for configured sensors through the web interface, probably through popups), and the possibility to activate x10 controls (probably through a new sheet).
I've been talking to Ron about about enhancing the webgui. We came to the conclusion that it should probably be splitted up into a MVC (model-view-controller) style in order to keep it clean and foreseeable. The easiest way is to use framework like CodeIgniter (which I've started looking at).

Another solution would be to create a MVC framework especially for DomotiGa. This would be a much cleaner solution, but it would take a while to get the basics in place. Perhaps there's a PHP guru out there who would like to take a look at this? Here and here are some guides on creating MVC style php apps.

The third option would be to continue working on the webgui as it is coded today. It will soon be to complex to work on if several persons shall be involved in the development.

What do you guys think?

Re: Development Status

Posted: Fri Mar 19, 2010 8:28 pm
by SRG
I agree about MVC separation.
I wouldn't develop a specific MVC implementation for DomotiGa, rather use an existing one. I don't see what would be so specific about exchanging datas with DomotiGa (through XML-RPC) that a specific MVC framework would be valuable (you can make any "backoffice calls" in the Model view of any framework).

I would strongly suggest to have a close look at Yii Framework which sounds pretty interesting (i'm in the process of getting rid of zend framework (i have a few sites running with that one) and will probably switch to yii)

Yii framework (developed by the guy that made Prado before) :
- http://www.yiiframework.com/

Yii comparisons with other frameworks :
- http://daniel.carrera.bz/2009/01/compar ... ks-part-i/
- http://www.beyondcoding.com/2009/03/02/ ... deigniter/

Re: Development Status

Posted: Fri Mar 19, 2010 11:32 pm
by dali
Yii is a very good framework for making database intense apps like blogs, but I think CodeIgniter is better for an app like DomotiGa, especially since CI has an XML-RPC module which makes coding very easy.

I really think CI is the way to go if a framework is to be used. I also think we should use jQuery for Ajax stuff.

Re: Development Status

Posted: Sun Mar 21, 2010 12:54 pm
by wwolkers
I'm not familiar with any of the frameworks, but from what I've read so far, I'd go for yii, since it's lightweight and fast.
We would have to make an xml-rpc implementation for yii then, or use SOAP, which is included.
Writing a complete new framework from scratch sounds like too much work imo.

Would be nice to get started on a better web interface soon :)

Re: Development Status

Posted: Sun Mar 21, 2010 1:36 pm
by SRG
About the web interface the main question to resolve is in the first place : what will be the usage of such an interface ?

Because we can either have :
- a web interface in the "mood" of the current one (which i find cool by the way with the list of the devices, but lacks of course a lot of features), that means, some kind of a "rich interface" accessible through web ;
- a web interface with "big and shiny buttons" (especially big) that would be used as a home remote : turn lights on and off, show graphs with a simple click leading to graph shown in full screen, easy and quick access to a lot of functionnalities like weather, tv guide, home map with t°, and so on ;

Both are intersting but on my side i'm more in need of the second one (to run on a small 10" or a bit more touch screen).

Otherwise i fully agree with wwolkers.

So what do we start / who starts what / how / with which tools (CI ? Yii ? JQuery ? ...) and so on.

Re: Development Status

Posted: Sun Mar 21, 2010 2:11 pm
by wwolkers
For me:
- should be able to do everything web based, since there's no monitor on my homeserver
- easy to understand (wife factor)
- nice looking (wife factor again)
- usable from 'normal' PC, and small (touch)screens for remote
- ajax based, don't reload complete page etc

But since it's all XML-RPC, we can build multiple frontends if we want. Would be nice to be working on one interface though.
I agree that the current interface is good looking, perhaps go with that, and try to keep it as much the same as the 'normal' interface.

Re: Development Status

Posted: Sun Mar 21, 2010 4:04 pm
by dali
Using a framework will make it easy to make the webgui themeable, which means you can have one theme with all the functions that exist in the native gui, and another theme with big shiny buttons (for the wife).

I've looked into the features of almost all existing frameworks, and I do believe that CI is the best to use for DomotiGa. Yii is a little bit faster (which won't make a difference with the simple functions that's going to be used in this app), but lacks in functionality.

Making a MVC "framework" from scratch for DomotiGa really isn't such a big job (we don't need all the fancy stuff that exists in CI, Yii, Cake, etc), but I don't think it's what we should start with.

I would really like to hear RDNZL's opinion.

Re: Development Status

Posted: Wed Mar 24, 2010 10:33 pm
by wwolkers
I've been messing around with this a bit.

the library included in CI does XML-RPC allright, but not the JSON encoded version Domotiga is using.
So I hacked it a bit, and I now have a working library for CI to be able to talk to Domotiga :)
Time to cut&paste some HTML code, see how far I can get.

Re: Development Status

Posted: Wed Mar 24, 2010 10:48 pm
by dali
wwolkers wrote:I've been messing around with this a bit.

the library included in CI does XML-RPC allright, but not the JSON encoded version Domotiga is using.
So I hacked it a bit, and I now have a working library for CI to be able to talk to Domotiga :)
Time to cut&paste some HTML code, see how far I can get.
Are you using the latest version of Gambas (2.20)? A bug which caused Gambas to add extra whitespaces was fixed.
CI works out of the box with Gambas 2.20.

Maybe we should start talking on MSN (or gtalk/icq) so that we can cooperate instead of doing all the work twice.

Re: Development Status

Posted: Wed Mar 24, 2010 11:54 pm
by wwolkers
bah, running the domotiga live CD, which is running gambas 2.18 :(
there's no newer version for ubuntu, looks like I'll have to make my own ubuntu up-to-date package then ;)

Re: Development Status

Posted: Thu Mar 25, 2010 9:31 am
by RDNZL
@wwolkers
If you have installed the live CD and need a newer Gamba,s you can follow the steps "Installing Gambas" from the website to compile it from svn, maybe you need to install the prerequisites listed there too.

I was planning on building a new DomotiGa live cd with Gambas 2.20.2, but I think I'll wait until Lucid Lynx is released.

Re: Development Status

Posted: Thu Mar 25, 2010 9:38 am
by RDNZL
If you guys are missing XMLRPC methods you need, please post, I will code them.

Maybe we should plan a DomotiGa coder IRC session sometimes :D

Re: Development Status

Posted: Thu Mar 25, 2010 2:25 pm
by wwolkers
RDNZL,

do you think CI is the correct framework? not much use in us spending lots of time if you have other ideas :)

I'm already working on a new install for my domotiga setup, with the latest gambas on it.