Page 16 of 19

Re: Domoticz-Google-Assistant (dzga)

Posted: Sunday 27 August 2023 12:23
by jpvaneijk
Hi DewGew,

Sorry, sorry, sorry. Please forget the above.
I had an issue with my reverse proxy and after repairing this I linked my account and al devices were added to my Google home.
Still a few minor issues but thats ok for a sunday. Once again: sorry!

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 07 September 2023 12:02
by PeJeWe
samourai47 wrote: Sunday 01 November 2020 21:06 somewhere i found this line

Ngrok was unable to start. Error: 'NgrokTunnel' object has no attribute 'replace' is not valid
But ngrock seems to be ok because he give a new url.

in config.yaml i writed
ngrok_tunnel: true
ngrok_auth_token: 1-------------------yrO9el1_d5DS899GvZaspqPf3SZ3

I don't understand
i have the same error.
i have run the following steps without luck:
source Domoticz-Google-Assistant/env/bin/activate
pip3 install pyngrok
deactivate.

and when i whant to resync my devices i get the error: Page not found!: 404 Client Error: Not Found for url: https://homegraph.googleapis.com/v1/devices:requestSync

Device already in off state?

Posted: Thursday 07 September 2023 16:47
by portafreak
Hi, how can I force dzga to turn off a light even if it's already in off state? I always get a response from google saying that the device is already off. I get the following message in the DZGA log:

Unable to execute action.devices.commands.OnOff for Light48. Already in state

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 11 September 2023 11:51
by Merlijn
Hi DewGew,

I've been trying for a couple of days now but i can't even seem to get http://localhost:3030/settings running.
It's giving: ERR_CONNECTION_REFUSED.

sudo systemctl status dzga returns with:


"
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: ena
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/D

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Servic
lines 1-9/9 (END)...skipping...
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Service."


I hope you can point me in the right directions cause at the moment i'm clueless.

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 11 September 2023 21:45
by PeJeWe
PeJeWe wrote: Thursday 07 September 2023 12:02
samourai47 wrote: Sunday 01 November 2020 21:06 somewhere i found this line

Ngrok was unable to start. Error: 'NgrokTunnel' object has no attribute 'replace' is not valid
But ngrock seems to be ok because he give a new url.

in config.yaml i writed
ngrok_tunnel: true
ngrok_auth_token: 1-------------------yrO9el1_d5DS899GvZaspqPf3SZ3

I don't understand
i have the same error.
i have run the following steps without luck:
source Domoticz-Google-Assistant/env/bin/activate
pip3 install pyngrok
deactivate.

and when i whant to resync my devices i get the error: Page not found!: 404 Client Error: Not Found for url: https://homegraph.googleapis.com/v1/devices:requestSync
i stil get the error in the DZGA log: Ngrok was unable to start. Error: 'NgrokTunnel' object has no attribute 'replace' is not valid

when i resync my devices i now have the message : Page not found!: 'client_email'

after a server restart i also dont get a new ngrok adres assignd

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 11 September 2023 21:49
by PeJeWe
Merlijn wrote: Monday 11 September 2023 11:51 Hi DewGew,

I've been trying for a couple of days now but i can't even seem to get http://localhost:3030/settings running.
It's giving: ERR_CONNECTION_REFUSED.

sudo systemctl status dzga returns with:


"
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: ena
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/D

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Servic
lines 1-9/9 (END)...skipping...
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Service."


I hope you can point me in the right directions cause at the moment i'm clueless.
could it be tha you have a firewall running UFW perhaps
in that case you can do
sudo ufw disable
sudo ufw allow 3030
sudo ufw enable

this allows you to commuicatie over port 3030

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 12 September 2023 17:11
by Merlijn
PeJeWe wrote: Monday 11 September 2023 21:49
Merlijn wrote: Monday 11 September 2023 11:51 Hi DewGew,

I've been trying for a couple of days now but i can't even seem to get http://localhost:3030/settings running.
It's giving: ERR_CONNECTION_REFUSED.

sudo systemctl status dzga returns with:


"
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: ena
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/D

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Servic
lines 1-9/9 (END)...skipping...
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Service."


I hope you can point me in the right directions cause at the moment i'm clueless.
could it be tha you have a firewall running UFW perhaps
in that case you can do
sudo ufw disable
sudo ufw allow 3030
sudo ufw enable

this allows you to commuicatie over port 3030
I tried the first command but it returns with: 'sudo: ufw: command not found.'
Thanks for the suggestion though!

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 12 September 2023 19:23
by PeJeWe
Then you don't have this firewall installed.
Maybe you have another installed.

ore you can use for example 192.168.1.100:3030/settings
change it in youre ip adress

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 13 September 2023 7:58
by DewGew
Merlijn wrote: Tuesday 12 September 2023 17:11
PeJeWe wrote: Monday 11 September 2023 21:49
Merlijn wrote: Monday 11 September 2023 11:51 Hi DewGew,

I've been trying for a couple of days now but i can't even seem to get http://localhost:3030/settings running.
It's giving: ERR_CONNECTION_REFUSED.

sudo systemctl status dzga returns with:


"
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: ena
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/D

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Servic
lines 1-9/9 (END)...skipping...
● dzgaservice - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzgaservice; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-09-11 11:21:32 CEST; 966ms ago
Main PID: 26176 (python3)
Tasks: 1 (limit: 2058)
CGroup: /systemslice/dzgaservice
└─26176 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/

sep 11 11:21:32 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Service."


I hope you can point me in the right directions cause at the moment i'm clueless.
could it be tha you have a firewall running UFW perhaps
in that case you can do
sudo ufw disable
sudo ufw allow 3030
sudo ufw enable

this allows you to commuicatie over port 3030
I tried the first command but it returns with: 'sudo: ufw: command not found.'
Thanks for the suggestion though!
Don't use http://localhost:3030/settings as url. I should be a ipnr like http://192.168.1.10:3030/settings

Try run manually and see if there is any errors in terminal log:

Code: Select all

cd /home/${USER}/
sudo systemctl stop dzga #If service is running
source Domoticz-Google-Assistant/env/bin/activate
python3 Domoticz-Google-Assistant

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 13 September 2023 22:19
by PeJeWe
I have removed dzga and ngrok, and reinstalled it. maybe there are stil some files left over after removing dzga and ngrok.
I still get the ngrok connection error. ("error: 'ngroktunnel' object has no attribute 'replace' is not valid")
i don't get a new tunnel adress, i still get the first adress that i have got in the beginning.
Google Home has bin working for one time.
when i look at ngrok.com i see that that tunnel is running, it don't gets renewed when i restart te server.
has it something to do with "ngrok start --none --log=stdout" ?
or with pyngrok?

Log

Code: Select all

Domoticz@Domoticz:~ $ sudo systemctl stop dzga
Domoticz@Domoticz:~ $ source Domoticz-Google-Assistant/env/bin/activate
(env) Domoticz@Domoticz:~ $ python3 Domoticz-Google-Assistant
Loading configuration...
Ngrok was unable to start. Error: 'NgrokTunnel' object has no attribute 'replace' is not valid
(Press CTRL+C to stop server)
could you help DewGew?

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 18 September 2023 13:44
by Merlijn
DewGew wrote: Wednesday 13 September 2023 7:58
Merlijn wrote: Tuesday 12 September 2023 17:11
PeJeWe wrote: Monday 11 September 2023 21:49

could it be tha you have a firewall running UFW perhaps
in that case you can do
sudo ufw disable
sudo ufw allow 3030
sudo ufw enable

this allows you to commuicatie over port 3030
I tried the first command but it returns with: 'sudo: ufw: command not found.'
Thanks for the suggestion though!
Don't use http://localhost:3030/settings as url. I should be a ipnr like http://192.168.1.10:3030/settings

Try run manually and see if there is any errors in terminal log:

Code: Select all

cd /home/${USER}/
sudo systemctl stop dzga #If service is running
source Domoticz-Google-Assistant/env/bin/activate
python3 Domoticz-Google-Assistant
This helped! turns out i made a mistake in my ip number in the configuration.

But now i get the following error in the log:

2023-09-18 13:37:39 - ERROR - Error in getting devices and settings

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 19 September 2023 8:44
by DewGew
Merlijn wrote: Monday 18 September 2023 13:44
DewGew wrote: Wednesday 13 September 2023 7:58
Merlijn wrote: Tuesday 12 September 2023 17:11

I tried the first command but it returns with: 'sudo: ufw: command not found.'
Thanks for the suggestion though!
Don't use http://localhost:3030/settings as url. I should be a ipnr like http://192.168.1.10:3030/settings

Try run manually and see if there is any errors in terminal log:

Code: Select all

cd /home/${USER}/
sudo systemctl stop dzga #If service is running
source Domoticz-Google-Assistant/env/bin/activate
python3 Domoticz-Google-Assistant
This helped! turns out i made a mistake in my ip number in the configuration.

But now i get the following error in the log:

2023-09-18 13:37:39 - ERROR - Error in getting devices and settings
You have to enable Allow Basic Authentication over plain HTTP in menu https://www.domoticz.com/wiki/Applicati ... Protection .
Its recomended to add a new user in Domoticz dedicated for DZGA and add devices to this user. See https://www.domoticz.com/wiki/User_Management.

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 19 September 2023 9:11
by Merlijn
DewGew wrote: Tuesday 19 September 2023 8:44
Merlijn wrote: Monday 18 September 2023 13:44
DewGew wrote: Wednesday 13 September 2023 7:58

Don't use http://localhost:3030/settings as url. I should be a ipnr like http://192.168.1.10:3030/settings

Try run manually and see if there is any errors in terminal log:

Code: Select all

cd /home/${USER}/
sudo systemctl stop dzga #If service is running
source Domoticz-Google-Assistant/env/bin/activate
python3 Domoticz-Google-Assistant
This helped! turns out i made a mistake in my ip number in the configuration.

But now i get the following error in the log:

2023-09-18 13:37:39 - ERROR - Error in getting devices and settings
You have to enable Allow Basic Authentication over plain HTTP in menu https://www.domoticz.com/wiki/Applicati ... Protection .
Its recomended to add a new user in Domoticz dedicated for DZGA and add devices to this user. See https://www.domoticz.com/wiki/User_Management.
I already set up a user for dzga and enabled Allow Basi Authentication over plain HTTP.
The user has admin rights, so that isn't it either.

Do you have any other things i could check?

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 19 September 2023 9:16
by Merlijn
Merlijn wrote: Tuesday 19 September 2023 9:11
DewGew wrote: Tuesday 19 September 2023 8:44
Merlijn wrote: Monday 18 September 2023 13:44

This helped! turns out i made a mistake in my ip number in the configuration.

But now i get the following error in the log:

2023-09-18 13:37:39 - ERROR - Error in getting devices and settings
You have to enable Allow Basic Authentication over plain HTTP in menu https://www.domoticz.com/wiki/Applicati ... Protection .
Its recomended to add a new user in Domoticz dedicated for DZGA and add devices to this user. See https://www.domoticz.com/wiki/User_Management.
I already set up a user for dzga and enabled Allow Basi Authentication over plain HTTP.
The user has admin rights, so that isn't it either.

Do you have any other things i could check?
Turns out i had to update my Domoticz, now devices are visible for dzga!

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 19 September 2023 21:50
by Merlijn
DewGew wrote: Tuesday 19 September 2023 8:44
Merlijn wrote: Monday 18 September 2023 13:44
DewGew wrote: Wednesday 13 September 2023 7:58

Don't use http://localhost:3030/settings as url. I should be a ipnr like http://192.168.1.10:3030/settings

Try run manually and see if there is any errors in terminal log:

Code: Select all

cd /home/${USER}/
sudo systemctl stop dzga #If service is running
source Domoticz-Google-Assistant/env/bin/activate
python3 Domoticz-Google-Assistant
This helped! turns out i made a mistake in my ip number in the configuration.

But now i get the following error in the log:

2023-09-18 13:37:39 - ERROR - Error in getting devices and settings
You have to enable Allow Basic Authentication over plain HTTP in menu https://www.domoticz.com/wiki/Applicati ... Protection .
Its recomended to add a new user in Domoticz dedicated for DZGA and add devices to this user. See https://www.domoticz.com/wiki/User_Management.

Last thing (for now problably), how do i keep ngrok running? As soon as i stop the putty connection to my raspberry, ngrok stops as well.


Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 20 September 2023 14:25
by gvandick
Latest versions stable domoticz and dzga I use ngrok free connection with google home works fine.

Sychr domoticz dzga function oke.

Problem is that devices in google home app are showing offline, but voice command works for all devices.

When I change roomnumber in dzga instandly correct devices for that room in google home but showing offline voice command works well.

I change smart-key several times but didn't solved the problem. I added google nest IP as trusted IP in domoticz

What can be the problem.

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 20 September 2023 22:20
by Merlijn
gvandick wrote: Wednesday 20 September 2023 14:25 Latest versions stable domoticz and dzga I use ngrok free connection with google home works fine.

Sychr domoticz dzga function oke.

Problem is that devices in google home app are showing offline, but voice command works for all devices.

When I change roomnumber in dzga instandly correct devices for that room in google home but showing offline voice command works well.

I change smart-key several times but didn't solved the problem. I added google nest IP as trusted IP in domoticz

What can be the problem.
Can you tell me how you set up ngrok?
This might help me with my problem.

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 21 September 2023 8:23
by gvandick
I asume you installed ngrok on your raspberry.

For configuration
Ngrok instellingen

sudo nano ~/.ngrok2/ngrok.yml

tunnels:
nginx-server:
proto: http
addr: 3030
bind-tls: true
console_ui: false

authtoken: jouw authtoken

region: eu

sudo nano /etc/systemd/system/ngrok-client.service

[Unit]
Description=ngrok client
After=network.target

[Service]
ExecStart=/home/pi/ngrok start --all -config /home/pi/.ngrok2/ngrok.yml
Restart=on-abort

[Install]
WantedBy=multi-user.target

Re: Domoticz-Google-Assistant (dzga)

Posted: Thursday 21 September 2023 11:01
by Merlijn
gvandick wrote: Thursday 21 September 2023 8:23 I asume you installed ngrok on your raspberry.

For configuration
Ngrok instellingen

sudo nano ~/.ngrok2/ngrok.yml

tunnels:
nginx-server:
proto: http
addr: 3030
bind-tls: true
console_ui: false

authtoken: jouw authtoken

region: eu

sudo nano /etc/systemd/system/ngrok-client.service

[Unit]
Description=ngrok client
After=network.target

[Service]
ExecStart=/home/pi/ngrok start --all -config /home/pi/.ngrok2/ngrok.yml
Restart=on-abort

[Install]
WantedBy=multi-user.target
I'm getting the following error when editing ngrok.yaml:


ERROR: Invalid configuration file saved at "/home/pi/.config/ngrok/ngrok.yml": Error reading configuration file '/home/pi/.config/ngrok/ngrok.yml': YAML parsin g error: yaml: unmarshal errors:
ERROR: line 5: field nginx-server not found in type config.v2yamlConfig
ERROR: line 6: field proto not found in type config.v2yamlConfig
ERROR: line 7: field addr not found in type config.v2yamlConfig
ERROR: line 8: field bind-tls not found in type config.v2yamlConfig

Re: Domoticz-Google-Assistant (dzga)

Posted: Friday 22 September 2023 9:40
by Merlijn
Merlijn wrote: Thursday 21 September 2023 11:01
gvandick wrote: Thursday 21 September 2023 8:23 I asume you installed ngrok on your raspberry.

For configuration
Ngrok instellingen

sudo nano ~/.ngrok2/ngrok.yml

tunnels:
nginx-server:
proto: http
addr: 3030
bind-tls: true
console_ui: false

authtoken: jouw authtoken

region: eu

sudo nano /etc/systemd/system/ngrok-client.service

[Unit]
Description=ngrok client
After=network.target

[Service]
ExecStart=/home/pi/ngrok start --all -config /home/pi/.ngrok2/ngrok.yml
Restart=on-abort

[Install]
WantedBy=multi-user.target
I'm getting the following error when editing ngrok.yaml:


ERROR: Invalid configuration file saved at "/home/pi/.config/ngrok/ngrok.yml": Error reading configuration file '/home/pi/.config/ngrok/ngrok.yml': YAML parsin g error: yaml: unmarshal errors:
ERROR: line 5: field nginx-server not found in type config.v2yamlConfig
ERROR: line 6: field proto not found in type config.v2yamlConfig
ERROR: line 7: field addr not found in type config.v2yamlConfig
ERROR: line 8: field bind-tls not found in type config.v2yamlConfig
Managed to keep ngrok running after logging off with: nohup ngrok http 3030 &