Alexa controlled xAP

11 replies [Last post]
brett
Offline
Providence, United States
Joined: 9 Jan 2010

Its been a very long while since I've last posted.  Derek got me inspired to look at Alexa controllable xAP endpoints.  As a proof of concept I took the faxumo code and made a few very minor modifications to prove it can act as a bridge to control xAP too.

./fuaxmo.py

Alexa discover devices

<Wait 20s for it to find the fake control points fauxmo has created>

Alexa relay 1 on
Alexa relay 1 off

AttachmentSize
fauxmo.zip4.93 KB
derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Nicely done

Great job! This opens up a lot of new options.

We had talked about making this a Plugboard compatible affair - that would be the icing on the cake.

Derek.

kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013
Could be the holy grail to HAH

I spoke to Derek the other day regarding the Echo and Alexa and ordered one from Tesco (£40), I have only had it a day and I am quite impressed.

If this can be fully integrated with the HAH it would be a major step forward and I am sure would rekindle new/existing interest in the HAH.

Brett many thanks for your time and effort in this new endevour. 

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
excellent work as ever Brett

excellent work as ever Brett :)

BodgeIT
Offline
London, United Kingdom
Joined: 10 Jun 2010
gets a +1 from

gets a +1 from me...

...although I'm still trying to get full integration with node-red, I still can't get that MQTT gateway script to work!

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Another thanks

Just to add my tuppenceworth, now that Amazon have these back in stock (and a bit cheaper) I took delivery of one yesterday. Even SWMBO was impressed at how easily it all went together. She now has voice control of the heating and lights! Great job.

leighton.olds
Offline
Joined: 10 Nov 2012
Simply Brilliant!

It's great to have the MQTT gateway working. The possibilities are now endless. Awesome work Brett.

Has anyone else experienced problems using the gateway the other way around i.e. getting CurrentCost data into MQTT??

I successfully subscribed to dbzoo/livebox/CurrentCost/ch/1 using NodeRed but nothing goes through the gateway.

It works fine the other way MQTT to XAP.

 

I've been scratching my head on this for a days, any help would be appreciated.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Its been while a quite since

Its been while a quite since I looked at the xAP/MQTT gateway.  I too would have to spend some time looking at what I wrote.  

https://github.com/dbzoo/hah/blob/master/userapps/hah/xap-plugboard/samp...

leighton.olds
Offline
Joined: 10 Nov 2012
MQTT Gateway

Thanks for the fast reply Brett.

Are you able to point me in the right direction of how to launch the script with some debugging info so I can try and workout where it's failing?

BodgeIT
Offline
London, United Kingdom
Joined: 10 Jun 2010
Hi Everyone...so quiet in

Hi Everyone...so quiet in here these days.

Just in case anyone else trying to use the MQTTGateway to pass info out, I have finally gotten around to hacking it so that xAP msgs get sent to MQTT.

I'm now running HomeAssistant as main controller but I refuse to let my O2 Livebox or my Jogglers die.

HomeAssistant likes json, so I figured I don't really need xAP msgs in payload so I'm stripping it out and passing what's needed.

I have configured a load of MQTT sensors in HA and they are now reading all this lovely data!

I don't really listen for incoming MQTT msgs because I use the node-red-xap node to send xAP messages from HA via NodeRed to HAH

It's all a bit clunky but works.

Brett, I apologise in advance for making a mess of your nice code.

Best wishes to everyone, would love to hear what you're all doing now in life and on the HA front!

AttachmentSize
mqttxapGWApplet.lua 4.55 KB
allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
I'm still running my HAH, now

I'm still running my HAH, now with Alexa controlled devices via the fauxmo.py script. Makes it easy for SWMBO to interact with the HA system.

I still look in from time to time to see if anything is going on and also use the forum posts as a resource for remembering how it all works. (It needs very little intervention so it's easy to forget how it was all put together in the first place!)

I've never really looked at node red because it does everything I need at the moment - maybe I should explore the possibilities!

Still a great tool.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Any code that works is good

Any code that works is good code.   Nice one bodge.

I've not been doing too much on the HA front.  My day job has been sucking my time and life away.  The last little thing I did was to write some python that hacks the fauxmo.py code so I can turn my projector on and off with Alexa.  A piece of code that gets a regular work out.  It's funny, I look at how HA has evolved in the many years that have elapsed since the HAH/xAP got legs and its all still "ho-hum" compared we have.  I mean how simple and cool is LUA for scripting !

Hardware Info