Alexicz - FREE Domoticz to Alexa Integration

Alexa, Google Home and Siri

Moderator: leecollings

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 »

Hi,

If you're having empty devices on your french Amazon account, it seems your default region/country is not set to FR.
Here is my information regarding the region :
Amazon-Region.png
Amazon-Region.png (47.33 KiB) Viewed 1731 times

And i can see my devices as well :
Amazon-Devices.png
Amazon-Devices.png (161.95 KiB) Viewed 1731 times

When i'm logging to alexa.amazon.com, Amazon is redirecting me to alexa.amazon.fr and asking to login again to the french site.

In order to solve your issue, you can try to transfert your account :
https://www.amazon.com/gp/help/customer ... =201248840

Or you can leave your account in the US and set the lambda in the US as well as it was working for other users :
trueblueswede wrote: Saturday 08 December 2018 11:41 @Damsee: I got it to work now, Very nice! In case someone runs into the same problem as I did here is what resolved my issues.
For some reason, it did not work to set the skill Language to EN(UK) and host the function in Ireland.
I exported the function and deployed it to Us(Virginia) and created a new skill with Language EN(Us) and voila it started to work.
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 »

Oki get it now, everything was indeed registered on amazon.com with default region set to France. That’s why it confused me. I have transfered my devices to amazon.fr now. No idea why it was registered on the .com. Might be the time i tried the kindle app on my ipad that is set to US/english. Now i just need to get the skill back. Thank you.
Last edited by DrMacabre on Sunday 22 December 2019 12:46, edited 2 times in total.
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 »

You shouldn't have to recreate everything...

Once logged through AWS, you should be able to find your lambda function ; please check again your region (EU / Ireland) following the latest Amazon documentation : https://developer.amazon.com/en-US/docs ... uages.html

Once logged through https://developer.amazon.com/alexa/console/ask, you should be able to find your skill.
You can edit it and change the language if needed.

Since you recreated everything, it should be working with an ARN starting with arn:aws:lambda:eu-west-1...
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 »

It worked. Thanks for your help, sorry for bringing the same problem as other users earlier in this topic. I have no idea why everything was registering at amazon.com but still set to France which led to some confusion. May be because i use english/us localization on all my devices here, amazon must have assumed at some point i was in the US.
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 »

Glad you were able to set it up & running :D

Amazon accounts management is a mess...
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 »

May be this has been discussed before but all my on/off switch are recognized as dimmer. Is this normal behavior ?
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: Sunday 22 December 2019 15:14 May be this has been discussed before but all my on/off switch are recognized as dimmer. Is this normal behavior ?
It might be depending your devices. Alexicz is checking your device properties and set them as dimmable if it finds "HaveDimmer=true".
I have some wall plugs which are not dimmable but the property is true so they appear as dimmer in Alexa ; no worry for me.

Good thing with Alexicz is that you can change the code for your own needs.
Feel free to comment lines 346 to 348 in DomoticzHandler.py file if you dislike that behavior (and remove/rediscover your devices through Alexa).
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 »

philchillbill wrote: Sunday 03 February 2019 19:40 It's already implemented in the release code on Github (not in the master branch) so if you copy the 2 python files from that download you should be good to go. It's here:

https://github.com/rimram31/dz_smarthom ... g/dev-phil
Hello Phil, could you explain a little bit more about how to deploy this ? I have copied the 2 .py from your build into my alexciz but so far, all i can do is turning on and off my LMS players. Is there something else to do to have this working ?
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 should be able to use commands like next, previous, pause, play and stop. If you have a player called bedroom, for example, try 'Alexa, next track on bedroom' or 'Alexa, stop bedroom'. The interfaces I added are defined as:

self.addCapability(AlexaStepSpeaker(self, 'Alexa.StepSpeaker'))
self.addCapability(AlexaPlaybackController(self, 'Alexa.PlaybackController',supportedOperations=['Play','Pause','Stop','Next','Previous']))

check the online docs for those interfaces for the form of the commands.
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 »

Seems like its not properly discovered, it's a switch here.

"endpointId": "SwitchLight-184",
"friendlyName": "LMS Bedroom",
"description": "Lighting 2",
"manufacturerName": "Logitech Media Server",
"displayCategories": [
"LIGHT"
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 »

DrMacabre wrote:Seems like its not properly discovered, it's a switch here.

"endpointId": "SwitchLight-184",
"friendlyName": "LMS Bedroom",
"description": "Lighting 2",
"manufacturerName": "Logitech Media Server",
"displayCategories": [
"LIGHT"
If you have Domoticz set to French then the strings will not match against the discovery code which only expects English strings. I bet if you switch Domoticz to English and re run Alexa discovery, all will be well.


Sent from my iPhone using Tapatalk
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: Tuesday 24 December 2019 20:47 If you have Domoticz set to French then the strings will not match against the discovery code which only expects English strings. I bet if you switch Domoticz to English and re run Alexa discovery, all will be well.


Sent from my iPhone using Tapatalk
Nope, domoticz is in english here :/
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 »

Can you post the JSON result from doing a http://your_domoticz_ip:8080/json.htm?type=devices&rid=IDX, where IDX is the IDX of one of your Squeezeboxes in Domoticz? That will help with figuring out how to modify the discovery code to make it work for you.
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 »

sure.

{
"ActTime" : 1577742186,
"AstrTwilightEnd" : "18:58",
"AstrTwilightStart" : "06:48",
"CivTwilightEnd" : "17:39",
"CivTwilightStart" : "08:07",
"DayLength" : "08:19",
"NautTwilightEnd" : "18:19",
"NautTwilightStart" : "07:26",
"ServerTime" : "2019-12-30 22:43:06",
"SunAtSouth" : "12:53",
"Sunrise" : "08:43",
"Sunset" : "17:02",
"app_version" : "4.11590",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Augustus Pablo - East Of The River Nile (2003)",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 1,
"HardwareID" : 7,
"HardwareName" : "Logitech Media Server",
"HardwareType" : "Logitech Media Server",
"HardwareTypeVal" : 60,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0000007",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2019-12-30 22:42:15",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 15,
"Name" : "LMS Bedroom",
"Notifications" : "false",
"PlanID" : "4",
"PlanIDs" :
[
4
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Playing",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "AC",
"SwitchType" : "Media Player",
"SwitchTypeVal" : 17,
"Timers" : "false",
"Type" : "Lighting 2",
"TypeImg" : "LogitechMediaServer",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "286",
"YOffset" : "364",
"idx" : "184"
}
],
"status" : "OK",
"title" : "Devices"
}
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 »

Based on your JSON, the code should work as-is. In DomoticzHandler.py, on line 456 we have

Code: Select all

                    elif (switchType.startswith('Media Player')) and (device['HardwareType'].startswith('Logitech')):
                        endpoint = LMSAlexaEndpoint("LMS-"+endpointId, friendlyName, description, manufacturerName)
                        endpoint.addCapability(AlexaStepSpeaker(self, 'Alexa.StepSpeaker'))
                        endpoint.addDisplayCategories("SPEAKER")
The conditions in the elif match correctly. Are you sure you have the dev-phil release from https://github.com/rimram31/dz_smarthome/releases, because my code is not in the other versions...
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 »

Yes, I’m 100% sure i have grabbed the py from your release and uploaded it to my function... anyway now the players are gone and i have tried everything to get them back with no success.
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 have released a smart home skill for LMS that handles everything my branch of Alexicz did for LMS, and more. The details are at

https://forums.slimdevices.com/showthre ... -for-Alexa

Rather than effectively using Domoticz as a proxy to reach LMS, it uses a direct proxy to LMS to be able to use the jsonrpc interface of LMS more widely. The post above explains it all, including how to link the skill. No developer account needed.

EDIT: It's also available in French (pour nos amis francophones)
Last edited by philchillbill on Thursday 16 January 2020 19:57, edited 2 times in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by sammyke007 »

I have been a very happy Controlicz user for a year. It works great with great support from the dev. I just setup Alexicz. Are there any disadvantages when using Alexicz?

Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk


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 »

sammyke007 wrote: Tuesday 07 January 2020 22:57 I have been a very happy Controlicz user for a year. It works great with great support from the dev. I just setup Alexicz. Are there any disadvantages when using Alexicz?
Well, it's unsupported so there's no helpdesk and development has stopped too as rimram31 moved on to greater things. The newer smart home interfaces like Range, Mode and Toggle were never implemented in Alexicz. That said, you get the source code so you can do it yourself. In the end, everything Alexa is just moving JSON back and forth...
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
tarmacalastair
Posts: 94
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by tarmacalastair »

Hello,
Love the idea of setting this up but Amazon has changed so many of the steps such that the instructions in the PDF are quite out of date now and hard to follow. I will try and update them if I ever get this working.

For now, I've just got to the end of P.14 in the PDF where it says "Congrats: You've done it..." Next it says
Open Alexa app or alexa.amazon.com
Click Skills, then Your Skills
Click Dev Skills - this is where I get stuck. neither my Android Alexa app, nor the website has a button, menu, or anything called Dev Skills.

Any suggestions please?

Thanks.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest