FREE web-browser control of your C-Bus network

Discussion in 'C-Bus Toolkit and C-Gate Software' started by greig, Mar 27, 2011.

  1. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Marty,


    Ooh - goody! 2 networks. I've not tested with 2 networks. I'll mail you privately after a screen-shot of that.

    I trust you've since found the reference in the doco to adding the network name to "C-GateConfig.txt" against project.default and project.start to save the need to run Toolkit? The bonus of adding these is that Toolkit will open faster as well.

    G.
     
    greig, Jun 9, 2011
    #41
  2. greig

    martymonster

    Joined:
    Aug 5, 2004
    Messages:
    162
    Likes Received:
    1
    Info sent :)


    DO you need to add the .XML after the project names?

    Marty
     
    Last edited by a moderator: Jun 9, 2011
    martymonster, Jun 9, 2011
    #42
  3. greig

    John Harnett

    Joined:
    Aug 4, 2004
    Messages:
    30
    Likes Received:
    0
    Location:
    Melbourne
    Hi Greig,

    Yep toggling the buffer stops it (I usually have buffering off to help with testing).

    Interestingly the table view is repeating my network(s) 4 times, I'm wondering if this is an artifact of having a second network (wireless). The XML file may be a little confused so I'll check that too, but I suspect that won't be it as I feed that to the TCL apps to work with and that issue hasn't shown up.

    John
     
    John Harnett, Jun 10, 2011
    #43
  4. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    I've just loaded a new version of C-ChangePHP to my blog site.

    With thanks to MartyMonster for his help - this version fixes some woeful array handling and XML decoding to now correctly support multiple networks.

    I've also added the Network number to the table view in both pages, but it's easily suppressed if you don't want it there.

    - G.
     
    greig, Jun 21, 2011
    #44
  5. greig

    mich

    Joined:
    May 13, 2011
    Messages:
    14
    Likes Received:
    0
    Location:
    Sydney
    Hi Greig,

    Just thought i'd post back on where i'm up to with this. I finally got a bit of time yesterday to do some more work on it and am very close to releasing something that allows you to control lighting (as a start) using ajax slider bars much like the wiser app but via a ajax enabled browser.

    After alot of fiddling around and thinking about what I would want this to do in the long term instead of using any of the c-change code I only ended up using the concepts in so far as connecting to the c-gate - ie. without c-change I wouldnt have known where to start, but with it as a working base I got things going really quickly. to keep it separate though and not interfere with what you (greig) already have working i'll release it under the name 'crave control' in line with my business name crave technology.

    Basically, what I have developed is split into several components and works rougly like so;

    * first there is a php page that generates xml output with a list of widgets and their paramaters such as what actions to fire when used. these widgets can be on/off buttons or ajax slider bars etc. the widgets generated can be automatically generated from the tags file (mostly just for testing) but ideally would be from a database.

    *then there is a php page that uses this widgets xml to generate a screen with the widgets, in its simplest form in a table view, but can be easily skinned to whatever you like.

    * then the page above grabs the current values of everything (via another xml php page) and updates the screen/sliders etc. using ajax then recursively waits for a change event before updating the screen again so its always up to date.

    * in reverse when a javascript widget (slider etc.) on the screen is changed, it issues an action via g-gate.

    i've had lots of issues getting this to work right like getting the ajax that polls c-gate waiting for a change to timeout/abort at the right intervals to keep performance high and am very close to releasing something for people to try except when i tested it on the iphone last night with multiple jquery sliders on the screen i found the sliders got muddled up whereby multiple sliders were moving at once when they shouldnt have been etc. today i've been experimenting with yui sliders instead and its been looking very promising. not sure when i'll get more time to work on it though.

    2 questions;

    1) greig what are you using to run c-change - i'm guessing its not an ipad - is that right? i hope you'll be one of the first in line to try what i've developed.

    2) is there anyone who is fairly tech savvy having run apache etc. before with an ipad or two and a c-bus network who would want to sign up to help me test this. if so, please PM me.

    also its worth mentioning, i was sort of in a dilemma for a bit working out whether I should release this as open-source or not, but in the end decided i'd develop a really good open source app with the help of others then i can always have a paid custom/premium version if it gets to a point where i think its worth it - i'm pretty sure that will be a long way off.

    i do hope in the long term though this could be the killer home automation app as i'm intending to also have the interface also integrated with sonos and other such home automation systems.

    Cheers;
    Michael.
     
    mich, Jun 24, 2011
    #45
  6. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Michael - that's fantastic news!!

    The only devices I'm using are the iPhone and the touch-screen PC in the kitchen - so slider control on the latter will be awesome!

    ... but I can invite an iPad-enabled friend over for dinner and testing without too many complaints.

    Keep me posted. :)


    G.
     
    greig, Jun 25, 2011
    #46
  7. greig

    mich

    Joined:
    May 13, 2011
    Messages:
    14
    Likes Received:
    0
    Location:
    Sydney
    Hi,

    I had a late night and mostly frustrating but still successful day, and here it is, beta-release-1 or crave-control.

    http://www.cravetechnology.com.au/control/

    This is free for anyone to download and try but please let me know if you are trying it so I can get a feel for how many people are. Anyone trying to use this should only need to install the files in a directory on localhost, make sure c-gate is open, then run table.php

    The only real gotcha i can think of is that I use short open tags in php so make sure you have that set to on in your php.ini file.

    No documentation as yet except for inline documentation but there is a reasonable amount of that. Ofcourse you can write back here for help.

    I also dont have an ipad yet and will be mostly testing with an iphone so the screen layout is mostly optimised for that.

    I'll post more later when I have time - and will probably at that time start a new thread so as to not hijack Greig's.

    :D

    [​IMG]
     

    Attached Files:

    mich, Jun 25, 2011
    #47
  8. greig

    mich

    Joined:
    May 13, 2011
    Messages:
    14
    Likes Received:
    0
    Location:
    Sydney
    ps: you will still need to input your tags file location and the name of your project in the config file very much like c-change.

    and further, just so you know, this is what I consider to be an extremely bare-bones mock up of what I am hoping to get working in the fullness of time, so dont be too dissapointed about how ugly it is - its just a proof or concept really.

    cheers.
     
    Last edited by a moderator: Jun 25, 2011
    mich, Jun 25, 2011
    #48
  9. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Mich,


    It looks great!!

    And yes, get your own bl**dy thread!! :p
     
    greig, Jun 26, 2011
    #49
  10. greig

    georgee_uk

    Joined:
    Dec 24, 2008
    Messages:
    9
    Likes Received:
    0
    Great Work

    Hello


    Just posting to say that I have been using your app for a few minutes and it gives me exactly what I need ( for the moment :)

    I have this running on a readynas NAS so it is always on and accessible.

    Thanks very very much this saves me months if not year of fustrataion.

    I already have a PAC and CNI so I didn't want to shell out for a wiser(whihc wasn't released at the time of purchase)

    Oh an thanks to Ingo for pointing me in the right direction.
     
    georgee_uk, Feb 6, 2012
    #50
  11. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Glad it's working for you!

    The code's currently undergoing a major HTML5 revamp, with significant improvements to the way the page renders on tablet devices and iPhones. It's still perhaps a week or two off being released, and I'll post details of that here when it's available.

    Separate to that I've also been playing with the "SiriProxy" app that lets you hijack the iPhone 5's Siri, and currently have rudimentary voice control of C-Bus (using C-ChangePHP as the interface to the bus).

    I'm hoping to release a 'proper' C-Bus plugin for SiriProxy - but it's perhaps in the Easter timeframe... Stay tuned. :)


    - Greig.

    P.S. Thanks Ingo!!
     
    greig, Feb 13, 2012
    #51
  12. greig

    alexdski

    Joined:
    May 17, 2011
    Messages:
    17
    Likes Received:
    2
    Location:
    UK
    I guess this is on topic...

    Can a RS-232 port on the PAC be used for as a PC interface whilst the Logic still runs on the PAC. So we can use c-gate/pc and the logic in the PAC at the same time?
     
    alexdski, Mar 1, 2012
    #52
  13. greig

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    No, the RS-232 ports on the PAC are only used by the Logic Engine. They have no ability to function as a PC Interface and they have no connection to C-Bus.
     
    Newman, Mar 2, 2012
    #53
  14. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Now HTML5-compatible

    Hi All,


    I've just released an updated version of my C-ChangePHP web interface for C-Bus.

    Details and download are here.

    Please let me know if you encounter any problems with it!!

    [​IMG]
     
    greig, May 13, 2012
    #54
  15. greig

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,315
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hello Greig
    This is the first time I have had a go at using your program.
    It's looking really good and the documentation you have done is great.
    I seem to have WAMP online and connected to CGATE but I get an error when I try to operate a group.
    Could you have a quick look at the screenshots and see if it's obvious what I am doing wrong.
    Thanks
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      133.3 KB
      Views:
      604
    • 3.jpg
      3.jpg
      File size:
      189.2 KB
      Views:
      585
    DarylMc, May 13, 2012
    #55
  16. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hi Daryl,


    Wow! I wasn't expecting someone to break this so quickly!!

    The table has clearly found and read your tags file OK, and the presence of some values would suggest it's reading from the bus as well.

    I've written a note in c-bus_common.php that this error means we queried a bad (spare) application. Perhaps there's one in your tags file that has no groups?

    There are a couple of places we can enable some raw logging of the comms to the bus. (I'm guessing this needs to go in the next update of the doco!!)

    In c-bus_common.php, un-comment line 176 (at the end of function read_bus), as per below:
    echo ("Transmit = " . $transmit);


    This will reveal the query we're sending to the bus. Here at home I'm sending "Transmit = get //19P/254/56/* level,"

    Next, add the following to the start of function parse_response (around line 290 - just before "if (strpos($received, "401 Bad object or device ID"))":

    echo ("We received = " . $received);

    That will dump the raw data coming in. If the solution's not immediately apparent, shoot the info to me in a private message and I'll get back to you tomorrow with some thoughts.

    Thanks for trying C-Change and sending the screen-captures.

    G.
     
    greig, May 13, 2012
    #56
  17. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Bug resolved: I had some "short tags" in my PHP

    Hi All,


    Daryl's kindly helped me nail the bug in the May 13th ZIP: I had some "short tags" in my PHP, and my PHP.INI set to permit them (which I hadn't described in the doco).

    This has since been corrected in the May 15th ZIP that's back on my website.

    Thanks Daryl for your patience and help!!


    G.
     
    greig, May 15, 2012
    #57
  18. greig

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,315
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi Greig
    It's working fine now.
    Very easy to install thanks to your documentation.
     
    DarylMc, May 15, 2012
    #58
  19. greig

    bsilic

    Joined:
    Mar 5, 2012
    Messages:
    1
    Likes Received:
    0
    Location:
    Sydney
    Invalid argument supplied for foreach()

    Hi Greig,
    The little app is really great.
    Cannot wait to get it up and running so that I can play around with a few graphics to customize it for my home.

    I do have a small problem. Well I hope its small.
    The Webserver is up and running and the website some up.
    If I use the picture view, I can use three of the room to switch 3 channels on/off on my system.
    However if I go to the table view, I get an error:
    Warning: Invalid argument supplied for foreach() in C:\wamp\www\index.php on line 353

    I only have one network 254, and only have light control.

    Any help would be appreciated.

    Thank you for writing such a useful app.

    Barry
     
    bsilic, Jun 5, 2012
    #59
  20. greig

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,315
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi Greig
    Since installing CGate as a service with the new version of Toolkit can you tell me how to make my network connect by default.
    Or anyone else of course.
    Thanks
     
    DarylMc, Jun 7, 2012
    #60
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.