OpenHAB and CBus Integration Questions

Discussion in 'Third-Party Solutions' started by galileo, May 28, 2020.

  1. galileo

    galileo

    Joined:
    May 25, 2020
    Messages:
    1
    Likes Received:
    0
    I am looking for some advice please….

    A friend has the following hardware/software setup:

    RaspPi 3 running OpenHABian

    CGate running (ver 2.11.4) & Ser2Sock and is connected via serial via USB to Serial adapter to CBUS controller.

    OpenHAB 2.5.5 (previously 2.5.4) + CBUS Binding (https://www.openhab.org/addons/bindings/cbus/)


    Test Results/Symptoms:

    · Can use CGate CLI commands on RasPi to turn on/off CBUS lighting

    · OH CBUS binding doesn’t auto-discover as suggested.

    · OH static Thing created for “cgatenetwork” bridge & “cbusnetwork” bridge & light are Online

    · Lights turned on/off at switch affect the OH status for that light

    · Attempts to switch on Thing via Control menu (or via a channel assigned to an Item both get an OH error saying “Invalid Group” in the OH Log.

    · CGate Logs don’t seem to suggest that OH sent a request to change the light when it should have (I think !)


    Questions:

    1. Is the group number always the same as the light number ? Any thoughts on the error received ?

    2. There appears to be two way to defines lights, which is better ?

    3. Based on the suppled CBUS output how should a light Thing be defined ?


    CGate Config/Log:


    20200523-155519 761 cmd25 - Command: [56] noop

    20200523-155519 766 cmd25 - Response: [56] 200 OK.

    20200523-155529 761 cmd25 - Command: [57] net list_all

    20200523-155529 766 cmd25 - Response: [57] 135 project=PETER address=//PETER/100 OID=cc234ff0-7ac7-1038-4534-f728a6bad8bf interfaceType=cni interfaceAddress=192.168.1.54:10001 state=ok interfaceState=running

    20200523-155529 761 cmd25 - Command: [58] project dir

    20200523-155529 766 cmd25 - Response: [58] 123 project=PETER

    20200523-155529 761 cmd25 - Command: [59] project dir

    20200523-155529 766 cmd25 - Response: [59] 123-project=EXAMPLE

    20200523-155529 766 cmd25 - Response: [59] 123 project=PETER

    20200523-155529 761 cmd25 - Command: [60] dbget //PETER/100/TagName

    20200523-155529 766 cmd25 - Response: [60] 342 100/TagName=n100

    20200523-155529 766 cmd25 - Response: [65] 342-100/Address=100


    20200523-154409 701 //PETER/100/56 - state=ok

    20200523-154409 701 //PETER/100/56/0 - state=ok

    20200523-154409 701 //PETER/100/56/0 - level=0

    20200523-154409 701 //PETER/100/56/1 - state=ok

    20200523-154409 701 //PETER/100/56/1 - level=0

    20200523-154409 701 //PETER/100/56/2 - state=ok

    20200523-154409 701 //PETER/100/56/2 - level=0

    20200523-154409 701 //PETER/100/56/3 - state=ok

    20200523-154409 701 //PETER/100/56/3 - level=0

    20200523-154409 701 //PETER/100/56/4 - state=ok

    20200523-154409 701 //PETER/100/56/4 - level=255

    20200523-154409 701 //PETER/100/56/5 - state=ok

    20200523-154409 701 //PETER/100/56/5 - level=0

    20200523-154409 701 //PETER/100/56/6 - state=ok

    20200523-154409 701 //PETER/100/56/6 - level=0

    20200523-154409 701 //PETER/100/56/7 - state=ok

    20200523-154409 701 //PETER/100/56/7 - level=0

    20200523-154409 701 //PETER/100/56/8 - state=ok

    20200523-154409 701 //PETER/100/56/8 - level=0

    20200523-154409 701 //PETER/100/56/9 - state=ok

    20200523-154409 701 //PETER/100/56/9 - level=0

    20200523-154409 701 //PETER/100/56/16 - state=ok

    20200523-154409 701 //PETER/100/56/16 - level=0

    20200523-154409 701 //PETER/100/56/17 - state=ok

    20200523-154409 701 //PETER/100/56/17 - level=0

    20200523-154409 701 //PETER/100/56/18 - state=ok

    20200523-154409 701 //PETER/100/56/18 - level=0

    20200523-154409 701 //PETER/100/56/19 - state=ok

    20200523-154409 701 //PETER/100/56/19 - level=0

    20200523-154409 701 //PETER/100/56/20 - state=ok

    20200523-154409 701 //PETER/100/56/20 - level=0

    20200523-154409 701 //PETER/100/56/21 - state=ok

    20200523-154409 701 //PETER/100/56/21 - level=0

    20200523-154409 701 //PETER/100/56/22 - state=ok

    20200523-154409 701 //PETER/100/56/22 - level=0

    20200523-154409 701 //PETER/100/56/23 - state=ok

    20200523-154409 701 //PETER/100/56/23 - level=0

    20200523-154409 701 //PETER/100/56/24 - state=ok

    20200523-154409 701 //PETER/100/56/24 - level=0

    20200523-154409 701 //PETER/100/56/25 - state=ok

    20200523-154409 701 //PETER/100/56/25 - level=0

    20200523-154409 701 //PETER/100/56/32 - state=ok

    20200523-154409 701 //PETER/100/56/32 - level=0

    20200523-154409 701 //PETER/100/56/33 - state=ok

    20200523-154409 701 //PETER/100/56/33 - level=255

    20200523-154409 701 //PETER/100/56/34 - state=ok

    20200523-154409 701 //PETER/100/56/34 - level=0

    20200523-154409 701 //PETER/100/56/35 - state=ok

    20200523-154409 701 //PETER/100/56/35 - level=0

    20200523-154409 701 //PETER/100/56/36 - state=ok

    20200523-154409 701 //PETER/100/56/36 - level=255

    20200523-154409 701 //PETER/100/56/37 - state=ok

    20200523-154409 701 //PETER/100/56/37 - level=255

    20200523-154409 701 //PETER/100/56/38 - state=ok

    20200523-154409 701 //PETER/100/56/38 - level=0

    20200523-154409 701 //PETER/100/56/39 - state=ok

    20200523-154409 701 //PETER/100/56/39 - level=0

    20200523-154409 701 //PETER/100/56/40 - state=ok

    20200523-154409 701 //PETER/100/56/40 - level=0

    20200523-154409 701 //PETER/100/56/41 - state=ok

    20200523-154409 701 //PETER/100/56/41 - level=0

    20200523-154409 701 //PETER/100/56/48 - state=ok

    20200523-154409 701 //PETER/100/56/48 - level=0

    20200523-154409 701 //PETER/100/56/49 - state=ok

    20200523-154409 701 //PETER/100/56/49 - level=0

    20200523-154409 701 //PETER/100/56/50 - state=ok

    20200523-154409 701 //PETER/100/56/50 - level=0

    20200523-154409 701 //PETER/100/56/51 - state=ok

    20200523-154409 701 //PETER/100/56/51 - level=0

    20200523-154409 701 //PETER/100/56/52 - state=ok

    20200523-154409 701 //PETER/100/56/52 - level=0

    20200523-154409 701 //PETER/100/56/53 - state=ok

    20200523-154409 701 //PETER/100/56/53 - level=0

    20200523-154409 701 //PETER/100/56/54 - state=ok

    20200523-154409 701 //PETER/100/56/54 - level=0

    20200523-154409 701 //PETER/100/56/55 - state=ok

    20200523-154409 701 //PETER/100/56/55 - level=0

    20200523-154409 701 //PETER/100/56/56 - state=ok

    20200523-154409 701 //PETER/100/56/56 - level=0

    20200523-154409 701 //PETER/100/56/57 - state=ok

    20200523-154409 701 //PETER/100/56/57 - level=0

    20200523-154409 701 //PETER/100/56/64 - state=ok

    20200523-154409 701 //PETER/100/56/64 - level=0

    20200523-154409 701 //PETER/100/56/65 - state=ok

    20200523-154409 701 //PETER/100/56/65 - level=0

    20200523-154409 701 //PETER/100/56/66 - state=ok

    20200523-154409 701 //PETER/100/56/66 - level=0

    20200523-154409 701 //PETER/100/56/67 - state=ok

    20200523-154409 701 //PETER/100/56/67 - level=0

    20200523-154409 701 //PETER/100/56/68 - state=ok

    20200523-154409 701 //PETER/100/56/68 - level=0

    20200523-154409 701 //PETER/100/56/69 - state=ok

    20200523-154409 701 //PETER/100/56/69 - level=0

    20200523-154409 701 //PETER/100/p/1 - state=ok

    20200523-154409 701 //PETER/100/p/2 - state=ok

    20200523-154409 701 //PETER/100/p/3 - state=ok

    20200523-154409 701 //PETER/100/p/4 - state=ok

    20200523-154409 701 //PETER/100/p/5 - state=ok

    20200523-154409 701 //PETER/100/p/6 - state=ok

    20200523-154409 701 //PETER/100/p/7 - state=ok

    20200523-154409 701 //PETER/100/p/8 - state=ok

    20200523-154409 701 //PETER/100/p/9 - state=ok

    20200523-154409 701 //PETER/100/p/10 - state=ok

    20200523-154409 701 //PETER/100/p/11 - state=ok

    20200523-154409 701 //PETER/100/p/12 - state=ok

    20200523-154409 701 //PETER/100/p/13 - state=ok

    20200523-154409 701 //PETER/100/p/14 - state=ok

    20200523-154409 701 //PETER/100/p/15 - state=ok

    20200523-154409 701 //PETER/100/p/16 - state=ok

    20200523-154409 701 //PETER/100/p/17 - state=ok

    20200523-154409 701 //PETER/100/p/18 - state=ok

    20200523-154409 701 //PETER/100/p/19 - state=ok

    20200523-154409 701 //PETER/100/p/20 - state=ok

    20200523-154409 701 //PETER/100/p/21 - state=ok

    20200523-154409 701 //PETER/100/p/22 - state=ok

    20200523-154409 701 //PETER/100/p/23 - state=ok

    20200523-154409 701 //PETER/100/p/24 - state=ok

    20200523-154409 701 //PETER/100/p/25 - state=ok

    20200523-154409 701 //PETER/100/p/26 - state=ok

    20200523-154409 701 //PETER/100/p/27 - state=ok

    20200523-154409 701 //PETER/100/p/28 - state=ok

    20200523-154409 701 //PETER/100/p/29 - state=ok

    20200523-154409 701 //PETER/100/p/255 - state=ok


    OH CGATE Thing:

    /* Need a cgate bridge to connect to cgate and then 1 network bridge for each network on that system */

    Bridge cbus:cgate:cgatenetwork "file - cgate" [ ipAddress="192.168.1.54"] {

    Bridge network cbusnetwork "file - network" [ id=100, project="PETER" ] {

    /* Things can be configured within each network bridge */

    Thing light light4 "light 4" [group=4]

    }

    }

    /* Things can be configured seperatly and associated with the network bridge */

    Thing cbus:light:cgatenetwork:cbusnetwork:light31 "light 31" (cbus:network:cgatenetwork:cbusnetwork) [ group=31 ]

    Thanks
    Rod
     
    galileo, May 28, 2020
    #1
    1. Advertisements

  2. galileo

    chromus

    Joined:
    Jan 27, 2014
    Messages:
    250
    Likes Received:
    32
    Location:
    Perth
    Is the USB<>Serial adapter a genuine FTDI chipset? Lots of the knockoff (<$10 on ebay) FTDI and CH340 adapters play up pretty badly.
     
    chromus, Jun 2, 2020
    #2
    1. Advertisements

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.