Domoticz-Google-Assistant (dzga) Topic is solved

Alexa, Google Home and Siri

Moderator: leecollings

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 »

fraisdos125 wrote: Monday 09 November 2020 16:38 Hello,

Discovering the different possibilities currently, I like the capacity to merge thermostat to temperature.
There is something I don't know how to change, the min/max value of the reported temp & setting points. For a water heater I can only this 32°C and set 32 as max temp from google home. Under domoticz, no issue I can do it to 60.

Where this can be defined ?
P.S.: latest beta version of dzga under use
Its a google issue https://github.com/DewGew/Domoticz-Goog ... issues/126
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
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 »

samourai47 wrote: Saturday 07 November 2020 15:31
samourai47 wrote: Wednesday 04 November 2020 21:13 hello
I make some change on my domoticz devices. (add devices, add room....)
I update sync devices on dzga and i restart TEST on google console
And the modifications aren't visible in google home

Where is the problem? How is it possible to update rooms, divices etc etc
No solutions?
Thank's for your help
It should be enough just to sync your devices but restart server and then sync do the trick.
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
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 »

samourai47 wrote: Saturday 07 November 2020 18:41 I try to install nginx.
The port 80 is occupated with zigbee deconz i think. so i configure with the 83
When i change configuration to have the same certificate for domoticz :

Code: Select all

server {
    listen 83;
    listen [::]:83;
    server_name toto.duckdns.org;
    #change to match your address
    return 301 https://$server_name$request_uri;
}

server {
        listen 443 ssl;
        listen [::]:443 ssl;

        server_name toto.duckdns.org;
        #change to match your address

        ssl_certificate /etc/letsencrypt/live/toto.duckdns.org/fullchain.pem;
        #change to match your address
        ssl_certificate_key /etc/letsencrypt/live/toto.duckdns.org/privkey.pem;
        #change to match your address
        ssl on;
        ssl_session_cache  builtin:1000  shared:SSL:10m;
        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
        ssl_prefer_server_ciphers on;

        location / {
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Scheme $scheme;
                proxy_pass http://192.168.0.120:3030; #Local ipno to dzga
                proxy_read_timeout  90;
        }
}




location /domoticz {
      rewrite ^/domoticz/?(.*) /$1 break;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Scheme $scheme; 
      proxy_pass http://192.168.0.120:8080; #local ipno to domoticz
      proxy_read_timeout  90;
}
location /assistant {
      rewrite ^/assistant/?(.*) /$1 break;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Scheme $scheme;
      proxy_pass https://192.168.0.120:3030; #local ipno to dzga
      proxy_read_timeout  90;
}
When i reboot my rpi all seems good, but in domoticz logs i found that

Code: Select all

 2020-11-08 09:30:03.454 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Address already in use
2020-11-08 09:30:03.455 Error: WebServer(SSL) check privileges for opening ports below 1024 
I don't understand the problem. Domoticz is in /home/pi/domoticz
and DZGA in home/pi/Domoticz-Google-Assistant
in domoticz. sh i have
DAEMON=/home/pi/domoticz/$NAME
DAEMON_ARGS="-daemon"
#AEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
Thank's for your help
Try Change proxy_pass to https://192.168.0.120:443; or disable ssl for domoticz
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
fraisdos125
Posts: 11
Joined: Monday 10 February 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Fuveau, France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by fraisdos125 »

DewGew wrote: Monday 09 November 2020 18:47
fraisdos125 wrote: Monday 09 November 2020 16:38 Hello,

Discovering the different possibilities currently, I like the capacity to merge thermostat to temperature.
There is something I don't know how to change, the min/max value of the reported temp & setting points. For a water heater I can only this 32°C and set 32 as max temp from google home. Under domoticz, no issue I can do it to 60.

Where this can be defined ?
P.S.: latest beta version of dzga under use
Its a google issue https://github.com/DewGew/Domoticz-Goog ... issues/126
I went trough the post. There is something which is not clear for me. Is it only for a temperature range that it is not possible to set the set point to 60 (for instance) or for any thermostat ?
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 »

fraisdos125 wrote: Monday 09 November 2020 19:42
DewGew wrote: Monday 09 November 2020 18:47
fraisdos125 wrote: Monday 09 November 2020 16:38 Hello,

Discovering the different possibilities currently, I like the capacity to merge thermostat to temperature.
There is something I don't know how to change, the min/max value of the reported temp & setting points. For a water heater I can only this 32°C and set 32 as max temp from google home. Under domoticz, no issue I can do it to 60.

Where this can be defined ?
P.S.: latest beta version of dzga under use
Its a google issue https://github.com/DewGew/Domoticz-Goog ... issues/126
I went trough the post. There is something which is not clear for me. Is it only for a temperature range that it is not possible to set the set point to 60 (for instance) or for any thermostat ?
Temp range for heater, waterheater is set to 30 - 300. Is the device type shown as waterheater in device list?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
fraisdos125
Posts: 11
Joined: Monday 10 February 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Fuveau, France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by fraisdos125 »

DewGew wrote: Monday 09 November 2020 20:41
fraisdos125 wrote: Monday 09 November 2020 19:42
DewGew wrote: Monday 09 November 2020 18:47
Its a google issue https://github.com/DewGew/Domoticz-Goog ... issues/126
I went trough the post. There is something which is not clear for me. Is it only for a temperature range that it is not possible to set the set point to 60 (for instance) or for any thermostat ?
Temp range for heater, waterheater is set to 30 - 300. Is the device type shown as waterheater in device list?
Added this in the description:
<voicecontrol>
devicetype = waterheater
</voicecontrol>

but remains as heater in dzga.

I have added first the devicetype to the switch used for the waterheater. And did a try to the thermostat used for the waterheater. Doesn't work.
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 »

fraisdos125 wrote: Monday 09 November 2020 21:04
DewGew wrote: Monday 09 November 2020 20:41
fraisdos125 wrote: Monday 09 November 2020 19:42

I went trough the post. There is something which is not clear for me. Is it only for a temperature range that it is not possible to set the set point to 60 (for instance) or for any thermostat ?
Temp range for heater, waterheater is set to 30 - 300. Is the device type shown as waterheater in device list?
Added this in the description:
<voicecontrol>
devicetype = waterheater
</voicecontrol>

but remains as heater in dzga.

I have added first the devicetype to the switch used for the waterheater. And did a try to the thermostat used for the waterheater. Doesn't work.
Create first a thermostat device (my case idx 476 called waterheater),
Then first a dummy device (my case idx 477 also called waterheater). In description add:
:

waterheater.png
waterheater.png (51.85 KiB) Viewed 2267 times

Device list in dzga will show:

waterheater2.png
waterheater2.png (10.38 KiB) Viewed 2267 times
Commands:
1 - Turn on waterheater!
2 - Set waterheater to 60 degrees!
3 - What temperature is waterheater set to?
4 - Turn off waterheater!

EDIT: There is no tuch control for heater, waterheater, kettle and oven. Only works with voice commands.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
fraisdos125
Posts: 11
Joined: Monday 10 February 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Fuveau, France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by fraisdos125 »

It works.
I tried with adding actual_temp_idx to the thermostat as well, but we have no more the value shown somewhere :-)
What I found pity is that the temperature shown (trhough the dummy deivce temperature) remains at 32°C max even if correct value under dzga:
Capture d’écran 2020-11-11 à 09.24.52.png
Capture d’écran 2020-11-11 à 09.24.52.png (22.88 KiB) Viewed 2248 times
Noted it works with voice commands only. It convenient enough.

Many thanks
samourai47
Posts: 50
Joined: Wednesday 06 March 2019 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by samourai47 »

DewGew wrote: Monday 09 November 2020 18:54
Try Change proxy_pass to https://192.168.0.120:443; or disable ssl for domoticz
The good method is?

DAEMON_ARGS="$DAEMON_ARGS -www 443"
Or
#DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"

Thank's
emichiels
Posts: 9
Joined: Tuesday 14 July 2015 11:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by emichiels »

hi there,

I have been using Domoticz-google-assistant for a long time. A while ago google assistant started saying that domoticz is not accessable at the moment, when i asked to do a task. I'm trying to figure out the problem, I can access access DZGA. over there everything looks fine. But I can't sync the devices. Then it says homegraph API key is invalid. in the past it worked.... homegraph Api is enabled and I have a homegraph API key in my config,yaml.

I don't know how to get this solved.

any idea's?
fraisdos125
Posts: 11
Joined: Monday 10 February 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Fuveau, France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by fraisdos125 »

Hello,

Not sure about the possible settings for waterheater. From the documentation:
//For heater/waterheater/kettle/oven devices only.
Function to merge thermostat device to control temperature. Merged device will automaticly hidden.
Bug Thermostat idx must be a number above Temp/selector idx.

<voicecontrol>
merge_thermo_idx = 123
</voicecontrol> \\

Does it mean we can add the options actual_temp_idx & selector_modes_idx to the waterheater ? Then we can set the thermostat to Heat or Eco modes ?
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 »

fraisdos125 wrote: Wednesday 25 November 2020 20:59 Hello,

Not sure about the possible settings for waterheater. From the documentation:
//For heater/waterheater/kettle/oven devices only.
Function to merge thermostat device to control temperature. Merged device will automaticly hidden.
Bug Thermostat idx must be a number above Temp/selector idx.

<voicecontrol>
merge_thermo_idx = 123
</voicecontrol> \\

Does it mean we can add the options actual_temp_idx & selector_modes_idx to the waterheater ? Then we can set the thermostat to Heat or Eco modes ?
You can merge a thermostat to control temperature for those. Then you can merge selector modes and actual temperature to the thermostat.

Edit: modes may or may not work, I haven’t tested this with heater, oven, kettle or waterheater
Last edited by DewGew on Friday 27 November 2020 17:12, edited 2 times in total.
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
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 »

emichiels wrote: Wednesday 18 November 2020 19:47 hi there,

I have been using Domoticz-google-assistant for a long time. A while ago google assistant started saying that domoticz is not accessable at the moment, when i asked to do a task. I'm trying to figure out the problem, I can access access DZGA. over there everything looks fine. But I can't sync the devices. Then it says homegraph API key is invalid. in the past it worked.... homegraph Api is enabled and I have a homegraph API key in my config,yaml.

I don't know how to get this solved.

any idea's?
I think its your smart-home-key.json is not valid or corrupt. Generate a new and replace. If you use smart-home-key.json, homegraph API key is not needed.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
fraisdos125
Posts: 11
Joined: Monday 10 February 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Fuveau, France
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by fraisdos125 »

DewGew wrote: Friday 27 November 2020 17:02
fraisdos125 wrote: Wednesday 25 November 2020 20:59 Hello,

Not sure about the possible settings for waterheater. From the documentation:
//For heater/waterheater/kettle/oven devices only.
Function to merge thermostat device to control temperature. Merged device will automaticly hidden.
Bug Thermostat idx must be a number above Temp/selector idx.

<voicecontrol>
merge_thermo_idx = 123
</voicecontrol> \\

Does it mean we can add the options actual_temp_idx & selector_modes_idx to the waterheater ? Then we can set the thermostat to Heat or Eco modes ?
You can merge a thermostat to control temperature for those. Then you can merge selector modes and actual temperature to the thermostat.

Edit: modes may or may not work, I haven’t tested this with heater, oven, kettle or waterheater
Modes work ! There is only the point with temperature limited at 32°C when using the interface. With voice control I can set it to 60°C.
Nielsch
Posts: 10
Joined: Saturday 19 August 2017 20:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Nielsch »

Since my issue with Shelly Dimmer 2 is still there I thought it would be good to update the dimmers' firmwares and update dzga and try again. However. after updating dzga it doesn't work anymore. Tried uninstalling and installing both master and development. This is the error I get when starting manually:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "Domoticz-Google-Assistant/__main__.py", line 4, in <module>
    from server import *
  File "Domoticz-Google-Assistant/server.py", line 6, in <module>
    from helpers import FILE_DIR
  File "Domoticz-Google-Assistant/helpers.py", line 13, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
How can I solve this?
emichiels
Posts: 9
Joined: Tuesday 14 July 2015 11:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by emichiels »

DewGew wrote: Friday 27 November 2020 17:07
emichiels wrote: Wednesday 18 November 2020 19:47 hi there,

I have been using Domoticz-google-assistant for a long time. A while ago google assistant started saying that domoticz is not accessable at the moment, when i asked to do a task. I'm trying to figure out the problem, I can access access DZGA. over there everything looks fine. But I can't sync the devices. Then it says homegraph API key is invalid. in the past it worked.... homegraph Api is enabled and I have a homegraph API key in my config,yaml.

I don't know how to get this solved.

any idea's?
I think its your smart-home-key.json is not valid or corrupt. Generate a new and replace. If you use smart-home-key.json, homegraph API key is not needed.
DewGew, thanks for your reaction. I tried, but it's not solving the problem.

I regenerated the smart-home-key.json file with this procedure:

Navigate to the Google Cloud Console API Manager for your project id.
Enable the HomeGraph API.
Navigate to the Google Cloud Console API & Services page.
Select Create Credentials and create a Service account key
Create a new Service account
Use the role Service Account > Service Account Token Creator
Click Done
Click on the newly created Email Account under Service Accounts
Add key > create new key
Choose JSON
Click create and download the JSON file.
Upload and Save this in ../Domoticz-Google-Assistant/config folder as smart-home-key.json

after restarting DZGA I tried to update the devices. But it gave:
Page not found!: 403 Client Error: Forbidden for url: https://homegraph.googleapis.com/v1/devices:requestSync

the log file gives:

2020-11-30 12:43:23 - DEBUG - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2020-11-30 12:43:23 - DEBUG - https://raw.githubusercontent.com:443 "GET /DewGew/Domoticz-Google-Assistant/beta/const.py HTTP/1.1" 200 2037
2020-11-30 12:43:23 - DEBUG - Starting new HTTPS connection (1): homegraph.googleapis.com:443
2020-11-30 12:43:23 - DEBUG - https://homegraph.googleapis.com:443 "POST /v1/devices:requestSync HTTP/1.1" 403 None
2020-11-30 12:44:07 - DEBUG - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2020-11-30 12:44:08 - DEBUG - https://raw.githubusercontent.com:443 "GET /DewGew/Domoticz-Google-Assistant/beta/const.py HTTP/1.1" 200 2037

any other idea's?
Xavier82
Posts: 178
Joined: Tuesday 07 June 2016 22:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Xavier82 »

Hi DewGew,

When trying to install and start the new version 1.9.2 with the new layout DZGA won't start.
In the logging I see:
pi@raspberrypi:~ $ sudo service dzga status
● dzga.service - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzga.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-11-30 17:24:19 CET; 4s ago
Main PID: 7484 (python3)
Tasks: 2 (limit: 2248)
Memory: 33.6M
CGroup: /system.slice/dzga.service
├─7484 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/
└─7530 /usr/bin/python /usr/bin/pip install jinja2

nov 30 17:24:19 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Service.

Seems to me that jinja2 isn't being installed.
But when I do sudo pip install jinja2 it tells me it is already installed (same for sudo pip3 install jinja2)

When starting dzga manualy with python command it works....
Any idea about how to solve this?
Last edited by Xavier82 on Monday 30 November 2020 23:17, edited 1 time in total.
Nielsch
Posts: 10
Joined: Saturday 19 August 2017 20:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Nielsch »

Xavier82 wrote: Monday 30 November 2020 17:27 Hi DewGew,

When trying to install and start the new version 1.9.2 with the new layout DZGA won't start.
In the logging I see:
pi@raspberrypi:~ $ sudo service dzga status
● dzga.service - Domoticz-Google-Assistant Service
Loaded: loaded (/etc/systemd/system/dzga.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-11-30 17:24:19 CET; 4s ago
Main PID: 7484 (python3)
Tasks: 2 (limit: 2248)
Memory: 33.6M
CGroup: /system.slice/dzga.service
├─7484 /home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/
└─7530 /usr/bin/python /usr/bin/pip install jinja2

nov 30 17:24:19 raspberrypi systemd[1]: Started Domoticz-Google-Assistant Service.

Seems to me that jinja2 isn't being installed.
But then I do sudo pip install jinja2 it tells me it is already installed (some for sudo pip3 install jinja2)

When starten dzga manualy with python command it works....
Any idea about how to solve this?
This seems to be the same problem as I have, however starting manually does not work for me...
Xavier82
Posts: 178
Joined: Tuesday 07 June 2016 22:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Xavier82 »

With some help I got it working again.
Issue is that DZGA runs in an "environment".
Jinja2 isn't installed within this environment.

Do the following to fix on Rpi within CLI:
type:
source Domoticz-Google-Assistant/env/bin/activate

then type:
pip3 install jinja2

then type:
deactivate

Then type:
sudo service dzga status

Everything should now be ok/running again.
Nielsch
Posts: 10
Joined: Saturday 19 August 2017 20:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz-Google-Assistant (dzga)

Post by Nielsch »

Xavier82 wrote: Tuesday 01 December 2020 16:55 With some help I got it working again.
[...]
Thanks!!!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest