Domoticz to Google Assistant integration

Alexa, Google Home and Siri

Moderator: leecollings

Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to Google Assistant integration

Post by Justintime »

I can't get the service to run. Also i dont see config.yaml in the Domoticz-Google-Assistant folder. There is a file in the config folder. Do i need to rename and replace??

This is the error message. I saw another member had the same problem he had to remove the folder. Tried that but didnt work. I am a new user so didnt set it up.

As far as i understand i can acces the http://localhost:3030/settings without setting up the rest first??

My device runs Buster.

Code: Select all

● dzga.service - Domoticz-Google-Assistant Service
   Loaded: loaded (/etc/systemd/system/dzga.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-02-23 10:22:50 CET; 6min ago
  Process: 16981 ExecStart=/home/pi/Domoticz-Google-Assistant/env/bin/python3 /home/pi/Domoticz-Google-Assistant/ (code=exited, status=203/EXEC)
 Main PID: 16981 (code=exited, status=203/EXEC)

Feb 23 10:22:50 raspberrypi systemd[1]: dzga.service: Service RestartSec=100ms expired, scheduling restart.
Feb 23 10:22:50 raspberrypi systemd[1]: dzga.service: Scheduled restart job, restart counter is at 5.
Feb 23 10:22:50 raspberrypi systemd[1]: Stopped Domoticz-Google-Assistant Service.
Feb 23 10:22:50 raspberrypi systemd[1]: dzga.service: Start request repeated too quickly.
Feb 23 10:22:50 raspberrypi systemd[1]: dzga.service: Failed with result 'exit-code'.
Feb 23 10:22:50 raspberrypi systemd[1]: Failed to start Domoticz-Google-Assistant Service.
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

Try start manually the you can see in terminal if there is any errors. If it works maby something is wrong in services.

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
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to Google Assistant integration

Post by Justintime »

DewGew wrote: Sunday 23 February 2020 12:24 Try start manually the you can see in terminal if there is any errors. If it works maby something is wrong in services.

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
There is no file or directory. I have checked with winscp. And indeed there is none.

Code: Select all

pi@raspberrypi:~ $ cd /home/${USER}/
pi@raspberrypi:~ $ sudo systemctl stop dzga
pi@raspberrypi:~ $ source Domoticz-Google-Assistant/env/bin/activate
-bash: Domoticz-Google-Assistant/env/bin/activate: No such file or directory
pi@raspberrypi:~ $
Naamloos.jpg
Naamloos.jpg (130.54 KiB) Viewed 3273 times
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

Justintime wrote: Sunday 23 February 2020 16:06 Naamloos.jpg
simpliest is to remove Domoticz-Google-assistant:

Code: Select all

cd /home/${USER/
sudo systemctl stop dzga
sudo systemctl disable dzga
sudo rm /etc/systemd/system/dzga.service
sudo rm -r Domoticz-Google-Assistant
then run the installer:

Code: Select all

bash <(curl -s https://raw.githubusercontent.com/DewGew/dzga-installer/master/install.sh)
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to Google Assistant integration

Post by Justintime »

DewGew wrote:
Justintime wrote: Sunday 23 February 2020 16:06 Naamloos.jpg
simpliest is to remove Domoticz-Google-assistant:

Code: Select all

cd /home/${USER/
sudo systemctl stop dzga
sudo systemctl disable dzga
sudo rm /etc/systemd/system/dzga.service
sudo rm -r Domoticz-Google-Assistant
then run the installer:

Code: Select all

bash <(curl -s https://raw.githubusercontent.com/DewGew/dzga-installer/master/install.sh)
Thanks... Turneded out there was a checksum error on a Debian package from another source. So it only installed a part of your application.

On to the next challenges to get it to work.
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to Google Assistant integration

Post by Justintime »

Great everything is working fine now.

Got a problem with APi HomoGraph but I have set report state to False. As far as i have read it's a language issue? My language is Dutch.

Now i am trying to get the webcams to work on my Nest hub.

FFmpeg decoder is working i see a file being created in var/html/cam

But how do i get the stream created to the Hub?

I have tried http://domoticz_ip:port/cam/voordeur.m3u8

Do I oversee something??
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

Justintime wrote: Sunday 01 March 2020 22:04 Great everything is working fine now.

Got a problem with APi HomoGraph but I have set report state to False. As far as i have read it's a language issue? My language is Dutch.

Now i am trying to get the webcams to work on my Nest hub.

FFmpeg decoder is working i see a file being created in var/html/cam

But how do i get the stream created to the Hub?

I have tried http://domoticz_ip:port/cam/voordeur.m3u8

Do I oversee something??
I have problem also with hls files.
But it works with this url https://content.jwplatform.com/manifests/yp34SRmf.m3u8 ??
Somthing with decoding or headers or similar. I have no clue.

I manage to get it to work with mp4 file thou
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: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

Dzga Beta(V.1.6.2) now supports Thermostat modes

Merge selector device retaining the modes for thermostats, supports following levels: Off - Heat - Cool - Auto - Eco

Add modes to thermostat:
  • Create selector device with levels above
  • Create thermostat device
In thermostat description add:

Code: Select all

<voicecontrol>
selector_modes_idx = 123
</voicecontrol>
or in config.yaml:

Code: Select all

Device_Config:
  234:
    selector_modes_idx = 123
There is a small Bug! Selector device idx must to be lower than thermostat idx
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

After this last update to 1.6.2 1 (or more) of my devices got type "Hidden" and is not visible anymore on my phone.
And Google home does not know this device anymore. Got a message that the device got disconnected.
How can I add this device again?
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

EddyG wrote: Wednesday 04 March 2020 17:09 After this last update to 1.6.2 1 (or more) of my devices got type "Hidden" and is not visible anymore on my phone.
And Google home does not know this device anymore. Got a message that the device got disconnected.
How can I add this device again?
What kind of device? light, temp, etc.
Do you have any settings for this device in description or in config.yaml?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

Found it. accidentally mistyped an idx in the config.yaml. :oops: Tnx.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

Other question.
I have my cams running in Domoticz and connected to a switch. My cams do not support rtsp anymore (Foscam FI9803p latest firmware).
The url I use is not a stream but a snapshot and that works perfect every 1-2 seconds.
The url I use is:

Code: Select all

http://192.168.x.x/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=#USERNAME&pwd=#PASSWORD
Is it possible to get those pictures in the rate of 1-2 seconds to my Chromecast?
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

EddyG wrote: Thursday 05 March 2020 11:18 Other question.
I have my cams running in Domoticz and connected to a switch. My cams do not support rtsp anymore (Foscam FI9803p latest firmware).
The url I use is not a stream but a snapshot and that works perfect every 1-2 seconds.
The url I use is:

Code: Select all

http://192.168.x.x/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=#USERNAME&pwd=#PASSWORD
Is it possible to get those pictures in the rate of 1-2 seconds to my Chromecast?
I cant help you with that. I know that Google Assistant (smart home) support streaming with:
- HLS (HTTP Live Streaming)
- DASH (Dynamic Adaptive Streaming over HTTP)
- Smooth Streaming
- Progressive MP4

You can get a separate solution like zonminder, shinobi cctv or similar to get a streamurl from.
or Maybe this can help you https://www.domoticz.com/forum/viewtopi ... 38&t=30644
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Domoticz to Google Assistant integration

Post by EddyG »

Tnx for the answers. I will look into those. :D
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to Google Assistant integration

Post by Justintime »

You also can make a switch which starts a script. And let VLC stream it to Chromecast.
Home assistant way... U can't make it to work

Install VLC
And this bash script works in ssh command.

#!/bin/bash
cvlc --sout="#chromecast{ip=192.168.1.XXX}" --demux-filter=demux_chromecast rtsp://admin:[email protected]:xx0/Streaming/Channels/1/picture sleep 30 ; kill $!

Rtsp stream which suits your cam.

Unfortunately the bash script don't respond in Domoticz. Saw some other post with same complaint.

Edit:
It now works.

Type this in terminal. VLC become root.

sed -i 's/geteuid/getppid/' /usr/bin/vlc



ressof
Posts: 60
Joined: Thursday 20 April 2017 7:20
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Domoticz to Google Assistant integration

Post by ressof »

Hi

I wonder if I can use Google to change a selector switch?

If it is possible can I have any text on the selector or must it be predefined?
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

ressof wrote: Tuesday 10 March 2020 19:19 Hi

I wonder if I can use Google to change a selector switch?

If it is possible can I have any text on the selector or must it be predefined?
User: Turn on [Level Name] on living room light.
Google Assistant: Turning on [Level Name] on living room light?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to Google Assistant integration

Post by Justintime »

ressof wrote:Hi

I wonder if I can use Google to change a selector switch?

If it is possible can I have any text on the selector or must it be predefined?
You can fill in any name in the Domoticz description box. Something like this.

<voicecontrol>
nicknames = Eettafellamp
</voicecontrol>

Works great! Very happy with this integration.
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz to Google Assistant integration

Post by Ierlandfan »

Can we ask Home for the status? Something like: what's the status of Diningroomlight?
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Domoticz to Google Assistant integration

Post by DewGew »

Ierlandfan wrote: Thursday 12 March 2020 11:12 Can we ask Home for the status? Something like: what's the status of Diningroomlight?
Not "status" but you can ask:
"Is Diningroom light is on?"
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest