Domoticz-Google-Assistant (dzga) Topic is solved

Alexa, Google Home and Siri

Moderator: leecollings

meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by meal »

Hello,

In the description of a selector switch I tried:
<voicecontrol>
nicknames = pompe à chaleur
type = vacuum
</voicecontrol>

and get the same error message
"ERROR - 400 Client Error: Bad Request for url: https://homegraph.googleapis.com/v1/device ... reportstateandnotification"

I tried:
<voicecontrol>
nicknames = pompe à chaleur
report_state = False
</voicecontrol>
and do not get the error message but the state is not reported in Google Home.

Did someone manage to implement selector switch in dzga in version 1.23.2 ?

Many thanks for your help
BR
meal
meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by meal »

Hello,

In the same context described in my previous post (Domoticz version 2023.1 and DZGA version 1.23.2) the Security functionality ArmDisarm is not working anymore. It was working in Domotics version 2022.1 and DZGA 1.11.10.

When I intent to set the "alarm home" using Google Assistant I am not prompted to provide the security code and I get the message
ERROR - Unable to execute action.devices.commands.ArmDisarm for Security17 - challenge needed
in the log

see below:
2023-04-20 22:50:05 - INFO - {
"inputs": [
{
"context": {
"locale_country": "FR",
"locale_language": "fr"
},
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "Security17"
}
],
"execution": [
{
"command": "action.devices.commands.ArmDisarm",
"params": {
"arm": true,
"armLevel": "Arm Home"
}
}
]
}
]
}
}
],
"requestId": "5959643188380242688"
}
2023-04-20 22:50:05 - INFO - Google Assistant requests an action.devices.EXECUTE
2023-04-20 22:50:05 - ERROR - Unable to execute action.devices.commands.ArmDisarm for Security17 - challenge needed


Did anybody implement the security functionality in Domoticz 2023.1 with DZGA 1.23.2 ?

Many thanks for your help.

BR
meal
EscApe
Posts: 528
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by EscApe »

Edit2: this issue has already been solved, but I will leave my journey here. Have a look at my fourth post for a relevant change in Domoticz and a possible enhancement for dzga.

For an unrelated issue I had to switch to the beta version of Domoticz (build 15198), but now the Domoticz scenes and groups have disappeared from dzga (1.23.2).
Devices are still available and work with google assistant. The scenes are still in the correct floorpan. I did not change any scenes or groups recently.
There is nothing related to scenes in de dzga (debug) log. To exclude any authorization issues I made the dzga user in Domoticz admin (was a normal user), but that didn't fix it.

Is anyone else experiencing the same issue?

Edit: Just to be sure I rebuild a Domoticz testserver (stable 2023.1) with the database from before my Domoticz upgrade and the scenes reappear. So it looks like something has changed on the Domoticz side. Unfortunately I have to use the beta. Can dzga be adapted to support the changes in Domoticz?
Last edited by EscApe on Thursday 27 April 2023 15:42, edited 3 times in total.
EscApe
Posts: 528
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by EscApe »

Done some further digging on the issue in my previous post. Testing the Domoticz url's I could find in dzga.

The important url for discovery seems te be:

Code: Select all

/json.htm?type=devices&plan=2&filter=all&used=true
Also checked:

Code: Select all

/json.htm?type=devices&plan=2
/json.htm?type=devices&rid=1133
/json.htm?type=scenes
/json.htm?type=plans&order=name&used=true
(variables are from my setup)

The results are mostly the same on both the (2023.1) stable and beta release. Using diff command and visual inspection on the output I see only expected differences, like timestamps and current states. Nothing that would explain why scenes/groups no longer show in dzga.

To further confirm this issue is related to changes in Domoticz I also updated the new testserver to the Domoticz beta. That reminded me there was an earlier issue after the update. Dzga could no longer login to Domoticz using plain http. There is a new setting in Domoticz to "Allow Basic-Auth authentication over plain HTTP (API only)" (under security). I remember enabling that on the other server.
With this option set dzga can again connect, but that also confirms that scenes/groups no longer appear in dzga.

So maybe it is related to new security features in Domoticz?

The url's I could find showed no significant difference in Domoticz responses, but maybe dzga performs other actions I did not find(?)
EscApe
Posts: 528
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by EscApe »

Quick update: narrowed it down to using username/password vs trusted hosts (demoticz setting). Using curl from trusted hosts includes the scenes. Using username/password does not. Even is the user has admin rights and all options enabled.
So this might not be a deliberate change to Domoticz, but a bug in Domoticz.

Would be nice if dzga could connect without username/password. It is allready a trusted host to Domoticz, but won't allow me to run without a username/password set.
EscApe
Posts: 528
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by EscApe »

After lots of digging and testing ... I seemed to have found the cause.... or maybe just for me(?) There is still something I can't explain.

What solved my problem:
1. "Allow Basic-Auth authentication over plain HTTP (API only)" needs te be enabled in Domoticz
-OR domoticz needs a ssl certificate dzga trusts
-OR dzga should accept self signed certificates
2. Enable all active menu's for the Domoticz user used by dzga
3. Restart Domoticz after modifying the Domoticz user! (at least for my beta version)

Although I changed the user early on in my efforts to solve this issue, I'm not 100% sure i restarted (my main) Domoticz afterwards. Seems like a rookie mistake not to, but after all this testing I am just not sure anymore.

What is still troubling me is that I (obviously) restarted the newly created testserver several times and it showed te same symptoms (no scenes/groups). Now all of a sudden that server also returns the scenes. After being restarted, because I already brought it down.

The Domoticz testserver (now on latest beta) seems to apply changes to userprofiles immediately, while the earlier beta needs a restart for the changes to work (both tested and confirmed twice). I don't see anything related in the commits between Domoticz 2023.1 build 15198 and build 15215. So it looks there is something strange happening in my setup.

The changes to Domoticz authentication and access are real, so I will leave this information here, but it will all work if setup correctly. The 'strangeness' seems to be specific to my setup :( :oops:
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by DewGew »

EscApe wrote: Thursday 27 April 2023 15:38 After lots of digging and testing ... I seemed to have found the cause.... or maybe just for me(?) There is still something I can't explain.

What solved my problem:
1. "Allow Basic-Auth authentication over plain HTTP (API only)" needs te be enabled in Domoticz
-OR domoticz needs a ssl certificate dzga trusts
-OR dzga should accept self signed certificates
2. Enable all active menu's for the Domoticz user used by dzga
3. Restart Domoticz after modifying the Domoticz user! (at least for my beta version)

Although I changed the user early on in my efforts to solve this issue, I'm not 100% sure i restarted (my main) Domoticz afterwards. Seems like a rookie mistake not to, but after all this testing I am just not sure anymore.

What is still troubling me is that I (obviously) restarted the newly created testserver several times and it showed te same symptoms (no scenes/groups). Now all of a sudden that server also returns the scenes. After being restarted, because I already brought it down.

The Domoticz testserver (now on latest beta) seems to apply changes to userprofiles immediately, while the earlier beta needs a restart for the changes to work (both tested and confirmed twice). I don't see anything related in the commits between Domoticz 2023.1 build 15198 and build 15215. So it looks there is something strange happening in my setup.

The changes to Domoticz authentication and access are real, so I will leave this information here, but it will all work if setup correctly. The 'strangeness' seems to be specific to my setup :( :oops:
Your a good detective :)
Domoticz is always under develop sometimes its hard to keep up the new functions and security. Dzga still needs improvements but it works as it suppost at the moment.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by meal »

Hello,

Any idea about the issues with use of :

- Selectors
- Security functionality (ArnDisarm)

in Domoticz 2023.1 with DZGA 1.23.2 ?

See my previous posts.

BR
meal
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by DewGew »

meal wrote: Monday 01 May 2023 8:08 Hello,

Any idea about the issues with use of :

- Selectors
- Security functionality (ArnDisarm)

in Domoticz 2023.1 with DZGA 1.23.2 ?

See my previous posts.

BR
Security is working on my setup, Domoticz 2023.1 (build 15192) with latest dzga(beta), I have only tryed with english and with text command in Google Assistant.
I have disable report state for the security device. With this in the device description

Code: Select all

<voicecontrol>
report_state = False
</voicecontrol>
Selector devices I havent tested yet. I dont use that at the moment.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
Domoberry
Posts: 116
Joined: Tuesday 30 May 2017 19:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Domoberry »

A question off-topic perhaps, yet those active in this thread would likely know:
As Google sunsets the Work-with-Nest program in September, I'm looking for an alternative to continue to use the Nest thermostat with Domoticz. Would dzga be the alternative? Or is (the great work done for) dzga addressing means to voice-control Domoticz using Google Assistent? I have browsed this thread and think dzga is not to the rescue for Nest, yet want to be sure.
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by heggink »

Has anyone managed to run this through docker run rather than docker-compose? I'd like to run this under truenas scale. No install script can be run and no native docker-compose...
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by peteralm »

I have just installed this and I am getting quite a lot of these in my log:

2023-07-16 18:17:26.986 [WebServer] Deprecated RType (plans) for API request. Handled via fallback (getplans), please use correct API Command! (192.168.86.220)

Happens when I sync devices from dzga - I am on the latest beta of domoticz
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by jvdz »

Please read all about that here: https://domoticz.com/forum/viewtopic.php?t=40415
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by peteralm »

Yup, that's where I was reading it. I will look to see where it crops up in the code.
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by DewGew »

peteralm wrote: Sunday 16 July 2023 19:20 I have just installed this and I am getting quite a lot of these in my log:

2023-07-16 18:17:26.986 [WebServer] Deprecated RType (plans) for API request. Handled via fallback (getplans), please use correct API Command! (192.168.86.220)

Happens when I sync devices from dzga - I am on the latest beta of domoticz
Use DZGA Beta for the new api
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
jpvaneijk
Posts: 76
Joined: Thursday 07 June 2018 21:57
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Noordwijk, Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by jpvaneijk »

Dear folks, hi DewGew,

After Controlicz (MadGenie) discontinued, I was looking for a good alternative. I thought I had found this in DZGA.
By now I have DZGA (partially) working on my RPi.

I am now running into the fact that my Google password contains multiple & characters and it seems that DZGA's user interface does not accept this & character. Other characters like a ! or a # do work in my password.
If I remove the & characters from my password then I can log into the user interface just fine but it will probably impact the connections to my Google Home.

If I need to change my password in Google Home then I need to change my Wifi password and with it everything else in my house that makes a wifi connection. This is obviously not a desirable situation because this also applies to my roommates.

Question:
Is it possible to modify the password manager so that it also accepts the & character?

For completeness, I also asked this question on Github but maybe others have run into this as well?
https://github.com/DewGew/Domoticz-Goog ... ant/issues

Thanks in advance for a response!
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Kedi »

Did you try to escape the & char with the \ character like \& ?
Logic will get you from A to B. Imagination will take you everywhere.
jpvaneijk
Posts: 76
Joined: Thursday 07 June 2018 21:57
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Noordwijk, Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by jpvaneijk »

Hi Kedi,

Thanx for this quick reply.
Can you please explane this? What do you mean with escape the & char?

The DZGA configfile says: # Login on Google Home app and configuration interface
Thats means my password on Google Home needs to be (exactly) the same as de Userinterface, right?

Thanx!
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by DewGew »

jpvaneijk wrote: Saturday 26 August 2023 12:53 Hi Kedi,

Thanx for this quick reply.
Can you please explane this? What do you mean with escape the & char?

The DZGA configfile says: # Login on Google Home app and configuration interface
Thats means my password on Google Home needs to be (exactly) the same as de Userinterface, right?

Thanx!
No its not the same as your google account. You can use what ever you want. Its only an account for connection between dzga and google
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
jpvaneijk
Posts: 76
Joined: Thursday 07 June 2018 21:57
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Noordwijk, Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by jpvaneijk »

Ok DewGew, thanx,

In that case, I probably have something else I can't get working.
I have gone through all the steps and am actually at the last part where I get stuck.

In DZGA I can see all the devices added in Domoticz and I am logged in nicely. The log shows no strange signals.
However, when I want to add my test app to my Google Home app I first get a message saying:

Link an account on [app name] to be able to control each device

Then when I click Continue a empty and white screen appears.
I thought this was due to the fact that DZGA's login information was different from my Google Home. I understand from the above that this need not matter?

Do you know what could be the problem then?

If I try to sync my devices in DZGA I'm getting error:
Page not found!: 404 Client Error: Not Found for url: https://homegraph.googleapis.com/v1/devices:requestSync
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest