Integration with c-bus

Discussion in 'Third-Party Solutions' started by Carrera, Jan 18, 2017.

  1. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Fault

    Hi,

    I have decided to do a full rebuild of my PI and re-installation of homebridge. So hoping the fault will be resolved.

    The fault was noticed when I arrived home yesterday evening and my iPhone would not control any accessories.

    I was connected to home bridge but no control.

    I logged into my PI via SSH shut down the automatic Homebridge service and restarted within terminal to monitor the info as it happened.

    I was receiving the following message every 2 seconds:

    Mon, 06 Mar 2017 21:15:08 GMT cbus:client rx event { time: '20170306-211508', code: 754, processed: false, message: '//CLIPSAL/39 01711e50-e4dd-1034-a555-fc0da187b33b State=new Previous=sync Reason=Interface Closed', type: 'event', raw: '#e# 20170306-211508 754 //CLIPSAL/39 01711e50-e4dd-1034-a555-fc0da187b33b State=new Previous=sync Reason=Interface Closed' }.

    Maybe someone will understand the error message.

    Andy
     
    barranak, Mar 7, 2017
    #21
  2. Carrera

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    I think it will have something to do with your CGate setup.
     
    DarylMc, Mar 7, 2017
    #22
  3. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Cgate

    It was work ok for 2 days?
     
    barranak, Mar 7, 2017
    #23
  4. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Do you have more of an angle for me to look into.

    it was throwing and error for network 39 which is a wireless network at the bottom of the garden.
     
    barranak, Mar 7, 2017
    #24
  5. Carrera

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi Andy

    I don't know if this would be a problem or not and I am just asking.
    Since you run CGate on the pi I wonder if you made any changes to the CBus network units using CGate on a PC recently.

    Maybe someone can help me understand how that scenario will work out.
     
    DarylMc, Mar 7, 2017
    #25
  6. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Add Devices

    I have added a motion sensor to control under stairs cupboard light on my main network Id 254
     
    barranak, Mar 7, 2017
    #26
  7. Carrera

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi Andy
    If you havent already read it there is a manual for CGate which you should be able to find in your PC folder C:\Clipsal\C-Gate2

    Have you had a look at CGate console on the pi while it is running?
    Maybe that can give you some clues to what is going on.
     
    DarylMc, Mar 7, 2017
    #27
  8. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Well

    Having now rebuilt and installed every thing I am getting this message:

    cbus:client matched response '[100] 440 There is no tag database to perform this operation on'
     
    barranak, Mar 7, 2017
    #28
  9. Carrera

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi Andy
    I haven't got to the stage of running CGate on the pi and only have it running on Windows PC so I can't help you much there.
    I really do think there is a problem with the CGate database or the config.json.
    I'd take a break and wait for someone else to give some advice.
     
    DarylMc, Mar 7, 2017
    #29
  10. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Tag Database

    I have found the problem with in the C-Bus toolkit file directory

    C:\Clipsal\C-Gate2\tag there is a .xml file with the project name I moved that to the /usr/local/bin/cgate/tag directory of the cgate server on my pi

    I think that when new devices are added a updated .xml needs to be moved.
     
    barranak, Mar 7, 2017
    #30
  11. Carrera

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    andy, i have had this very same issue when there is contention over the PCI. make sure that you don't have a copy of CBus Toolkit running somewhere that has taken over the PCI.
     
    Last edited by a moderator: Mar 8, 2017
    simonhac, Mar 8, 2017
    #31
  12. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    Working

    Hi Simon,

    All is now work and has been stable for the last day and connected/re-synced when I returned home from work. Though a little slow.....

    I am going to be adding a new dimmer and lighting groups this weekend what is the correct way of making sure homebridge-cbus plugin sees the new devices. I had to move the tag database from my toolkit file directory to the Raspberry pi cgate directory. Should I do this again after configuring my network on toolkit?

    Is there a slow ramping function for the dimmer control as I wish to slowly ramp up my bedroom lights in the morning on a timer trigger control?

    Andy
     
    barranak, Mar 9, 2017
    #32
  13. Carrera

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    (i hate this forum software! just wrote a long response over the course of the day, only to be logged out with no restore! grumble grumble!)

    occasionally i've noticed long (2-5s) latency -- only to realise that i've accidentally disabled WiFi on my iPhone and it is instead controlling my house through the public internet via my appleTV. worth checking that you haven't turned WiFi off...

    i have stopped running C-Gate on my (virtual) windows box. i recommend that you disconnect from the local C-Gate and reconnect to your remote C-Gate (on you mac/*ux box) -- which can be done from the file menu in C-Bus Toolkit.

    that way you can centralise on a single tag database and never have to copy tag files around again.


    i've thought about this -- but i don't believe there's a perfect solution. as far as i can tell (and happy to be proven wrong) Siri/HAP does not support a 'fade' or 'ramp' modifier.

    a workaround would be to allow an optional attribute on an accessory of 'rampDuration'. when turning the dimmer load on/off it would ramp to the last level over the given time.

    there'd be no way to disable the ramping behaviour, but there'd be nothing stopping you from adding the same dimmer as two accessories -- one with a rampDuration, and one without.

    would that do? if you like this approach, please open an isssue on github and i'll get to it soon.

    cheers,
    simon
     
    simonhac, Mar 14, 2017
    #33
  14. Carrera

    barranak

    Joined:
    Apr 2, 2016
    Messages:
    17
    Likes Received:
    0
    Location:
    spalding
    rampDuration

    Hi Simon,

    Have upgraded to 0.5.9 the ramp duration works great will see in the morning how well it behaves under real schedule will let you know.


    Andy
     
    barranak, Mar 19, 2017
    #34
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.