Page 15 of 19

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 20 April 2023 22:41
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 20 April 2023 23:33
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 26 April 2023 10:48
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?

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 27 April 2023 11:23
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(?)

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 27 April 2023 11:58
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 27 April 2023 15:38
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:

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 27 April 2023 22:11
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 01 May 2023 8:08
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 03 May 2023 7:38
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 25 May 2023 10:11
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 25 May 2023 23:29
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...

Re: Domoticz-Google-Assistant (dzga)

Posted: Sunday 16 July 2023 19:20
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Sunday 16 July 2023 19:22
by jvdz
Please read all about that here: https://domoticz.com/forum/viewtopic.php?t=40415

Re: Domoticz-Google-Assistant (dzga)

Posted: Sunday 16 July 2023 23:05
by peteralm
Yup, that's where I was reading it. I will look to see where it crops up in the code.

Re: Domoticz-Google-Assistant (dzga)

Posted: Saturday 22 July 2023 19:58
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Saturday 26 August 2023 12:20
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!

Re: Domoticz-Google-Assistant (dzga)

Posted: Saturday 26 August 2023 12:28
by Kedi
Did you try to escape the & char with the \ character like \& ?

Re: Domoticz-Google-Assistant (dzga)

Posted: Saturday 26 August 2023 12:53
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!

Re: Domoticz-Google-Assistant (dzga)

Posted: Saturday 26 August 2023 13:32
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Saturday 26 August 2023 17:41
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