Alexicz - FREE Domoticz to Alexa Integration

Alexa, Google Home and Siri

Moderator: leecollings

fac13
Posts: 7
Joined: Monday 28 April 2014 14:08
Target OS: Linux
Domoticz version:
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by fac13 »

Hi,

It may not be related to your problem, but after several years of using Alexicz I find today that I can no longer add new devices.

Exsiting devices can still be controlled, and it isn't more than a couple of weeks since I last added a new device successfully.

I usually just ask "Alexa discover devices" but now when I do that she doesn't disvoer any.

I haven't changed my lambda code recently, nor have I updated domoticz recently.

What may be highly significant is that the dialogue to add new devices through the Alexa app *has* changed a great deal recently.

It now asks you what type of device you want to add, and offers options like Bluetooth, Zigbee, Wifi etc. If you say "other" it now says you have to set up your device first in your smart devices app. Not possible with Alexicz of course.

I'm not particularly competent to debug what is happening, and I'm not going to have time to look at this much further for a few days at least, so I'm stuck and just putting this here in the hope it will kick off a discussion.
User avatar
philchillbill
Posts: 399
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 my own fork of Alexicz to which I added a lot of extras 3 years ago and it still discovers everything fine. The only recent change I can see on Amazon's side is that some interfaces have become version 3.x instead of 3. See https://developer.amazon.com/en-US/docs ... ity-object.

Are you looking in the Cloudwatch logs for the skill to see what the error might be?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
fac13
Posts: 7
Joined: Monday 28 April 2014 14:08
Target OS: Linux
Domoticz version:
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by fac13 »

Yes, checking the logs will be the first thing I'll be doing but Christmas will be keeping me busy for the next few days.

It's good to know discovery is still working in your skill, it suggests nothing major has changed and I should be able to fix mine.
User avatar
philchillbill
Posts: 399
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 »

xavierlp wrote:Hello all,

As you maybe know, Controlicz will be discontinued at the end of 2023.

So I would like to have a look on Alexicz. I could discover that the project is not supported.

I followed to How to , and I can not discover my devices.

If I made a test on AWS console I've got this error

{
"errorMessage": "'directive'",
"errorType": "KeyError",
"requestId": "b72988b4-04c0-4fe0-bbbd-9464317feebe",
"stackTrace": [
" File \"/var/task/lambda.py\", line 49, in event_handler\n response = AlexaSmartHome.handle_message(dzRemote, request)\n",
" File \"/var/task/AlexaSmartHome.py\", line 320, in handle_message\n message = message[API_DIRECTIVE]\n"
]
}

the code is

dzRemote = DomoticzHandler.Domoticz(config.url, config.username, config.password)
dzRemote.configure(config)
response = AlexaSmartHome.handle_message(dzRemote, request)

The 3 variables are correct - I use the same with contrloicz without issues.

Have you got any ideas on how I can troubleshoot this error.

Thanks a lot
May I ask where you got the news about Controlicz being discontinued?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
JimmyH1969
Posts: 153
Joined: Tuesday 28 June 2016 16:38
Target OS: Windows
Domoticz version: Beta
Location: Amersfoort NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by JimmyH1969 »

By e-mail:
Dear Controlicz user - It is with sadness that i will be closing down Controlicz at the end of 2023.
The demands on managing the constant changes of Alexa, Google and Domoticz, and ensuring you get a fully functioning voice experience are proving too much to keep on top of.

For you annual subscribers, your subscription will now expire when the time is up, rather than auto-renew. You can, if you wish, resubscribe on a monthly payment until the end of 2023.

Controlicz will be operating as it is now, but i won't be adding any new features, or reflecting any changes from Domoticz.
Controlicz is aligned to the current Stable Domoticz version V2022.2. Controlicz is not responsible for any future breaking changes introduced by Domoticz.

All the best for 2023, Nick
IanDury
Posts: 47
Joined: Wednesday 08 April 2015 15:22
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by IanDury »

I'm in the same boat. Have been using Controlicz since the early days with great satisfaction.

I've followed the excellent Alexicz Howto (R3 version) but noticed that one important instruction was missing (change the Lambda handler function to lambda.event_handler). After the handler change it works fine for me.
fac13
Posts: 7
Joined: Monday 28 April 2014 14:08
Target OS: Linux
Domoticz version:
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by fac13 »

I got round to investigating this. I looked through my code and I pored over the logs. And then I realised the reason why my new device wasn't being detected as scores have been previously - I hadn't added it to a roomplan yet. Feeling very silly :oops:
User avatar
philchillbill
Posts: 399
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 »

fac13 wrote:I got round to investigating this. I looked through my code and I pored over the logs. And then I realised the reason why my new device wasn't being detected as scores have been previously - I hadn't added it to a roomplan yet. Feeling very silly :oops:
Can happen to the best of us Image At least you found it. I removed the need for roomplan inclusion in my fork so it never occurred to me to suggest that as the reason Image
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
DrMacabre
Posts: 74
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,

Here all the devices are dead since 24h, server unresponsive, is alexicz dead or is it just me?
IanDury
Posts: 47
Joined: Wednesday 08 April 2015 15:22
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by IanDury »

Used Alexicz 3 hours ago to switch off my home office heater and audio amplifier. Worked fine.
DrMacabre
Posts: 74
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 »

IanDury wrote: Thursday 12 January 2023 22:29 Used Alexicz 3 hours ago to switch off my home office heater and audio amplifier. Worked fine.
ok thanks, anyone have any idea why my server is unresponsive from here ? i checked aws, everything still in place, i did a few domoticz update and a couple of restart but still nothing. First time this happens since i'm using alexa and domoticz.

I tried removing a couple of device from alexa, i'm no longer able to add anything back.

Other skills like kanzi which is on the same aws account are working fine so it must be something broken in domoticz. Everything works fine when using the remote of course, only alexa doesn’t connect to my domoticz anymore.
DrMacabre
Posts: 74
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 »

Found my issue, i had to switch "Allow Basic-Auth authentication over plain HTTP (API only)." on in the security tab.

Seems like this is not a new security option so i wonder why all of a sudden, i needed to enable it.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by kiddigital »

It is a new option introduced in one of the latest Beta’s.

You should consider making your Domoticz only accessible from the outside over HTTPS (and not plain HTTP as you do now, hence you had to enable this setting). Without HTTPS, your username/password to access domoticz goes over the internet unencrypted and can be intercepted.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
DrMacabre
Posts: 74
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 »

kiddigital wrote: Friday 13 January 2023 6:59 It is a new option introduced in one of the latest Beta’s.

You should consider making your Domoticz only accessible from the outside over HTTPS (and not plain HTTP as you do now, hence you had to enable this setting). Without HTTPS, your username/password to access domoticz goes over the internet unencrypted and can be intercepted.
by not new i mean its been introduced since version 14708, it's been here before 48h and since im updating everytime theres a new update, i don't understand why it happened only now and not when 14708 was introduced.

Thanks for the tip on https, i will look into it.
User avatar
waltervl
Posts: 5721
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by waltervl »

The security settings are Work in Progress in current Beta so during time security functions are updated. The "Allow Basic-Auth authentication over plain HTTP (API only)" was introduced in Beta 14857. See https://www.domoticz.com/wiki/Security
For a list of changes in current beta see https://www.domoticz.com/wiki/Domoticz_ ... _-_Commits
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
IanDury
Posts: 47
Joined: Wednesday 08 April 2015 15:22
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by IanDury »

To harden security I'm running an Apache reverse proxy on the same server that runs Domoticz. I'm using a subdomain (az.<mydomain.nl>) that can only be accessed by Alexa (amazonaws.com) using https and is proxied to Domoticz (port 8088) using http on the local network. Besides I'm running fail2ban enabled for Apache. This works with the latest Domoticz beta 2022.2 (build 14957) with security set to "Login Page" and "Allow Basic-Auth authentication over plain HTTP (API only)".

Code: Select all

<VirtualHost *:443>
    ServerName az.xxxxxx.nl

    <Location />
         Require host amazonaws.com
    </Location>

    SSLProxyEngine On
    ProxyPass /json ws://localhost:8088/json 
    ProxyPassReverse /json ws://localhost:8088/json

    ProxyPass / http://localhost:8088/
    ProxyPassReverse / http://localhost:8088/
    
    SSLEngine On
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/xxxxxx.nl/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/xxxxxx.nl/privkey.pem
</VirtualHost>
User avatar
waltervl
Posts: 5721
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by waltervl »

IanDury wrote: Friday 13 January 2023 14:10 To harden security I'm running an Apache reverse proxy on the same server that runs Domoticz. I'm using a subdomain (az.<mydomain.nl>) that can only be accessed by Alexa (amazonaws.com) using https and is proxied to Domoticz (port 8088) using http on the local network. Besides I'm running fail2ban enabled for Apache. This works with the latest Domoticz beta 2022.2 (build 14957) with security set to "Login Page" and "Allow Basic-Auth authentication over plain HTTP (API only)".
Security setting to set Login Page/Basic Auth is removed from latest beta and the only login method for UI is Login Page.
see https://github.com/domoticz/domoticz/pull/5522
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
IanDury
Posts: 47
Joined: Wednesday 08 April 2015 15:22
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by IanDury »

Argh, you're right. My browser cache fooled me. Still, Alexa is able to authenticate using basic-auth with my setup.
Jorn
Posts: 4
Joined: Thursday 13 November 2014 11:04
Target OS: Linux
Domoticz version:
Contact:

Re: Alexicz - FREE Domoticz to Alexa Integration

Post by Jorn »

For the ones that are also getting the "Is not responding" response when activating/deactivating groups/scene's I found a solution.

In AlexaSmartHome.py on line 454 and 466 change

Code: Select all

'timestamp': '%sZ' % (datetime.utcnow().isoformat(),)
into

Code: Select all

'timestamp': '%sZ' % (datetime.utcnow().isoformat(sep='T', timespec='seconds'),)
It has to do that Python also puts in the microseconds in the time format and Alexa expects a response in a format without it.
I found it in this thread: https://github.com/home-assistant/core/pull/56469
DrMacabre
Posts: 74
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 »

anyone have the link to the alexciz installation manual, i just got some message from aws support, they want me to rotate my keys for some reason, i have no clue why they ask me this and anything related to alexa and domoticz is dead in my house now.

edit : got it, doesn't seem to be using any of the keys they made me delete, that's weird.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest