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

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    Thanks for sharing this... can I just ask why do you need to connect cgate to the CNI to control the cbus network? according to the 5500cn manual http://www.clipsal.com.au/trade/__data/page/81/W0000348.pdf you can connect to the CNI directly and issue commands via web browser?

    How does cgate connection to the CNI? What ports are open on the CNI? Can you use your software to connect to the CNI directly?
     
    paulevans, Jun 2, 2011
    #21
  2. greig

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    290
    Likes Received:
    1
    Location:
    South Africa
    Basically the CNI allows only one connection. CGate is for multi-user access and has access-control features.

    Ingo
     
    Ingo, Jun 2, 2011
    #22
  3. greig

    Spooky

    Joined:
    Aug 28, 2006
    Messages:
    15
    Likes Received:
    1
    CNI vs C-Gate

    As well as the CNI only allowing one connection, C-Gate can be configured to automatically sync to a network building a model of the current network state. This model gets updated every time it sees a message and also continuously check in the background for and discrepancies. When a client application requests a state from C-Gate it doesn?t necessarily send anything onto the network it will just use the status from the model it has built.

    This means that you can have multiple applications connecting to C-Gate requesting status and sending commands without actually flooding the C-Bus network with excessive messages.

    Also the languge used to talk to cgate is a lot easier to work with. :)
     
    Spooky, Jun 3, 2011
    #23
  4. greig

    DoctorZoidberg

    Joined:
    Aug 8, 2010
    Messages:
    12
    Likes Received:
    0
    Location:
    The Year 3000
    This is all great in a large building (multi story) but for residential having a pc on 24/7 is not what most customers want.
     
    DoctorZoidberg, Jun 3, 2011
    #24
  5. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Hey Dr, C-ChangePHP isn't going to be for everyone.

    You don't need a dedicated PC for this though.

    If you only have one PC in your home, you can run C-Gate as a service in the background, and have WAMP doing likewise.

    When-ever that PC is on, you have browser access to your C-Bus - and even from wireless devices if you have a WiFi access point.

    Alternatively, I've seen references to running C-Gate under Linux, so you could build a flea-powered box to host both, but at the end of the day, it's going to be running permanently, as frankly, all these C-Bus devices on your network are anyway...

    G.
     
    greig, Jun 3, 2011
    #25
  6. greig

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    Sorry... if this is a simplistic question, but if you are only allowed to connect one device to the CNI at a time, and you have to go through cgate to control it. There really is no difference get a CNI and other PC connections (serial or USB). Since only 1 device can be connected at a time and the cgate has to be on all the time? What is the advantage of a CNI over the other PC connectors?
     
    Last edited by a moderator: Jun 3, 2011
    paulevans, Jun 3, 2011
    #26
  7. greig

    greig

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


    Others will hopefully correct me if I'm wrong, but the difference between those 3 products is really just the way they connect your PC to the 'Bus: Ethernet, Serial or USB. In the end they all do the same thing.

    I like the flexibility of Ethernet and the CNI, but if it's cheaper and easier there's no reason why you wouldn't/shouldn't use the serial or USB devices.

    G.
     
    greig, Jun 3, 2011
    #27
  8. greig

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    kewl... thanks for that info... so what you have written here is basically a cheapmans PAC unit? But probably with more possible functionalities?

    Is it possible with this to say intercept a switch button, and output to the light through a dimmer based on time of day or any other variable?
     
    paulevans, Jun 3, 2011
    #28
  9. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Paul: buy a PAC. You'll never look back!

    I raced out and bought one as soon as I knew they existed, and my first function responded to a particular trigger & only turned the light on if it was dark. (I had previously resorted to a relay unit coupled back to an AUX input to give me the mix of AND and OR that i needed).

    In contrast, C-ChangePHP relies on the user triggering the reads and sequences via the browser, so as it's not reading the bus in real-time it's not quite the poor-man's PAC.

    These days it probably wouldn't be all that hard to build your own PAC-equivalent actually - I'm sure you could do it easily enough with an Arduino if you were feeling keen!

    G.
     
    greig, Jun 5, 2011
    #29
  10. greig

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    Thanks Grieg, PAC is for more detailed programming ability with cbus allowing you to add logic to triggers. Wherehas this software is designed more for allowing different ways to interact with cbus (ie browser, own written programs etc). You can try and use it as a cheap man's PAC but it wont be "real time", correct?
     
    Last edited by a moderator: Jun 5, 2011
    paulevans, Jun 5, 2011
    #30
  11. greig

    greig

    Joined:
    Aug 3, 2004
    Messages:
    72
    Likes Received:
    3
    Location:
    Petersham - Sydney
    Bingo. As I wrote it, it's static, getting no real-time feed from the Bus - although others here (Mich) have already enhanced it to embed more real-time info - but it's still user-driven, just that the Group statuses are updating in real time.

    Seriously, buy a PAC. Yes, it's an expensive add-on (aren't they all?) but it's REAL value for money.

    Mine takes all sorts of inputs (burglar alarm armed status, time of day, day of week, etc), and only runs the bathroom floor, the towel rail, and other user conveniences at the most suitable time on the appropriate day, and then only when we're here.

    Put it this way - I've been running C-ChangePHP here at home for over 12 months, and there's no way it's going to replace my PAC. Best add-on ever.



    Greig.
     
    greig, Jun 5, 2011
    #31
  12. greig

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    if you get PAC, does it also do all the things that PC connection unit does (USB, Serial, CNI)? So can it be used to initialise new cbus devices?
     
    Last edited by a moderator: Jun 5, 2011
    paulevans, Jun 5, 2011
    #32
  13. greig

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The PAC has a USB connection on the front. This is used to program the PAC unit itself. Via the USB connection a PAC can also be used as a USB PC Interface. In this mode the PAC stops running it's internal logic to enable Toolkit to talk to the C-Bus network through the PAC transparently. Once the USB cable is removed the PAC starts working as a PAC again. So, in short, yes you can use a PAC to commission/configure a C-Bus network like a PC Interface; you just need to remember that in this mode the regular PAC functions are suspended.

    The PAC has 2 serial ports on it. These are only available to the logic engine and cannot be used as RS-232 ports for commissioning a C-Bus network.

    The PAC does not have an ethernet connection.
     
    Last edited by a moderator: Jun 5, 2011
    Newman, Jun 5, 2011
    #33
  14. greig

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    Thanks Newman, seems like logical thing if you want to do anything complicated with CBUS is to go stright for a Wiser? Is it then correct to think of a Wiser = PAC + CNI? I do realise that the wiser has wireless and ethernet ports, so this gives it more connectivity options. But in terms of programming and interfacing capability, they should be similar correct?
     
    Last edited by a moderator: Jun 5, 2011
    paulevans, Jun 5, 2011
    #34
  15. greig

    John Harnett

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

    I was pondering something along these lines for a while now as well, but time is always in short supply. I have to admit as a coder I admire your documentation. I will typically avoid doing any for as long as I can and it's put off like going to the dentist for a root-t canal;-)

    I've got it on an Apache server at the mo' (FreeBSD) and I too get the header modification errors.

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /z1/home/john/public_html/C-Change/c-bus_common.php:407) in /z1/home/john/public_html/C-Change/index.php on line 11

    Warning: Cannot modify header information - headers already sent by (output started at /z1/home/john/public_html/C-Change/c-bus_common.php:407) in /z1/home/john/public_html/C-Change/index.php on line 91

    I've had a similar problem myself in the past with session data etc. I'll have a closer look when I get a few spare minutes.

    John
     
    John Harnett, Jun 6, 2011
    #35
  16. greig

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    A Wiser is a lot more than a PAC + CNI. It has all the web and router stuff as well.

    The exception to this is that the PAC has physical serial ports on it, which the Wiser does not have. This is important to know if you intend to write some logic for controlling an AV receiver or some similar device with a serial interface. You can't do that with a Wiser.

    The other difference is that the PAC has an external battery connection for allowing the RTC to hold it's time. The Wiser will hold the time across power failures for a few days. The PAC will remember the real time clock time as long as the external battery holds it's charge. One could argue that since the Wiser can get it's time from an NTP source, there's no need for it to remember the time for too long anyway.
     
    Newman, Jun 6, 2011
    #36
  17. greig

    Jasp

    Joined:
    May 25, 2010
    Messages:
    24
    Likes Received:
    0
    Location:
    Melbourne
    You could always drop a set of NIRT plates in with some IR targets to control an AV receiver, then use the Media Transport Widget to trigger the appropriate controls on Wiser's GUI.
     
    Jasp, Jun 6, 2011
    #37
  18. greig

    paulevans

    Joined:
    May 1, 2011
    Messages:
    27
    Likes Received:
    0
    Location:
    sydney
    thanks Newman, I was about to buy the CNI & PAC... but from your information I will get the Wiser, they cost about the same... but sounds like the Wiser is the way to go...
     
    paulevans, Jun 6, 2011
    #38
  19. greig

    greig

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


    You'll resolve the 'headers already sent' error by changing this line in your PHP.INI file to "ON"

    output_buffering = Off


    G.
     
    greig, Jun 6, 2011
    #39
  20. greig

    martymonster

    Joined:
    Aug 5, 2004
    Messages:
    159
    Likes Received:
    1
    HI,
    I just gave this a try.
    I have IIS running on a Win 2008 R2 server.
    I installed the code and set up a new virtual dir for the web site.
    I started C-Gate on the server.
    I then tried to access the web site from my PC.
    Great, it showed the site was running.
    Before I could get the web site to actually change any lights, I had to start Toolkit to open the network.

    When displaying the network using the table view, it shows eveything 4 times.

    I have 2 networks, 254 wired and 200 wireless.

    Marty
     
    martymonster, Jun 9, 2011
    #40
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.