Connecting to CBUS through wiser via a Java App

Discussion in 'C-Bus Wiser 2 Controller' started by trucker01, Sep 20, 2015.

  1. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Java application access to wiser.

    Hey guys


    I was wondering if anyone out there has had a go at this. I have got some Java code that has zero documentation from github that connects to a CNI.
    The wiser exposes a CNI to the network however, as part of the protocol there are three ports that need to be connected to.
    10001 for control. that port is open.
    And two others.
    Command interface is supposed to be 20023/20123(ssl).
    Event interface is supposed to be 20024/20124(ssl).

    On the wiser the control port is open but the command event interfaces are closed. Did anyone else get this to work ?

    When i port scan the wiser 2 i get
    Open TCP Port: 80 http
    Open TCP Port: 90 dnsix
    Open TCP Port: 8336
    Open TCP Port: 8337
    Open TCP Port: 8888 ddi-tcp-1
    Open TCP Port: 8890 ddi-tcp-3
    Open TCP Port: 10001 scp-config
    Open TCP Port: 10010
    Open TCP Port: 20030
    Port Scan has completed?



    Clearly 80 is for the web front end.
    Ive tried 8888 and 8890 (which btw are different from wiser 1)

    Does anyone know the appropriate setup for the wiser 2
     
    trucker01, Sep 20, 2015
    #1
  2. trucker01

    zei20t

    Joined:
    Aug 18, 2010
    Messages:
    130
    Likes Received:
    1
    Location:
    Sydney, Australia
    Use wireshark and log the communications with an application you know is working fine, perhaps you can then change your code to suite
     
    zei20t, Sep 21, 2015
    #2
  3. trucker01

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Maybe I don't quite get what you are trying to do but won't the Wiser be offline if you are using its CNI?
     
    DarylMc, Sep 21, 2015
    #3
  4. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    From what i understand the wiser 2 has two CNI's one used by the wiser logic and one available for external use.

    I want to be able to switch on and off a group from a program (eg a method call) without having a cgate installed on that machine.
     
    trucker01, Sep 21, 2015
    #4
  5. trucker01

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    I very much doubt Wiser 2 has two CNI's but look forward to hearing all about it.
     
    DarylMc, Sep 21, 2015
    #5
  6. trucker01

    bmerrick

    Joined:
    Jun 13, 2007
    Messages:
    434
    Likes Received:
    34
    Location:
    Sydney
    be prepared to be very surprised then....... :p
     
    bmerrick, Sep 21, 2015
    #6
  7. trucker01

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi Brad
    That would be a good thing.
     
    Last edited by a moderator: Sep 21, 2015
    DarylMc, Sep 21, 2015
    #7
  8. trucker01

    bmerrick

    Joined:
    Jun 13, 2007
    Messages:
    434
    Likes Received:
    34
    Location:
    Sydney
    Not sure it is advertised as such. Its so you can use it to config your network without the Wiser going into 'Transparent Mode' and stopping doing its job like the Wiser 1 and 1As did.

    all the brochure says is:
    Onboard C-Bus connection

    Dual C-Bus (internal) connections on one single physical C-Bus connection
    Can be used with external CNI if no physical C-Bus connection is available

    It has two C-Bus serial numbers in Toolkit, one being the Wiser and one being the CNI. I take the above to say, two CNIs sharing the same physical external plug, with one being dedicated for Wiser function.
     
    bmerrick, Sep 21, 2015
    #8
  9. trucker01

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    That is not entirely clear to me but 2 interfaces are a handy thing to have.
    Especially if Wiser or something else is using one of them.
    Thanks for informing me.
     
    Last edited by a moderator: Sep 21, 2015
    DarylMc, Sep 21, 2015
    #9
  10. trucker01

    bmerrick

    Joined:
    Jun 13, 2007
    Messages:
    434
    Likes Received:
    34
    Location:
    Sydney
    and the smoking gun.......

    The circuit board has two C-Bus 'stamps' side by side near the one C-Bus connector.


    [​IMG]

    Like I said, it isn't advertised as such but it makes sense in its operation.

    :cool:
     
    Last edited by a moderator: Sep 21, 2015
    bmerrick, Sep 21, 2015
    #10
  11. trucker01

    trucker01

    Joined:
    Jan 11, 2014
    Messages:
    65
    Likes Received:
    0
    Location:
    Adelaide
    Brad



    I seem to remember you have played with programming these things. Have you done any code to connect to the CNI on the wiser to send group commands ?



    Cheers
    Stewart
     
    trucker01, Sep 21, 2015
    #11
  12. trucker01

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Assuming they are really functionally standard sim modules and you can connect to one of them via a socket (like a CNI) then the downloadable C-Bus protocol documents have all the information required.

    Start out with the Quick Start Guide to get basic functionality.

    Cheers

    Rohan
     
    rhamer, Sep 21, 2015
    #12
  13. trucker01

    bmerrick

    Joined:
    Jun 13, 2007
    Messages:
    434
    Likes Received:
    34
    Location:
    Sydney
    Hi Stewart,

    Answered this before but post mysteriously isn't here??

    No, I have not tried to use the Wiser2 CNI in the method that you are suggesting, sorry.

    You can write a program in the logic engine that would allow you to do what is sounds like you are attempting.

    There is a good post about using a logic engine to act as a web server (whilst written for the CTC, I have used this basic web server code to great advantage in several Wiser 2s) and then you can parse whatever you send at it in the logic engine.


    I also think this post - HTTP control proxy via C-Gate and NodeJS is down the alley you are looking at.

    Regards,

    Brad
     
    Last edited by a moderator: Sep 23, 2015
    bmerrick, Sep 23, 2015
    #13
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.