home automation software

Discussion in 'C-Gate Developers' started by jonw, Nov 19, 2013.

  1. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Hi folks,

    I'd like to integrate my fledgling CBus install with some home automation software.

    Is anybody using any, and have any recommendations? I'd prefer open source, linux based.

    I've been trying misterhouse, but I'm having problems getting it running, and I'm not sure that it (a) has a very active community anymore, and (b) still supports CBus.

    Cheers,

    Jon
     
    jonw, Nov 19, 2013
    #1
  2. jonw

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    Not open source and not linux but I highly recomend CQC from Charmed Quark. IMO the best that is out there, esp for the price.

    www.charmedquark.com

    check out the CQC forums for the real value of it.

    Mick
     
    znelbok, Nov 19, 2013
    #2
  3. jonw

    Andy@Mandoon

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    Hi Jon,

    Yep, I would heartily recommend Misterhouse for it's superb CBus interface (which I have done a lot of work on).

    Unfortunately due to a change in CGate, Jon has had problems getting Misterhouse working. He has done some excellent work and chased down the problem.

    It appears that CGate has changed its response to DBGET requests.

    To our CGate developers: Is the change in the 342 reply from DBGET deliberate??

    Previously, the DBGET responded with a 342 including a Project name.
    342 //CARLYLE/254/p/171/TagName=Guest Bathroom

    Now CGate (Jon's version anyway) is responding with a relative address ie. no Project name.
    342 254/p/6/TagName=Downstairs Relay 1

    Was this done to align with the DBTAGLIST or might it revert back?

    Cheers,
    Andy.
     
    Andy@Mandoon, Nov 25, 2013
    #3
  4. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Mick, thanks for the tip. I am keen to stay with open source.

    Fortunately, as Andy's pointed out, I've managed to get misterhouse working with current CBus. My version of CGate is 2.9.7, if that helps.

    Cheers,

    Jon
     
    jonw, Nov 26, 2013
    #4
  5. jonw

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    Out of curosity, why do you want an open source solution?
     
    znelbok, Nov 27, 2013
    #5
  6. jonw

    connectedsmart

    Joined:
    Oct 10, 2012
    Messages:
    29
    Likes Received:
    1
    Location:
    Queensland
    Have a look at CommandFusion (www.commandfusion.com) it is an Australian based system that requires no special hardware to operate on and is open source.

    There is a module for C-Bus already created on GitHub.

    All control is done via an iDevice (iPad, iPhone, iTouch) or Android Device.
     
    connectedsmart, Nov 29, 2013
    #6
  7. jonw

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    Hi Andy,

    I'm afraid I haven't been able to reproduce this. I'm not sure what previous C-Gate version you were using, so I went back to 2.7.0.

    An interesting thing to note is that DBGET's response uses the same syntax you supply.

    So for three different ways of referencing the same object:


    Clipsal C-Gate(TM) v2.7.0 (build 2262)

    project load home
    200 OK.
    project use home
    200 OK.

    dbget 254
    342-254/OID=78d831af-041f-4c7f-a962-688b3df10cd5
    342-254/TagName=Local Network
    342-254/Address=254
    ...

    dbget //home/254
    342-//home/254/OID=78d831af-041f-4c7f-a962-688b3df10cd5
    342-//home/254/TagName=Local Network
    342-//home/254/Address=254
    ...

    dbget !78d831af-041f-4c7f-a962-688b3df10cd5
    342-!78d831af-041f-4c7f-a962-688b3df10cd5/OID=78d831af-041f-4c7f-a962-688b3df10c
    d5
    342-!78d831af-041f-4c7f-a962-688b3df10cd5/TagName=Local Network
    342-!78d831af-041f-4c7f-a962-688b3df10cd5/Address=254
    ...


    The same applies for other objects:


    dbget 254/56/1
    342-254/56/1/OID=8c9ad647-2818-4661-ba21-b94db3a19d2d
    342-254/56/1/TagName=Example - Group 1
    342-254/56/1/Address=1
    ...

    dbget //home/254/56/1
    342-//home/254/56/1/OID=8c9ad647-2818-4661-ba21-b94db3a19d2d
    342-//home/254/56/1/TagName=Example - Group 1
    342-//home/254/56/1/Address=1
    ...

    dbget 254/p/250/TagName
    342 254/p/250/TagName=n254_u250

    dbget //home/254/p/250/TagName
    342 //home/254/p/250/TagName=n254_u250


    I repeated all of the above on 2.9.7 and received the same output.

    Is it possible that the command syntax being sent by the misterhouse software changed? Or is the syntax something I haven't tested here?

    If you have log snippets (including the commands) from the old and new C-Gate I can investigate further.
     
    Last edited by a moderator: Nov 29, 2013
    daniel, Nov 29, 2013
    #7
  8. jonw

    Andy@Mandoon

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    Bizarre. So it should work fine as long as "if the system expects to see a project name in the response then the DBGET should include the project name." This is the case for MisterHouse.

    My CGate version is:
    Code:
    Clipsal C-Gate Version: v2.7.1 (build 2267) #cmd-syntax=1.0
    As you can see below, MH is sending the project name. So it is getting the project name in the response.
    Code:
    02/12/13 18:21:15  CBus: command 'dbget //CARLYLE/254/p/103/TagName'
    02/12/13 18:21:15  CBus 342 response: '342 //CARLYLE/254/p/102/TagName=Bathroom Main'
    02/12/13 18:21:15  CBus: Addr 102 is Bathroom Main of type unit
    02/12/13 18:21:15  CBus: command 'dbget //CARLYLE/254/p/104/TagName'
    02/12/13 18:21:15  CBus 342 response: '342 //CARLYLE/254/p/103/TagName=MasterBed Entrance'
    
    Apparently, Jon's CGate is not responding the same way.

    Jon - do you think you could add a
    Code:
    print_log "CBus: command 'dbget $unit/TagName'";
    before this line:
    Code:
     set $cbus_talker "dbget $unit/TagName";
    in cbus.pl

    Sorry it's not a diff, but you are running a different code version to me now.

    Jon's log files show MH should have the project name in the DBGET command. Just speculating but maybe the cause of this is a change CGate response to the TREE command? Anyway, if Jon can do a quick run showing us the command that MH is using we can move forward.

    Andy.

    PS. I am concerned that the current proposed fix for MH might mask (or even cause) other problems....
     
    Andy@Mandoon, Dec 2, 2013
    #8
  9. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Andy,

    I'll do this tonight and post a response.

    Cheers,

    Jon
     
    Last edited by a moderator: Dec 3, 2013
    jonw, Dec 3, 2013
    #9
  10. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Here's what I get when I telnet to cgate directly

    Code:
    jons-mbp:~ jon$ telnet raspberry 20023
    Trying 192.168.1.12...
    Connected to raspberry.<my.domain.removed>.
    Escape character is '^]'.
    201 Service ready: Clipsal C-Gate Version: v2.9.7 (build 2569) #cmd-syntax=1.0
    dbget //HOME/254/p/0/TagName
    342 254/p/0/TagName=USB PC Interface
    dbget 254/p/0/TagName
    342 254/p/0/TagName=USB PC Interface
    So it looks like I'm not getting the response in the same format as the query.

    Here's the logging from mister house with the additional print log statements (and a few more of my own ;-)

    Looks like it's getting the same thing, e.g.

    Code:
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/p/0/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/p/0/TagName=USB PC Interface
    Code:
    12/03/13 09:22:54 PM CBus: Monitor started
    12/03/13 09:22:54 PM CBus: Talker started
    12/03/13 09:22:54 PM CBus: Comms established - 201 Service ready: Clipsal C-Gate Version: v2.9.7 (build 2569) #cmd-syntax=1.0
    12/03/13 09:22:54 PM CBus: Session ID is "sessionID=cmd65"
    12/03/13 09:22:56 PM CBus: project load HOME
    12/03/13 09:22:56 PM CBus: project use HOME
    12/03/13 09:22:56 PM CBus: project start HOME
    12/03/13 09:22:56 PM CBus: Network list - 254
    12/03/13 09:22:56 PM CBus: command 'get 254 state'
    12/03/13 09:22:56 PM CBus: CGate Status - 300 //HOME/254: state=ok
    12/03/13 09:23:04 PM Telnet: port data (IO::Socket::INET=GLOB(0x3841f20)): cbus builder scan cgate
    12/03/13 09:23:04 PM Running: CBus Builder Scan CGate
    12/03/13 09:23:04 PM Ran telnet command: cbus builder scan cgate
    12/03/13 09:23:04 PM CBus: load_def_file() XML definition file ./../../local/code/cbus.xml does not exist
    12/03/13 09:23:04 PM CBus: scan_cgate() Scanning CGate...
    12/03/13 09:23:04 PM CBus: scan_cgate() Command - project start HOME
    12/03/13 09:23:04 PM CBus: command 'get cbus networks'
    12/03/13 09:23:04 PM CBus: Network list - 254
    12/03/13 09:23:04 PM CBus: command 'get 254 state'
    12/03/13 09:23:04 PM CBus: CGate Status - 300 //HOME/254: state=ok
    12/03/13 09:23:04 PM CBus: Scanning network //HOME/254
    12/03/13 09:23:04 PM CBus: command 'tree //HOME/254'
    12/03/13 09:23:04 PM CBus: scanned addr=//HOME/254/p/0 is type PCLOCALU
    12/03/13 09:23:05 PM CBus: scanned addr=//HOME/254/p/1 is type DIMDN8
    12/03/13 09:23:05 PM CBus: scanned addr=//HOME/254/p/2 is type KEYB4
    12/03/13 09:23:05 PM CBus: scanned addr=//HOME/254/p/4 is type SENPILL
    12/03/13 09:23:05 PM CBus: scanned addr=//HOME/254/p/6 is type RELDN4
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/0 at level 102
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/1 at level 0
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/2 at level 128
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/3 at level 51
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/5 at level 255
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/6 at level 0
    12/03/13 09:23:05 PM CBus: scanned group=//HOME/254/56/7 at level 0
    12/03/13 09:23:06 PM CBus: scanned group=//HOME/254/56/8 at level 0
    12/03/13 09:23:06 PM CBus: scanned group=//HOME/254/56/20 at level 255
    12/03/13 09:23:06 PM CBus: scanned group=//HOME/254/56/254 at level 0
    12/03/13 09:23:06 PM CBus: scanned group=//HOME/254/202/0 at level 102
    12/03/13 09:23:06 PM CBus: scanned group=//HOME/254/202/1 at level 51
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/0/TagName'
    12/03/13 09:23:06 PM CBus: Message 342 response data: 342 254/56/0/TagName=Kitchen Bench Downlights
    12/03/13 09:23:06 PM CBus: add_address_to_hash() Addr //HOME/254/56/0 is Kitchen Bench Downlights of type group
    12/03/13 09:23:06 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/0, Kitchen Bench Downlights
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/1/TagName'
    12/03/13 09:23:06 PM CBus: Message 342 response data: 342 254/56/1/TagName=Kitchen Island Pendamts
    12/03/13 09:23:06 PM CBus: add_address_to_hash() Addr //HOME/254/56/1 is Kitchen Island Pendamts of type group
    12/03/13 09:23:06 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/1, Kitchen Island Pendamts
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/2/TagName'
    12/03/13 09:23:06 PM CBus: Message 342 response data: 342 254/56/2/TagName=Kitchen Table Downlights
    12/03/13 09:23:06 PM CBus: add_address_to_hash() Addr //HOME/254/56/2 is Kitchen Table Downlights of type group
    12/03/13 09:23:06 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/2, Kitchen Table Downlights
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/3/TagName'
    12/03/13 09:23:06 PM CBus: Message 342 response data: 342 254/56/3/TagName=Dining Room Downlights
    12/03/13 09:23:06 PM CBus: add_address_to_hash() Addr //HOME/254/56/3 is Dining Room Downlights of type group
    12/03/13 09:23:06 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/3, Dining Room Downlights
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/5/TagName'
    12/03/13 09:23:06 PM CBus: Message 342 response data: 342 254/56/5/TagName=Hallway Spotlight
    12/03/13 09:23:06 PM CBus: add_address_to_hash() Addr //HOME/254/56/5 is Hallway Spotlight of type group
    12/03/13 09:23:06 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/5, Hallway Spotlight
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/6/TagName'
    12/03/13 09:23:06 PM CBus: Message 342 response data: 342 254/56/6/TagName=Downstairs Bathroom Heatlamp 1
    12/03/13 09:23:06 PM CBus: add_address_to_hash() Addr //HOME/254/56/6 is Downstairs Bathroom Heatlamp 1 of type group
    12/03/13 09:23:06 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/6, Downstairs Bathroom Heatlamp 1
    12/03/13 09:23:06 PM CBus: command 'dbget //HOME/254/56/7/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/56/7/TagName=Downstairs Bathroom Heatlamp 2
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr //HOME/254/56/7 is Downstairs Bathroom Heatlamp 2 of type group
    12/03/13 09:23:07 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/7, Downstairs Bathroom Heatlamp 2
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/56/8/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/56/8/TagName=Downstairs Bathroom Fan
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr //HOME/254/56/8 is Downstairs Bathroom Fan of type group
    12/03/13 09:23:07 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/8, Downstairs Bathroom Fan
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/56/20/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/56/20/TagName=Downstaris Hallway Corridor Link
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr //HOME/254/56/20 is Downstaris Hallway Corridor Link of type group
    12/03/13 09:23:07 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/20, Downstaris Hallway Corridor Link
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/56/254/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/56/254/TagName=Shed Light - Insteon via MrHouse
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr //HOME/254/56/254 is Shed Light - Insteon via MrHouse of type group
    12/03/13 09:23:07 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/56/254, Shed Light - Insteon via MrHouse
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/202/0/TagName'
    12/03/13 09:23:07 PM CBus: 401 Bad object or device ID: Element 0 not found.
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/202/1/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/202/1/TagName=Dining Room Scene Trigger Group
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr //HOME/254/202/1 is Dining Room Scene Trigger Group of type group
    12/03/13 09:23:07 PM CBus: add_address_to_hash() group not defined yet, adding //HOME/254/202/1, Dining Room Scene Trigger Group
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/p/0/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/p/0/TagName=USB PC Interface
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr 0 is USB PC Interface of type unit
    12/03/13 09:23:07 PM CBus: add_address_to_hash() unit not defined yet, adding 0, USB PC Interface
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/p/1/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/p/1/TagName=Downstairs Dimmer 1
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr 1 is Downstairs Dimmer 1 of type unit
    12/03/13 09:23:07 PM CBus: add_address_to_hash() unit not defined yet, adding 1, Downstairs Dimmer 1
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/p/2/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/p/2/TagName=Kitchen 4-gang Switch
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr 2 is Kitchen 4-gang Switch of type unit
    12/03/13 09:23:07 PM CBus: add_address_to_hash() unit not defined yet, adding 2, Kitchen 4-gang Switch
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/p/4/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/p/4/TagName=Kitchen Multi-Sensor
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr 4 is Kitchen Multi-Sensor of type unit
    12/03/13 09:23:07 PM CBus: add_address_to_hash() unit not defined yet, adding 4, Kitchen Multi-Sensor
    12/03/13 09:23:07 PM CBus: command 'dbget //HOME/254/p/6/TagName'
    12/03/13 09:23:07 PM CBus: Message 342 response data: 342 254/p/6/TagName=Downstairs Relay 1
    12/03/13 09:23:07 PM CBus: add_address_to_hash() Addr 6 is Downstairs Relay 1 of type unit
    12/03/13 09:23:07 PM CBus: add_address_to_hash() unit not defined yet, adding 6, Downstairs Relay 1
    12/03/13 09:23:07 PM CBus: CBus server scan complete
    12/03/13 09:23:07 PM CBus: write_def_file() Writing XML definition to ./../../local/code/cbus.xml,
    12/03/13 09:23:45 PM Telnet: port data (IO::Socket::INET=GLOB(0x3841f20)): cbus builder run
    12/03/13 09:23:45 PM Running: CBus Builder Run
    12/03/13 09:23:45 PM Ran telnet command: cbus builder run
    12/03/13 09:23:45 PM CBus: load_def_file () Loading CBus config from XML file ./../../local/code/cbus.xml
    12/03/13 09:23:45 PM CBus: build_cbus_file() Starting build
    12/03/13 09:23:45 PM CBus: build_cbus_file() Saving CBus configs to ./../../local/code/cbus_procedures.pl
    12/03/13 09:23:45 PM CBUs: build_cbus_file() Completed CBus build to ./../../local/code/cbus_procedures.pl
    12/03/13 09:23:56 PM Telnet: port data (IO::Socket::INET=GLOB(0x3841f20)): reload code
    12/03/13 09:23:56 PM Running: Reload code
    12/03/13 09:23:56 PM Ran telnet command: reload code
    12/03/13 09:23:56 PM Re-reading /usr/local/bin/mrhouse/local/mh.private.ini and mh.ini
    12/03/13 09:23:56 PM Re-reading 12 code files
    12/03/13 09:23:56 PM    0 files deleted, 1 file changed: cbus_procedures.pl
    12/03/13 09:23:56 PM Reevaluating user code
    12/03/13 09:23:57 PM Rereading .menu code files.
    12/03/13 09:23:57 PM CBus: Talker stopping
    12/03/13 09:23:57 PM CBus: load_def_file () Loading CBus config from XML file ./../../local/code/cbus.xml
    12/03/13 09:23:58 PM CBus: Monitor started
    12/03/13 09:23:58 PM CBus: Talker started
    12/03/13 09:23:59 PM CBus: Comms established - 201 Service ready: Clipsal C-Gate Version: v2.9.7 (build 2569) #cmd-syntax=1.0
    12/03/13 09:24:00 PM CBus: Session ID is "sessionID=cmd67"
    12/03/13 09:24:02 PM CBus: project load HOME
    12/03/13 09:24:02 PM CBus: project use HOME
    12/03/13 09:24:02 PM CBus: project start HOME
    12/03/13 09:24:02 PM CBus: Network list - 254
    12/03/13 09:24:02 PM CBus: command 'get 254 state'
    12/03/13 09:24:02 PM CBus: CGate Status - 300 //HOME/254: state=ok
    12/03/13 09:24:02 PM CBus: Syncing MisterHouse to CBus (Off groups not displayed)
    12/03/13 09:24:02 PM CBus: Dining Room Downlights is 20%
    12/03/13 09:24:02 PM CBus: Hallway Spotlight is on
    12/03/13 09:24:02 PM CBus: Kitchen Bench Downlights is 40%
    12/03/13 09:24:03 PM CBus: Downstaris Hallway Corridor Link is on
    12/03/13 09:24:03 PM CBus: Kitchen Table Downlights is 50%
    12/03/13 09:24:12 PM CBus: Sync to CGate complete
    12/03/13 09:24:50 PM CBus: RAMP Kitchen Table Downlights set off, speed=2
    12/03/13 09:24:51 PM CBus: Kitchen Table Downlights set to OFF by "MisterHouse"
    12/03/13 09:25:03 PM CBus: RAMP Kitchen Bench Downlights set off, speed=2
    12/03/13 09:25:03 PM CBus: Kitchen Bench Downlights set to OFF by "MisterHouse"
    12/03/13 09:25:10 PM CBus: RAMP Downstaris Hallway Corridor Link set off, speed=2
    12/03/13 09:25:10 PM CBus: Downstaris Hallway Corridor Link set to OFF by "MisterHouse"
    12/03/13 09:26:01 PM CBus: Dining Room Downlights dim to 20% by "Switch:Kitchen Multi-Sensor"
    12/03/13 09:26:02 PM CBus: Dining Room Downlights dim to 20% by "Switch:Kitchen Multi-Sensor"
    12/03/13 09:26:03 PM CBus: Dining Room Downlights dim to 20% by "Switch:Kitchen Multi-Sensor"
    12/03/13 09:26:15 PM Telnet: port data (IO::Socket::INET=GLOB(0x3841f20)): exit
    12/03/13 09:26:16 PM Telnet: session closed from 192.168.1.13
    12/03/13 09:27:35 PM CBus: Dining Room Downlights dim to 20% by "Switch:Kitchen Multi-Sensor"
    12/03/13 09:27:37 PM CBus: Dining Room Downlights dim to 20% by "Switch:Kitchen Multi-Sensor"
    12/03/13 09:27:38 PM CBus: Dining Room Downlights dim to 20% by "Switch:Kitchen Multi-Sensor"
    12/03/13 09:27:40 PM CBus: Downstaris Hallway Corridor Link set to ON by "Switch:Kitchen Multi-Sensor"
    And here's cgate's response to the tree command:

    Code:
    tree //HOME/254
    320- Network name:254 type=cni address=127.0.0.1:10001 state=ok
    320-  Unit count=5
    320- Units:
    320-//HOME/254/p/0 ($0) type=PCLOCALU app=255($ff),255($ff) state=ok groups=
    320-//HOME/254/p/1 ($1) type=DIMDN8 app=56($38),255($ff) state=ok groups=3,5
    320-//HOME/254/p/2 ($2) type=KEYB4 app=56($38),202($ca) state=ok groups=3,254,5
    320-//HOME/254/p/4 ($4) type=SENPILL app=56($38),202($ca) state=ok groups=3,5
    320-//HOME/254/p/6 ($6) type=RELDN4 app=56($38),255($ff) state=ok groups=6,7,8
    320-Applications:
    320- Application 56 ($38) [lighting]
    320- Groups:
    320-  //HOME/254/56/0 ($0) level=0 state=ok units= 
    320-  //HOME/254/56/1 ($1) level=0 state=ok units= 
    320-  //HOME/254/56/2 ($2) level=0 state=ok units= (phantom)
    320-  //HOME/254/56/3 ($3) level=51 state=ok units=1,2,4 
    320-  //HOME/254/56/5 ($5) level=255 state=ok units=1,2,4 
    320-  //HOME/254/56/6 ($6) level=0 state=ok units=6 
    320-  //HOME/254/56/7 ($7) level=0 state=ok units=6 
    320-  //HOME/254/56/8 ($8) level=0 state=ok units=6 
    320-  //HOME/254/56/20 ($14) level=255 state=ok units= (phantom)
    320-  //HOME/254/56/254 ($fe) level=0 state=ok units=2 
    320- Application 202 ($ca) [trigger]
    320- Net Vars:
    320-  //HOME/254/202/0 ($0) level=102 state=ok
    320-  //HOME/254/202/1 ($1) level=51 state=ok
    320 -end-
    
    dbget 254
    342-254/OID=135d9b70-3536-1031-a8f1-cbbac5836c6b
    342-254/TagName=HOME_NET
    342-254/Address=254
    .......
    
    dbget //HOME/254
    342-254/OID=135d9b70-3536-1031-a8f1-cbbac5836c6b
    342-254/TagName=HOME_NET
    342-254/Address=254
    .......
    
    I have hide-project-names=no in my config.
     
    Last edited by a moderator: Dec 3, 2013
    jonw, Dec 3, 2013
    #10
  11. jonw

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    You're right. I must have been hallucinating the other day, as now it reproduces exactly as you said. The change happened in C-Gate 2.9.0 where DBGET received significant refactoring to support array indexes and wildcards. As the APIVER command will show, the 'cmd-db' API had a major increase from 1.4 to 2.0, so technically backwards-compatibility in the DB commands would not have been guaranteed anyway - but this wasn't actually one of the intentional changes!

    I have logged this issue to have DBGET behave the same as the other commands again but unfortunately in the meantime you will need to modify your code to match both possible responses (C-Gate 2.8.0 and earlier, and C-Gate 2.9.0 and later).

    FYI, in case it applies to your application, the actual intended change that led to the major 'cmd-db' API increment was to include the index when you requested the array object itself:

    Unchanged (single item in array):
    INFO - [20100611-150531-628] Tx: DBGET 254/56/Group[1]/TagName
    INFO - [20100611-150531-644] Rx:342 254/56/Group[1]/TagName=TestGroup1

    2.8.0 (array object):
    INFO - [20100611-161707-925] Tx: DBGET 254/56/Group
    INFO - [20100611-161707-940] Rx:342-254/56/Group/TagName=TestGroup1
    INFO - [20100611-161707-971] Rx:342-254/56/Group/Address=1
    ..
    INFO - [20100611-161707-988] Rx:342-254/56/Group/TagName=TestGroup2
    INFO - [20100611-161707-992] Rx:342-254/56/Group/Address=2
    ..

    2.9.0 (array object):
    INFO - [20100611-161707-925] Tx: DBGET 254/56/Group
    INFO - [20100611-161707-940] Rx:342-254/56/Group[0]/TagName=TestGroup1
    INFO - [20100611-161707-971] Rx:342-254/56/Group[0]/Address=1
    ..
    INFO - [20100611-161708-190] Rx:342-254/56/Group[1]/TagName=TestGroup2
    INFO - [20100611-161708-206] Rx:342-254/56/Group[1]/Address=2
    INFO - [20100611-161708-221] Rx:342-254/56/Group[1]/Description=null
    ..

    Cheers,
    Daniel


    (Reference: CG-1597)
     
    Last edited by a moderator: Dec 4, 2013
    daniel, Dec 4, 2013
    #11
  12. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Mick,

    Part of me likes free (as in speech) so I can modify the software to suit my requirements if need be. Part of me likes free as in beer.

    I'm also using open source solitons for media and telephony, and is imagine integration between open source projects is probably more developed than integration between OS and closed.

    Cheers,

    Jon
     
    jonw, Dec 5, 2013
    #12
  13. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Daniel,

    Thanks for looking into this. The patch I've submitted to misterhouse supports both return formats, so we should be good.

    Cheers,

    Jon
     
    jonw, Dec 5, 2013
    #13
  14. jonw

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    Then you should still look at CQC. WHile its not OS, you are free to create drivers (how it connects to devices/apps) yourself and the graphical side is all your own design. Its about as open as you can get without open source. This also deals with your second requirement re other open source solutions - as long as there is an API, CQC should be able to work with it.

    Do you actually get into the OS code and modify it yourself and then re-compile so it is your own custom build?

    Mick
     
    znelbok, Dec 9, 2013
    #14
  15. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Mick, thanks. I will look at CQC. The home automation software project has been on the back burner for a little while - I've had things like development approval and contacts to focus on!

    I do code a little. I'd prefer to find something that does (more or less) what I want without my having to modify it, but failing that, I'd be happy to invest some time in a flexible solution.

    Cheers,

    Jon
     
    jonw, Feb 7, 2014
    #15
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.