Page 8 of 19

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 09 November 2020 18:47
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 09 November 2020 18:49
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 09 November 2020 18:54
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 09 November 2020 19:42
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 ?

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 09 November 2020 20:41
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?

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 09 November 2020 21:04
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 10 November 2020 9:40
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 2560 times

Device list in dzga will show:

waterheater2.png
waterheater2.png (10.38 KiB) Viewed 2560 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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 11 November 2020 9:11
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 2541 times
Noted it works with voice commands only. It convenient enough.

Many thanks

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 11 November 2020 11:39
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 18 November 2020 19:47
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?

Re: Domoticz-Google-Assistant (dzga)

Posted: Wednesday 25 November 2020 20:59
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 ?

Re: Domoticz-Google-Assistant (dzga)

Posted: Friday 27 November 2020 17:02
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

Re: Domoticz-Google-Assistant (dzga)

Posted: Friday 27 November 2020 17:07
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Friday 27 November 2020 22:04
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Sunday 29 November 2020 22:02
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?

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 30 November 2020 12:47
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?

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 30 November 2020 17:27
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?

Re: Domoticz-Google-Assistant (dzga)

Posted: Monday 30 November 2020 17:35
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...

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 01 December 2020 16:55
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.

Re: Domoticz-Google-Assistant (dzga)

Posted: Tuesday 01 December 2020 19:53
by Nielsch
Xavier82 wrote: Tuesday 01 December 2020 16:55 With some help I got it working again.
[...]
Thanks!!!