Domoticz-Google-Assistant (dzga) Topic is solved

Alexa, Google Home and Siri

Moderator: leecollings

Post Reply
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 »

in config.yaml i configure

# Use SSL encryption in HTTP server if not using ngrok
use_ssl: true
ssl_key: # /etc/letsencrypt/live/mysite.duckdns.org/privkey.pem
ssl_cert: # /etc/letsencrypt/live/mysite.duckdns.org/fullchain.pem

Is it good?
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 »

I retart all the configuration, but all the same problem

So i have a idea about my problem?
When i go to https://mysite.duckdns.org -> i go on domoticz
when i go https://mysite.duckdns.org/settings
Idem in https://mysite.duckdns.org/Domoticz-Goo ... t/settings -> page not found

Mysite.duckdns.org is for secure domoticz and have a valide certificat
I have this in crontab
sudo /etc/letsencrypt/certbot-auto renew --webroot -w ~/domoticz/www/ --deploy-hook ~/domoticz/scripts/deploy-cert.sh >/dev/null
The script
#!/bin/bash
sudo mv /home/pi/domoticz/server_cert.pem /home/pi/domoticz/server_cert.pem.org
sudo cat /etc/letsencrypt/live/mysite.duckdns.org/privkey.pem >> /home/pi/domoticz/server_cert.pem
sudo cat /etc/letsencrypt/live/mysite.duckdns.org/fullchain.pem >> /home/pi/domoticz/server_cert.pem
sudo cp /home/pi/domoticz/server_cert.pem /home/pi/domoticz/letsencrypt_server_cert.pem
sudo cat /etc/ssl/certs/dhparam.pem >> /home/pi/domoticz/server_cert.pem
sudo /etc/init.d/domoticz.sh restart
My idea. This certificat can or not serve the 2 services (domoticz and dzga)?

If not is there a solution? If yes how to do?

Thank's for your help
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 »

@samourai47, I use for myself ngrok for this.
I don't know if tje issue could be that the certificate can't be used on 2 service.

What does the logging in DZGA say?
Do you see al the domoticz devices in DZGA?
Did you downloaded and renamed the json file from google and saved it in the dzga folder?
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 »

Thank's xavier82 for your help
I try to install ngrok. It work's...
A question. With a free version of ngrok, i must change the configuration on console google each time i reboot the raspberry?
Thank for your help
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: Tuesday 27 October 2020 12:11 Thank's xavier82 for your help
I try to install ngrok. It work's...
A question. With a free version of ngrok, i must change the configuration on console google each time i reboot the raspberry?
Thank for your help
You can use a reverse proxy see dzga wiki for example
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
portafreak
Posts: 6
Joined: Tuesday 08 November 2016 20:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

DZGA Service blocking login at boot?

Post by portafreak »

DZGA seems to be blocking the login prompt when the raspberry boots:

Image

Is there any way to fix that? My unit file looks like this:

Code: Select all

[Unit]
Description=Domoticz-Google-Assistant Service
After=multi-user.target
[email protected]

[Service]
Environment=VIRTUAL_ENV=/home/pi/Domoticz-Google-Assistant/env
Environment=PATH=/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/
User=pi
Restart=on-failure

[Install]
WantedBy=multi-user.target



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 »

Hello
I don't undestand. All works fine for 3 days. I must reboot aund dzga dosen't work. I change nothing, juste update and upgrade my system
The probleme is when i set ngrok_tunnel : true

Imossible to log to UI dzga. If i set to false no soucy
My config
# Configuration:
port_number: 3030
# Debug, Info or Error
loglevel: 'Info'
# Set logtofile: 'false' logs will not show in the LOG tab. Set logtofile: 'Overwrite' or true Log file will be overwritten when dzga server restarts
# Set logtofile: 'Append' Logs will append to logfile when dzga server restarts
logtofile: false
# If pathToLogFile is commented, removed or set to '', logs will be saved in Domoticz-Google-Assistant folder
pathToLogFile: ''
# Enable or disable UI
userinterface: true
# Check for updates
CheckForUpdates: true
# Change pidfile name and path if needed
# PidFile: '/var/run/dzga.pid'

# Instantly create a public HTTPS URL. Don't have to open any port on router and do not require a reverse proxy.
# When ngrok_tunnel set to True the auth token is required to keep the tunnel alive.
# Create account at ngrok.com and paste the token in this file.
# Ngrok assigns random urls. When server restart the server gets a new url.
ngrok_tunnel: true
ngrok_auth_token: 1j******************9el1_d5DS899GvZaspqPf3SZ3

# Use SSL encryption in HTTP server if not using ngrok
use_ssl: false
ssl_key: # /path/to/privkey.pem
ssl_cert: # /path/to/fullchain.pem

# Login on Google Home app and configuration interface
auth_user: 'admin'
auth_pass: 'admin'

# Google Assistant Settings:
ClientID: 'clientid_from aog'
ClientSecret: 'clientsecret_from_aog'

# Domoticz Settings:
Domoticz:
ip: 'http://192.168.0.120'
port: '8080'
roomplan: '0'
username: 'toto'
password: '?***********?'
switchProtectionPass: '1234' #Set this to false if ask for pin function is not needed

# Report low battry
Low_battery_limit: 9
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 31 October 2020 22:41 Hello
I don't undestand. All works fine for 3 days. I must reboot aund dzga dosen't work. I change nothing, juste update and upgrade my system
The probleme is when i set ngrok_tunnel : true

Imossible to log to UI dzga. If i set to false no soucy
My config
# Configuration:
port_number: 3030
# Debug, Info or Error
loglevel: 'Info'
# Set logtofile: 'false' logs will not show in the LOG tab. Set logtofile: 'Overwrite' or true Log file will be overwritten when dzga server restarts
# Set logtofile: 'Append' Logs will append to logfile when dzga server restarts
logtofile: false
# If pathToLogFile is commented, removed or set to '', logs will be saved in Domoticz-Google-Assistant folder
pathToLogFile: ''
# Enable or disable UI
userinterface: true
# Check for updates
CheckForUpdates: true
# Change pidfile name and path if needed
# PidFile: '/var/run/dzga.pid'

# Instantly create a public HTTPS URL. Don't have to open any port on router and do not require a reverse proxy.
# When ngrok_tunnel set to True the auth token is required to keep the tunnel alive.
# Create account at ngrok.com and paste the token in this file.
# Ngrok assigns random urls. When server restart the server gets a new url.
ngrok_tunnel: true
ngrok_auth_token: 1j******************9el1_d5DS899GvZaspqPf3SZ3

# Use SSL encryption in HTTP server if not using ngrok
use_ssl: false
ssl_key: # /path/to/privkey.pem
ssl_cert: # /path/to/fullchain.pem

# Login on Google Home app and configuration interface
auth_user: 'admin'
auth_pass: 'admin'

# Google Assistant Settings:
ClientID: 'clientid_from aog'
ClientSecret: 'clientsecret_from_aog'

# Domoticz Settings:
Domoticz:
ip: 'http://192.168.0.120'
port: '8080'
roomplan: '0'
username: 'toto'
password: '?***********?'
switchProtectionPass: '1234' #Set this to false if ask for pin function is not needed

# Report low battry
Low_battery_limit: 9
You can try start manually to see the out put:

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
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
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 »

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
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: 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
Try reinstall ngrok
cd /home/${USER}/
source Domoticz-Google-Assistant/env/bin/activate
pip3 install pyngrok
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
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 »

hello
I make change on my domoticz devices.
I update syns 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

A solution?
Last edited by samourai47 on Saturday 07 November 2020 15:22, edited 1 time in total.
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 »

Sorry but i have an another question.
I have many temperature in my house. For example an is
Temperature du Salon with idx : 150
I want when i ask the temperature Goggle voice said :" La temperature du salon" est de 19°, and no just "La température est de 19°"
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 »

Hi,

Trying to get working dzga on rpi4.
Few infos on the RPi4 setup:
- Domoticz 2020.2
- Octoprint
- Homebridge
- Plex server,
- Nextcloud,
- Dzga
- in fex others servers,...
- reverse proxy with ssl management through haproxy.

Everything works impressively good expect few issues with current on progress configuration of dzga.
I can get syncing data through google and dzga.

Log level to Debug, but no errors in it.
anyway I think there is an mistake with the oauth currently.
I did the following tests:
- https://[my public url]/smarthome ---> not supported
- https://[my public url]/oauth ----> response_type must equal "code"
- https://[my public url]/token ----> Page not found!: '/token'

If I replace "https://[my public url]/" to "http://localhost:3030/" I get the same replies.
Then I believe there is something wrong into my config.yaml or smart-homekey.json.
Nevertheless I did follow the wiki https://github.com/DewGew/Domoticz-Goog ... stant/wiki upto chapter 4 without apparent issue.

Here is the log:


2020-11-06 08:43:02 - INFO - Connecting to Domoticz on http://192.168.1.2:8080
2020-11-06 08:43:02 - DEBUG - Starting new HTTP connection (1): 192.168.1.2:8080
2020-11-06 08:43:02 - DEBUG - http://192.168.1.2:8080 "GET /json.htm?type=command¶m=addlogmessage&message=Connected%20to%20Google%20Assistant%20with%20DZGA%20v1.8.13 HTTP/1.1" 200 49
2020-11-06 08:43:02 - DEBUG - Popen(['git', 'version'], cwd=/, universal_newlines=False, shell=None, istream=None)
2020-11-06 08:43:02 - DEBUG - Popen(['git', 'version'], cwd=/, universal_newlines=False, shell=None, istream=None)
2020-11-06 08:43:02 - DEBUG - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2020-11-06 08:43:02 - DEBUG - https://raw.githubusercontent.com:443 "GET /DewGew/Domoticz-Google-Assistant/master/const.py HTTP/1.1" 200 9029
2020-11-06 08:43:02 - DEBUG - <pid.posix.PidFile object at 0xb5cefe68> entering setup
2020-11-06 08:43:02 - DEBUG - <pid.posix.PidFile object at 0xb5cefe68> create pidfile: /run/user/1000/dzga.pid
2020-11-06 08:43:02 - DEBUG - <pid.posix.PidFile object at 0xb5cefe68> check pidfile: /run/user/1000/dzga.pid
2020-11-06 08:43:02 - INFO - ========
2020-11-06 08:43:02 - INFO - Started DZGA v1.8.13 server at port 3030
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - Visit http://localhost:3030/settings to access the user interface
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - =========
2020-11-06 08:43:02 - INFO - Visit the Actions on Google console at http://console.actions.google.com
2020-11-06 08:43:02 - INFO - Under Develop section, replace the fulfillment URL in Actions with:
2020-11-06 08:43:02 - INFO - https://[your public url]/smarthome
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - In Account linking, set the Authorization URL to:
2020-11-06 08:43:02 - INFO - https://[your public url]/oauth
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - Then set the Token URL to:
2020-11-06 08:43:02 - INFO - https://[your public url]/token
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - Finally press 'SAVE' and then 'TEST' button
2020-11-06 08:43:02 - INFO - =======
2020-11-06 08:43:02 - DEBUG - Starting new HTTP connection (1): 192.168.1.2:8080
2020-11-06 08:43:02 - DEBUG - http://192.168.1.2:8080 "GET /json.htm?type=devices&plan=0&filter=all&used=true HTTP/1.1" 200 3606
2020-11-06 08:43:02 - DEBUG - {
"Je pars": {
"idx": 1,
"type": "Scene",
"state": "On",
"lastupdate": "2019-05-08 17:10:06",
"willReportState": true
}
}
Many other lines for each device without error.

any idea what to do ? I believe that as long as I don't get a good answer to http://localhost:3030/token, I will not go ahead. How to see what is blocking this ?
Is there any others redirections required than the following ones for the reverse proxy ?:
- https://[my public url]/smarthome
- https://[my public url]/oauth
- https://[my public url]/token
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: Friday 06 November 2020 9:07 Hi,

Trying to get working dzga on rpi4.
Few infos on the RPi4 setup:
- Domoticz 2020.2
- Octoprint
- Homebridge
- Plex server,
- Nextcloud,
- Dzga
- in fex others servers,...
- reverse proxy with ssl management through haproxy.

Everything works impressively good expect few issues with current on progress configuration of dzga.
I can get syncing data through google and dzga.

Log level to Debug, but no errors in it.
anyway I think there is an mistake with the oauth currently.
I did the following tests:
- https://[my public url]/smarthome ---> not supported
- https://[my public url]/oauth ----> response_type must equal "code"
- https://[my public url]/token ----> Page not found!: '/token'

If I replace "https://[my public url]/" to "http://localhost:3030/" I get the same replies.
Then I believe there is something wrong into my config.yaml or smart-homekey.json.
Nevertheless I did follow the wiki https://github.com/DewGew/Domoticz-Goog ... stant/wiki upto chapter 4 without apparent issue.

Here is the log:


2020-11-06 08:43:02 - INFO - Connecting to Domoticz on http://192.168.1.2:8080
2020-11-06 08:43:02 - DEBUG - Starting new HTTP connection (1): 192.168.1.2:8080
2020-11-06 08:43:02 - DEBUG - http://192.168.1.2:8080 "GET /json.htm?type=command¶m=addlogmessage&message=Connected%20to%20Google%20Assistant%20with%20DZGA%20v1.8.13 HTTP/1.1" 200 49
2020-11-06 08:43:02 - DEBUG - Popen(['git', 'version'], cwd=/, universal_newlines=False, shell=None, istream=None)
2020-11-06 08:43:02 - DEBUG - Popen(['git', 'version'], cwd=/, universal_newlines=False, shell=None, istream=None)
2020-11-06 08:43:02 - DEBUG - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2020-11-06 08:43:02 - DEBUG - https://raw.githubusercontent.com:443 "GET /DewGew/Domoticz-Google-Assistant/master/const.py HTTP/1.1" 200 9029
2020-11-06 08:43:02 - DEBUG - <pid.posix.PidFile object at 0xb5cefe68> entering setup
2020-11-06 08:43:02 - DEBUG - <pid.posix.PidFile object at 0xb5cefe68> create pidfile: /run/user/1000/dzga.pid
2020-11-06 08:43:02 - DEBUG - <pid.posix.PidFile object at 0xb5cefe68> check pidfile: /run/user/1000/dzga.pid
2020-11-06 08:43:02 - INFO - ========
2020-11-06 08:43:02 - INFO - Started DZGA v1.8.13 server at port 3030
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - Visit http://localhost:3030/settings to access the user interface
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - =========
2020-11-06 08:43:02 - INFO - Visit the Actions on Google console at http://console.actions.google.com
2020-11-06 08:43:02 - INFO - Under Develop section, replace the fulfillment URL in Actions with:
2020-11-06 08:43:02 - INFO - https://[your public url]/smarthome
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - In Account linking, set the Authorization URL to:
2020-11-06 08:43:02 - INFO - https://[your public url]/oauth
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - Then set the Token URL to:
2020-11-06 08:43:02 - INFO - https://[your public url]/token
2020-11-06 08:43:02 - INFO -
2020-11-06 08:43:02 - INFO - Finally press 'SAVE' and then 'TEST' button
2020-11-06 08:43:02 - INFO - =======
2020-11-06 08:43:02 - DEBUG - Starting new HTTP connection (1): 192.168.1.2:8080
2020-11-06 08:43:02 - DEBUG - http://192.168.1.2:8080 "GET /json.htm?type=devices&plan=0&filter=all&used=true HTTP/1.1" 200 3606
2020-11-06 08:43:02 - DEBUG - {
"Je pars": {
"idx": 1,
"type": "Scene",
"state": "On",
"lastupdate": "2019-05-08 17:10:06",
"willReportState": true
}
}
Many other lines for each device without error.

any idea what to do ? I believe that as long as I don't get a good answer to http://localhost:3030/token, I will not go ahead. How to see what is blocking this ?
Is there any others redirections required than the following ones for the reverse proxy ?:
- https://[my public url]/smarthome
- https://[my public url]/oauth
- https://[my public url]/token
Those cant be a local ip. Need to be accessed from internet
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: Thursday 05 November 2020 9:21 Sorry but i have an another question.
I have many temperature in my house. For example an is
Temperature du Salon with idx : 150
I want when i ask the temperature Goggle voice said :" La temperature du salon" est de 19°, and no just "La température est de 19°"
This is a google issue. Dzga cant manage google assistant voice responses
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 06 November 2020 14:11
Those cant be a local ip. Need to be accessed from internet
Hi,

It is accessible from the internet (through a free dynamic DNS : duckdns).
If I do https://xxx.duckdns.org/oauth ---> response_type must equal "code"
https://xxx.duckdns.org/token ---> Page not found!: '/token'
https://xxx.duckdns.org/smarthome ---> not supported.
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 »

Fixed, please follow all steps in the wiki, including step 4, do not test dzga before that step :-)
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 »

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
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 »

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
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,

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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest