Amazon Alexa

Discussion in 'Voice Control' started by mcsortan, Jul 8, 2017.

  1. mcsortan

    Mr Fun

    Joined:
    Oct 30, 2017
    Messages:
    5
    Likes Received:
    0
    Location:
    United Kingdom
    @ mcsorton

    Can I ask if you installed your own Cbus system.? I am new to all of this and have system, which I only need to change the name parameters on.

    Can you help?

    Thanks
     
    Mr Fun, Oct 31, 2017
    #21
  2. mcsortan

    Mr Fun

    Joined:
    Oct 30, 2017
    Messages:
    5
    Likes Received:
    0
    Location:
    United Kingdom
    Anyone help?
     
    Mr Fun, Nov 4, 2017
    #22
  3. mcsortan

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    Download toolkit from the CIS website and then connect to network. If you dont already have the project files ten you will have to rename all the groups.

    You thread title looks like spam and hence you are not getting any help as its not titled correctly nor is it in the correct location for the help your are requesting. Spend a bit of time reading to learn
     
    znelbok, Nov 4, 2017
    #23
  4. mcsortan

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    I have Alexa integrated with my C-Bus system. I'm running CGate on a Raspberry Pi with a USB CNI. I'm also running Mister House , a perl based open source home automation system, on the same Raspberry Pi. Misterhouse integrates with CBus and Alexa / Apple HomeKit / Google etc. Works well. Mister House appears to Alexa as a Phillips Hue, so you can use the same voice prompts, i.e. "Turn the deck light on" rather than "Tell something to turn the deck light on."

    I use Mister House to do my scheduling, e.g. turning lights on at dusk, reducing brightness on the hallway lights after the kids' bed time. It's also the glue between my ZWave door sensors and Cbus, so if I open my front door after dark, the outside lights come on (rather than waiting for me to walk in front of a motion sensor.)
     
    jonw, Nov 11, 2017
    #24
  5. mcsortan

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hi jonw
    Using a USB PCI with raspberry pi sounds a pretty cost effective and practical idea.
    I've not seen any instructions online for that.
    Do you have any links for how to set that up?
    How is it working for you?
    Does the pi keep a reliable link to the PCI via USB?
     
    DarylMc, Nov 11, 2017
    #25
  6. mcsortan

    theshepherdmatt

    Joined:
    Feb 6, 2017
    Messages:
    1
    Likes Received:
    3
    Location:
    Peterborough
    Yep, I've got it fully integrated via OpenHab and a Raspberry Pi.
    1. Install Cgate on your Pi - tutorial here
    2. Install Openhab on the same Pi - tutorial here
    3. Once you have both of those installed you need the cgate binding for openhab download it here
    4. Discover your cbus devices (things) on OpenHab
    5. Edit your 'items' files on OpenHab so they can be discovered on the Echo - instructions here
    6. Install the Openhab skill on Alexa - tutorial here
    I've used my raspberry pi with cgate and OpenHab to control my cbus network for over a year now and have never had any problems. I takes a while to get your head around OpenHab but they have a great community and people are always there to hold your hand. I'm a complete noob and not that technically minded but managed to get this all working with a little patience and self-learning.

    Anyone who wants any help with this let me know

    Cheers
    Matt
     
    theshepherdmatt, Dec 6, 2017
    #26
    Barry24, DarylMc and Ian like this.
  7. mcsortan

    discjockeyr

    Joined:
    Jan 9, 2007
    Messages:
    59
    Likes Received:
    0
    Anybody use an android tv box instead of raspberry pi? I know that you can install linux on android tv box so is there any reason that the android tv box cannot work like raspberry?
    Thanks
     
    discjockeyr, Dec 6, 2017
    #27
  8. mcsortan

    MHeaton

    Joined:
    Apr 22, 2008
    Messages:
    106
    Likes Received:
    2
    Location:
    London
    I have been looking at what would be needed to get Alexa working with CBUS I believe that the following user stories would need to be implemented on a public web-site (that could handle any and all users of CBUS):

    • A user logs-in to Amazon Alexa, selects the CBUS skill and authenticates onto the website using OAUTH to obtain a session ID
    • A user logs-in the website and configures their profile with one or more sites. Each site is associated with a public IP address, port, username and password. Note end user will need to expose C-GATE via their firewall and lock it down. Ideally we would use OAUTH on the C-GATE server itself so as to not need to pass credentials around.
    • A logged in user initiates a site synchronisation which:
      • connects to the C-GATE server,
      • pulls the tag database and caches it as part of the site configuration,
      • parses it and extracts the relevant lighting, trigger, media, air-conditioning and control groups.
    • If new devices are detected the website offers the user the ability to configure ‘locations’. This would, for example, allow the phrase ‘light in the kitchen’ to be associated with a specific CBUS Group address.
    • The Lambda code authenticates the user and obtains the credentials for the C-Gate server from the public website which it then connects to and translates the messages between the protocols. Again we may need to cache the derived location data here.
    It would make the most sense if Clipsal were to host the website not us!

    I also see a security challenge between needing to pass credentials for C-Gate from the new site to the Amazon code but think that, for latency reasons, the website shouldn't be a man-in-the-middle. Clearly remote access could be limited to the AWS IP address ranges.

    can we do this collaboratively? Anyone else interested?

    Mark
     
    MHeaton, Dec 21, 2017
    #28
  9. mcsortan

    Andrew Rowe

    Joined:
    Jan 4, 2018
    Messages:
    6
    Likes Received:
    1
    Agree almost 100% with this assessment - I have a fully working Alexa integration with my own C-Bus system that is largely designed along these principles. All code is in C# which I have written myself. The code knows nothing at all about my own lighting system and discovers it all at runtime. In theory this means it should not have a problem working on other systems, but I have not had an opportunity to test this.

    In my implementation, the OAUTH server is held in Microsoft Azure and the C-Gate server is not exposed to the internet, but hidden behind a WebAPI service running on a PC that I have configured my router to expose. I intend to eliminate the WebAPI service and ultimately connect directly to C-Gate, but there are security concerns to sort out. I agree that latency is an issue - my Lambda function is in the free tier and more often that not requires a few seconds to "spin up". This occasionally results in the whole operation taking longer than 8 seconds and Alexa responds by saying "the remote server is not responding" (or words to that effect). In all cases so far the intended action (light on or off) was successfully performed.

    Andrew
     
    Andrew Rowe, Jan 4, 2018
    #29
    Nannerbm60 likes this.
  10. mcsortan

    Nannerbm60

    Joined:
    Jan 20, 2018
    Messages:
    3
    Likes Received:
    0
    Great to see these links ... I have a couple of questions for refining my solution now that the Alexa skills are a bit more mature ... I have a Wiser2 C-Bus system for lights and a Somfy (mylink Asia) system for blinds [no Alexa Skill :-( yet] and an Echo-Plus (nice). ... I was planning to use OpenHab 2 on a spare macmini. ...

    any thoughts or experience on straightlining the solution?

    My C-Bus and Wiser2 were installed by an electrician ... it seems a bit OTT for the house, but it is “in the walls, so, I plan to run with it.

    Mike
     
    Nannerbm60, Jan 20, 2018
    #30
  11. mcsortan

    LC79

    Joined:
    Feb 11, 2018
    Messages:
    3
    Likes Received:
    1
    I am based in Sydney and bought an Echo Dot today and managed to get cgate working on the pi and connecting to my C-BUS network via usb to serial adapter, unfortunately the openhab skill is not available in Australia. Tried changing location on the alexa app and still could not find the openhab skill. Any thoughts on how to get around this or perhaps use another method?
     
    LC79, Feb 11, 2018
    #31
  12. mcsortan

    Andrew Rowe

    Joined:
    Jan 4, 2018
    Messages:
    6
    Likes Received:
    1
    I'm not familiar with any of the commercially available solutions as when I began this process I just assumed (wrongly as it turns out) that there weren't any. As a developer, I just went ahead and wrote a solution that works generically (in that it makes no assumptions about my network) and stopped when it was all working. My Alexa skill is private as it's still in Dev mode as far as Amazon are concerned. If you find you're stuck and can't get a commercial solution to work, or find one that suits your needs, I'd be happy to share code and know-how if you want to have a go at implementing your own copy of what I have. Alternatively, I could try to make my skill public by completing the Amazon approvals process, but as a UK user I don't know what would be involved in getting it published in Australia (but it might be dead simple for all I know).
     
    Andrew Rowe, Feb 12, 2018
    #32
  13. mcsortan

    LC79

    Joined:
    Feb 11, 2018
    Messages:
    3
    Likes Received:
    1
    Hi Andrew, thank you for your reply and yes i would be interested, will send you a PM with contact info.
    Also found this youtube video of what looks like a very nice and responsive setup

     
    LC79, Feb 12, 2018
    #33
  14. mcsortan

    Nannerbm60

    Joined:
    Jan 20, 2018
    Messages:
    3
    Likes Received:
    0
    Hey Andrew - Are you willing to share your code? ... I’d like to see if it will work under the wiser2 ... Else I will go the Mark Heaton route ... or wait until Somfy comes up to speed in “Asia: and gives us a Somfy skill in Australia

    Thx
     
    Nannerbm60, Feb 21, 2018
    #34
  15. mcsortan

    Andrew Rowe

    Joined:
    Jan 4, 2018
    Messages:
    6
    Likes Received:
    1
    I'm not sure what you mean by "work under the wiser2" - I have a Wiser2 on my network, I bought it to replace my 5500CN that unceremoniously dropped dead one day. In my case, the Wiser is being utilised only as a CNI. My code talks to a C-Gate2 service (running on a Raspberry PI), and is not directly aware that a Wiser is involved. My code library is C# and works in any environment that supports .Net Core. This means it will run on a Windows PC, Windows Phone and Windows IoT (tried all these), also Android (I'm working on a phone app now) and in the AWS Lambda environment (which is where Alexa skills reside). I'd be happy to share my code library (I've never posted to GitHub before, but I'm looking into it). A code library on it's own though is not much use unless you're a programmer and are willing to write an app to use it.

    I'm aware that the Wiser 2 does provide some form of execution environment (and I think it's basically an Android device). I see from the blurb that came with it that you can customise it with Clipsal's PICED software, but I've not tried this at all.

    Regards,
    Andrew
     
    Andrew Rowe, Feb 21, 2018
    #35
  16. mcsortan

    fredinver

    Joined:
    Apr 7, 2011
    Messages:
    7
    Likes Received:
    1
    Location:
    South Gippsland
    Hi, I have followed the instructions and have no connection from Openhab2 to Cbus. Running cgate on a RPi3 and can connect from toolkit to the RPi and see my cbus system completely. I cannot get the cgate thing to connect in openhab. Using the same IP address and port 20123 but get an "uninitialised-handler-initiation error" used netstat to see the connection is established when using toolkit but no connection is present when using openhab.

    ANy help appriciated
     
    fredinver, Mar 2, 2018
    #36
    Nannerbm60 likes this.
  17. mcsortan

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,319
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    What IP address is openhab looking for the CGate connection on?
    Just a guess by me but I think if both are running on pi it should be 127.0.0.1
     
    DarylMc, Mar 2, 2018
    #37
  18. mcsortan

    fredinver

    Joined:
    Apr 7, 2011
    Messages:
    7
    Likes Received:
    1
    Location:
    South Gippsland
    I have tried many, both the lan ip and wifi ip and now 127.0.0.1 and ports 20123, 20023 and 10001. and combinations of the above. Both Cgate and openhab are running on the pi.
    I have also started cgate service many times and prove it is running with toolbox.
    access/txt file is as follows
    ##C-Gate Server Access Control File
    ## This file was written automatically by a command issued to the server
    x## Created:Tue Oct 05 16:22:26 CST 2004
    ## File name: C:\clipsal\c-gate\config\access.txt
    interface 0:0:0:0:0:0:0:1 Program
    interface 127.0.0.1 Program
    interface localhost Program
    ## interface 192.168.178.25 Program
    ## remote 192.168.178.104 Program
    remote 192.168.178.106 Program
    ## End of access control file
    CNI is on 192.168.178.25
    Pi is at 192.168.178.106 wifi or .104 lan
     
    fredinver, Mar 3, 2018
    #38
  19. mcsortan

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    323
    Likes Received:
    5
    Location:
    FNQ
    Hi fredinver.

    DJust a thought - did you edit cgate's config.txt file to load and start your project at startup?
     
    Mr Mark, Mar 4, 2018
    #39
  20. mcsortan

    Shovelhead

    Joined:
    May 12, 2009
    Messages:
    16
    Likes Received:
    0
    Hi Matt, openhab "Things" CGATE connection online but for the life of me unable to get the "Things" Cbus Network to connect.
    Just sits there trying to initialise. Spent all day on this, is there something I'm missing. Project name as in the Toolkit file, Network ID as per default value 254.
    Appreciate any support you could offer
     
    Shovelhead, Mar 6, 2018
    #40
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.
Similar Threads
Loading...