Alexicz - FREE Domoticz to Alexa Integration

Alexa, Google Home and Siri

Moderator: leecollings

traolo
Posts: 13
Joined: Friday 22 November 2019 20:40
Target OS: -
Domoticz version:
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by traolo »

philchillbill wrote: Tuesday 26 November 2019 21:32 To make sure you are reporting EndpointHealth, the following changes need to be made to the Lambda files:

In AlexaSmartHome.py. add:

Code: Select all

@INTERFACES.register('Alexa.EndpointHealth')
class AlexaEndpointHealth(AlexaInterface):
    def name(self):
        return 'Alexa.EndpointHealth'

    def propertiesSupported(self):
        return [{'name': 'connectivity'}]
At the top of the method serializeProperties, under the 'for prop in self.propertiesSupported():', after 'prop_name = prop['name']', add

Code: Select all

            if prop_name == 'connectivity':
                prop_value = { 'value': 'OK' }
Finally, in DomoticzHandler.py, close to the start of the file and immediately under 'class DomoticzEndpoint(AlexaEndpoint):' add the following:

Code: Select all

    def __init__(self, endpointId, friendlyName='', description='', manufacturerName=''):
        super().__init__(endpointId, friendlyName, description, manufacturerName)
        self.addCapability(AlexaEndpointHealth(self, 'Alexa.EndpointHealth',[{'name': 'connectivity'}]))
        self._device_ = None
After doing that, do a device discovery to add this new capability to all your endpoints. Without it, change reports work in routines but you cannot ask if a door is open or closed. With it, you can ask "Alexa, is the front door open" and get a spoken response "Front door is closed". :mrgreen:
All done! It seems to work since at the device discovery the new capability is displayed! I cannot test the functionality to ask about the device, but the routine is working very well!!!!!

Thank @phill for your support!
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by philchillbill »

You’re welcome. So your contact sensors are now successfully triggering routines? Did you have to change locale to en-US or is Italian working too?


Sent from my iPhone using Tapatalk
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
traolo
Posts: 13
Joined: Friday 22 November 2019 20:40
Target OS: -
Domoticz version:
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by traolo »

philchillbill wrote: Thursday 05 December 2019 23:11 You’re welcome. So your contact sensors are now successfully triggering routines? Did you have to change locale to en-US or is Italian working too?


Sent from my iPhone using Tapatalk
Yes, the contact sensors are working successfully and I'm currently using the it-IT locale! 8-)
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by philchillbill »

That's great to hear. It does mean that Amazon have not updated their online docs again...
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
vco1
Posts: 16
Joined: Monday 12 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by vco1 »

Alexicz has been (and still is) working fine here for some months. Yesterday I added 2 new switches to Domoticz (same type as some other z-wave switches I'm using). These are working fine in Domoticz, but are not found when I search for new devices within the Alexa app or website.
As said, there are no issues with existing switches, just the new ones not being found. Any pointers as what could be wrong or where I should look to better understand what's (not) happening?
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by philchillbill »

You did say ‘Alexa, discover devices’ after adding them?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
vco1
Posts: 16
Joined: Monday 12 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by vco1 »

philchillbill wrote: Friday 13 December 2019 13:54 You did say ‘Alexa, discover devices’ after adding them?
Yes. many times. On different Echo's.

And some additional information. I just changed configdz.json to include Scenes and Groups. Only did this to see if discovery was working at all. And much to my surprise, the Alexa app did dicover the Scene that I have defined in Domoticz but wasn't previously added to Alexa (since includeScenesGroups was set to false before). So discovery seems to be working. But not for the 2 new switches. Seems strange to me. But I'm probably missing something.
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by philchillbill »

There must be something in their names or description or room inclusion that’s causing them to be skipped over. If you look at the JSON response returned by those devices in the browser with &rid= then how would the discovery code in DomoticzHandler.py process them?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
tmh88
Posts: 19
Joined: Friday 15 November 2019 22:54
Target OS: Windows
Domoticz version: 2020.1
Location: UK
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by tmh88 »

vco1 wrote:Alexicz has been (and still is) working fine here for some months. Yesterday I added 2 new switches to Domoticz (same type as some other z-wave switches I'm using). These are working fine in Domoticz, but are not found when I search for new devices within the Alexa app or website.
As said, there are no issues with existing switches, just the new ones not being found. Any pointers as what could be wrong or where I should look to better understand what's (not) happening?
Did you remember to add them to a room plan & add them to alexicz account that Amazon acsess in domoticz

Sent from my SM-N950F using Tapatalk

vco1
Posts: 16
Joined: Monday 12 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by vco1 »

tmh88 wrote: Friday 13 December 2019 20:10 [Did you remember to add them to a room plan & add them to alexicz account that Amazon acsess in domoticz
That was it! Alexa now discovered the new devices. Still having some issues (like Alexa being unable to switch them on/off) but that will hopefully be a detail. Thanks for your help!
tmh88
Posts: 19
Joined: Friday 15 November 2019 22:54
Target OS: Windows
Domoticz version: 2020.1
Location: UK
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by tmh88 »

vco1 wrote:
tmh88 wrote: Friday 13 December 2019 20:10 [Did you remember to add them to a room plan & add them to alexicz account that Amazon acsess in domoticz
That was it! Alexa now discovered the new devices. Still having some issues (like Alexa being unable to switch them on/off) but that will hopefully be a detail. Thanks for your help!
Glad I could help, cought me out a few times

Sent from my SM-N950F using Tapatalk

DrMacabre
Posts: 71
Joined: Monday 26 December 2016 16:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by DrMacabre »

hello,

finaly got passed the test button in aws but what happens next ? i managed to turn my test light on but i'm confused about what do to after that. Alexa app or website doesn't discover any device.
Damsee
Posts: 58
Joined: Thursday 20 April 2017 1:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by Damsee »

DrMacabre wrote: Friday 20 December 2019 16:26 hello,

finaly got passed the test button in aws but what happens next ? i managed to turn my test light on but i'm confused about what do to after that. Alexa app or website doesn't discover any device.
Hi there,

Successful test is meaning that your lambda and DZ access are OK.
In order to have Alexa discover your device, please check the following :
1. Your devices are included in a DZ plan,
2. Your devices are available to the DZ user you set in the lambda conf file,
3. Check your Amazon / Alexa account / region :
> https://www.amazon.com/gp/help/customer ... =201248840
> https://transferwise.com/us/blog/amazon-change-country

Hope that helps :)
RPI3 Raspbian Buster + Domoticz v2020.1 stable + RFXtrx433E + Z-Stick Gen5 + Amazon Echo (alexicz)
x5 THGN810 / x5 ZMNHJD1 / x2 Flood sensor FGFS101 / x1 Smoke sensor FGSD002
x1 ZMNHAD1 / x2 FGS213 / x3 Wallplug FGWPE/F / NodOn Soft remote CRC-3-6-0
DrMacabre
Posts: 71
Joined: Monday 26 December 2016 16:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by DrMacabre »

Damsee wrote: Saturday 21 December 2019 12:49 Hi there,

Successful test is meaning that your lambda and DZ access are OK.
In order to have Alexa discover your device, please check the following :
1. Your devices are included in a DZ plan,
2. Your devices are available to the DZ user you set in the lambda conf file,
3. Check your Amazon / Alexa account / region :
> https://www.amazon.com/gp/help/customer ... =201248840
> https://transferwise.com/us/blog/amazon-change-country

Hope that helps :)
Hello, thanks. Point 1 & 2 are ok, what region should my account be set to ? Ireland as aws or something else ?
Damsee
Posts: 58
Joined: Thursday 20 April 2017 1:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by Damsee »

Depending & regarding your own location and Amazon account : please check chapter 5.2 of Alexicz documentation.
Setting your lambda in Ireland involves that :
> your endpoint should be Europe or India,
> your skill language should be one of the following : English (UK), English (IN), French (FR), German, Italian, Spanish (ES)
> your Amazon account should be set to the country according the language you set (see previous link to check or change your country/region of your amazon account)
RPI3 Raspbian Buster + Domoticz v2020.1 stable + RFXtrx433E + Z-Stick Gen5 + Amazon Echo (alexicz)
x5 THGN810 / x5 ZMNHJD1 / x2 Flood sensor FGFS101 / x1 Smoke sensor FGSD002
x1 ZMNHAD1 / x2 FGS213 / x3 Wallplug FGWPE/F / NodOn Soft remote CRC-3-6-0
DrMacabre
Posts: 71
Joined: Monday 26 December 2016 16:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by DrMacabre »

I set it to ireland in aws as per the documentation, doesn’t seemed to work otherwise when i first tried with aws set to EU Paris by mistake. Something was missing and i couldn’t go any further when following the documentation. Now it’s unclear, what region should i use since ireland is definitely not part of the choice amazon is offering me. My first guess would be to choose uk but im not sure i completely understand the whole concept of language and region here :/

Edit: my mistake, there is ireland available in the device location (currently using the app for testing the whole thing)
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by philchillbill »

I think Ireland will match best if u you sure choosing en-GB or fr-FR as skill language. If you choose en-CA, en-US or fr-CA as your language (I’m guessing you’re in Canada) then one of the US East locations would be better.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
DrMacabre
Posts: 71
Joined: Monday 26 December 2016 16:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by DrMacabre »

philchillbill wrote: Saturday 21 December 2019 19:53 I think Ireland will match best if u you sure choosing en-GB or fr-FR as skill language. If you choose en-CA, en-US or fr-CA as your language (I’m guessing you’re in Canada) then one of the US East locations would be better.
Actually I’m in France but i have to use US or UK localization in order to get another skill to understand my commands, yours actually (logitech media server) ;) i have tried to make it work with canada french/english but alexa doesn’t seem to recognize any of the command so I’m back with UK. Back to alexciz, I’m stuck with english UK i guess since i want to use LMS and Kodi on top of domoticz. How do you guys use alexa in France ?
Damsee
Posts: 58
Joined: Thursday 20 April 2017 1:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by Damsee »

So you're definitely running into location/region issue...

I'm in France as well :
> Set lambda in Ireland,
> Set my Amazon account in France, using french language,
> I'm not using LMS nor Kodi (with DZ at least)
I'm using a Harmony Hub and the skill is not available in french so i discovered the hub through DZ and i can change the activity through Alexicz.
There is much less options than the original skill (i can not control channel nor volume) but i guess but that's enough for me.

Please check and fix your region once logged into your Amazon account and then through the different menus :
> Votre compte
> Gérer votre contenu et vos appareils
> Préférences
> Paramètres de pays/région
You can therefore change it accordingly your needs ;)
RPI3 Raspbian Buster + Domoticz v2020.1 stable + RFXtrx433E + Z-Stick Gen5 + Amazon Echo (alexicz)
x5 THGN810 / x5 ZMNHJD1 / x2 Flood sensor FGFS101 / x1 Smoke sensor FGSD002
x1 ZMNHAD1 / x2 FGS213 / x3 Wallplug FGWPE/F / NodOn Soft remote CRC-3-6-0
DrMacabre
Posts: 71
Joined: Monday 26 December 2016 16:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: France
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by DrMacabre »

i’ve been deregistering and registering my alexa app and my echo device a couple of time, it seems to go back to amazon.com all the time. When i look at my devices on amazon.fr, it’s empty or just send me to the kindle content. There is actualy no way to get the devices list on amazon.fr. when i connect to the same area on amazon.com (from the link you provided a couple post above), i see my ipads, android and echo devices which is pretty weird since i’ve allways been registered on amazon.fr. Even my location on amazon.com is set to France so i really don’t understand.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest