Windows 8 / WinRT - Working with C-Gate

Discussion in 'C-Bus Toolkit and C-Gate Software' started by Craggen, Jun 20, 2012.

  1. Craggen

    Craggen

    Joined:
    Dec 30, 2009
    Messages:
    26
    Likes Received:
    0
    Location:
    Scotland
    I've been having a bit of a play with the Windows 8 Release Preview and the associated development platform (WinRT) with an aim to build a combined C-Bus and Sonos controller app for my home.

    On reading through various posts on this forum I understand that the C-Gate (via Telnet) approach is the preferred and simplest option to implement however due to the security constraints in Windows 8, an application is unable to communicate with any other on the same machine.

    Therefore, having C-Gate run locally does not appear to be an option and to have yet another server running on the network to host this C-Gate is not ideal.

    Are there any plans to provide client libraries (.NET based?) that would allow similar capabilities to C-Gate but that could be used natively by apps?

    Alternatively, as I use a Wiser unit at home, could the Wiser be given a more modern API that could be programmed against? HTTP, WebSocket and RESTful based maybe?

    Would love to find out more about the plans for Wiser and C-Bus in general as it would appear progress has been slow in this area recently, especially in relation to consumer devices such as iPad, Android and Windows Phone/8.

    Why not build the APIs and let 3rd party developers build the controllers!
     
    Craggen, Jun 20, 2012
    #1
  2. Craggen

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,400
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    C-Gate as a java application communicates to other applications (locally or otherwise) using TCP/IP sockets.

    I'd be gobsmacked if plain ole TCP is forbidden in Windows 8. Cos if M$ did that then nothing (absolutely nothing at all) would actually work on Windows 8. Evah.

    My first GUESS is that if you can run C-Gate on windows 7, you should be able to run it and any app that depends on it, on Windows 8.

    Love to be proven wrong :)
     
    ashleigh, Jun 20, 2012
    #2
  3. Craggen

    Craggen

    Joined:
    Dec 30, 2009
    Messages:
    26
    Likes Received:
    0
    Location:
    Scotland
    You're absolutely correct, TCP sockets are available however you are forbidden from using the loopback address (note: this is WinRT APIs for Metro specific apps, not Win32) to in effect communicate with another process. That service/process would need to be hosted on another machine.

    Therefore, I can't see how a native WinRT app will be able to use C-Gate for communication with the C-bus network.
     
    Craggen, Jun 20, 2012
    #3
  4. Craggen

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    770
    Likes Received:
    21
    Location:
    Adelaide
    Windows 8 and Windows RT look to be very different beasts under the covers (RT I think is for ARM processors and designed to run on tablets). At some point you could reasonably expect support for Windows 8's traditional desktop (even if we have to change some of the TCP behaviour) but there would be a big question mark over any expectation to run traditional PC applications in Windows 8 Metro mode or on Windows RT (which is Metro only).

    The situation is not wholly unlike Windows CE back in the day which had very little in common with the desktop editions of Windows.

    Your API suggestion is a good one and one possibility may be a version of the cbus module dll compiled for RT.

    I do want to thank you for bringing up the subject, all these topics will definitely be on the table when determining future platform support.
     
    Last edited by a moderator: Jun 21, 2012
    daniel, Jun 21, 2012
    #4
  5. Craggen

    Craggen

    Joined:
    Dec 30, 2009
    Messages:
    26
    Likes Received:
    0
    Location:
    Scotland
    I can understand the confusion over the naming of various parts of the Windows 8 ecosystem. To try and clarify, I'm referring specifically to the Windows platform API named WinRT (not WindowsRT - previously WOA - that they use to refer to the tablet specific version of the OS - confusing or what!).

    I intend to create a controller application on the WinRT platform so that I am able to use it on both ARM and Intel based devices. I obviously don't own a tablet yet and want to keep my options open beyond my laptop.

    Wikipedia has a decent overview or you can check out the official MS documentation.

    Therefore, the question of running a "traditional" (Win32 assumed) application on WinRT is not possible nor, as I have highlighted, is it possible to have inter-process communication between applications (except for well defined "Contracts").

    Whether you decide to open source the C-Gate codebase or build your own WinRT compatible module, I'd be keen to get involved as until then WinRT is not an option.

    Next port of call is to build a Node.js based server and try running it on the likes of Raspberry Pi as a proxy to C-Gate (I don't like the idea of leaving my PCs running in order to control various devices).

    Could the API be built into the Wiser firmware to save yet another host?
     
    Craggen, Jun 21, 2012
    #5
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.