Page 1 of 1

domoticz and google assistant on rpi

Posted: Wednesday 12 December 2018 14:32
by pvklink
Hi All,

Last thing i want to accomplish is that after a script in my domoticz has run, is to let my google assistant on my raspberry pi speak, like washmachine is ready or something like that.
I am googling my but off, but i cant find an easy way to let my google assistant rpi speak, by example through iftt and in comination with pushover or something like that!

Who has an idea?

Re: domoticz and google assistant on rpi

Posted: Wednesday 12 December 2018 15:03
by DutchHans
Hi the Chromecast plugin does exactly what you want.
Cheers, Hans

Re: domoticz and google assistant on rpi

Posted: Wednesday 12 December 2018 15:05
by DutchHans
If you want your mobile to speak to you .use voicenotify on android....it speaks all your notifications..

Cheers, Hans

Re: domoticz and google assistant on rpi

Posted: Wednesday 12 December 2018 20:19
by pvklink
Ok , thanks to you all,

I will try the chromecast variant.
Scenario: when a device is on/off or no powerconsumption (wasmachine) to let my google assistant speak!
My chromecast is connected to my tv, do i have to turn my tv on for sound?
My situation:
- i have a rpi with google sdk (speaker + mic) and domoticz client
- tv + chromecast
- rpi with domoticz server (all latest versions)

In the meanwile i have a minimal solution:
i installed domotics(client) on my rpi/google home speaker.
I made a dummy device that activates a bashscript play wavfile)
My domoticz server includes this dummy and activate this.
Lot of work, for each scenario/voice you have to make a dummy, wav-file etc.

Better is a solution that a message can be send from domoticz and translated to voice...

@dutchhans from dutchpeter
1) Do i have to connect the chromecast to the rpi with google assistant on it (i have one connected to my tv)?
2) Can i install the plugin on the rpi domoticz server and let my other rpi device with the google assistant sdk speak?
3) What is possible with the chromecast plugin from domoticz, can i send text with dzventz to it and let it talk?
4) does this work with my configuration
i used this procedure for my rpi/google http://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/

Re: domoticz and google assistant on rpi

Posted: Wednesday 12 December 2018 22:09
by DutchHans
Hi

i myself have voice notify speaking to me.. I have 6 google minis in the houae..but with the Chromecast plugin it speaks to all of them.. my girlfriend is not really fond of that.. so I let it speak out on my mobile phone... I can control the volume, switch it off and it speaks only where I am at that moment....

It works very well for several years now....

If the Chromecast plugin is further developed.. for example: if I am in the livingroom and ask if the washing machine is ready...that it answers in the livingroom...and when I ask the same in the kitchen...it answers on the google mini in the kitchen...

It can be done...Google does it already... But I have no idea how...

Also...the maxsize of the spoken message is too small...
Maybe in the nearby future because we have great developers here...
Regards to all of you,
Hans

Re: domoticz and google assistant on rpi

Posted: Wednesday 12 December 2018 22:14
by pvklink
I just installed it, i dont see any hardware, discover devices is on!
I use the latest beta of domoticz, rpi3, latest raspbian etc...
I filled the chromecast, ip+port of the domoticz, nl-NL, port 8000

Code: Select all

s: (chromecast_tv) Stop directive received.
2018-12-12 22:10:32.129 Status: (chromecast_tv) Exiting work loop.
2018-12-12 22:10:32.175 Status: (chromecast_tv) Disconnected from Tvsonia
2018-12-12 22:10:32.993 Status: (chromecast_tv) Disconnected from Tvhuiskamer
2018-12-12 22:10:38.237 Status: (chromecast_tv) Stopping threads.
2018-12-12 22:10:38.237 Status: (chromecast_tv) Stopped.
2018-12-12 22:10:38.237 Status: (chromecast_tv) Started.
2018-12-12 22:10:39.914 Status: (chromecast_tv) Entering work loop.
2018-12-12 22:10:39.915 Status: (chromecast_tv) Initialized version 3.0.2, author 'Tsjippy'
2018-12-12 22:10:39.917 Status: (chromecast_tv) Checking if images are loaded
2018-12-12 22:10:39.917 Status: (chromecast_tv) Starting up
2018-12-12 22:10:39.936 Status: Incoming connection from: 192.168.20.30
2018-12-12 22:10:39.944 Error: (chromecast_tv) 'onStart' failed 'KeyError'.
2018-12-12 22:10:39.944 Error: (chromecast_tv) ----> Line 560 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-12-12 22:10:39.944 Error: (chromecast_tv) ----> Line 272 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-12-12 22:10:39.944 Error: (chromecast_tv) ----> Line 502 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function updateDevices
2018-12-12 22:10:49.987 Error: (chromecast_tv) http://192.168.20.30:82/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 22:10:50.007 Error: (chromecast_tv) http://192.168.20.30:82/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 22:11:03.774 (chromecast_tv) Connecting to available chromecasts
2018-12-12 22:11:03.774 Status: (chromecast_tv) Checking for available chromecasts
2018-12-12 22:11:12.442 (chromecast_tv) Found these chromecasts: Tvhuiskamer, Tvsonia
2018-12-12 22:11:12.442 (chromecast_tv) Registering listeners for Tvhuiskamer
2018-12-12 22:11:12.443 (chromecast_tv) Done registering listeners for Tvhuiskamer
2018-12-12 22:11:12.443 (chromecast_tv) Registering listeners for Tvsonia
2018-12-12 22:11:12.443 (chromecast_tv) Done registering listeners for Tvsonia
2018-12-12 22:11:12.474 (chromecast_tv) The app of 'Tvsonia' has changed to Backdrop
2018-12-12 22:11:12.475 (chromecast_tv) Will set the domoticz devices to off.
2018-12-12 22:11:12.475 (chromecast_tv) Updated volume to 100
2018-12-12 22:11:12.442 Status: (chromecast_tv) Connected to Tvhuiskamer
2018-12-12 22:11:12.443 Status: (chromecast_tv) Connected to Tvsonia
2018-12-12 22:11:21.985 Error: (chromecast_tv) http://192.168.20.30:82/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 22:11:22.007 Error: (chromecast_tv) http://192.168.20.30:82/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 22:11:31.999 Error: (chromecast_tv) http://192.168.20.30:82/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 22:11:32.021 Error: (chromecast_tv) http://192.168.20.30:82/json.htm?type=command&param=getuservariable&idx= did not return any results.


Re: domoticz and google assistant on rpi

Posted: Thursday 13 December 2018 7:39
by DewGew
Try https://wiki.domoticz.com/wiki/IzSynth on your rpi with Google Assistant SDK.

Re: domoticz and google assistant on rpi

Posted: Sunday 20 January 2019 12:24
by pvklink
Hi i try to install izSynth on my rpi 3 with seed voice2mic.
See
http://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/
https://www.kiwi-electronics.nl/google- ... spberry-pi

i connected the speaker to the jst plug of the seeed card
my google home speaks perfect!

I get an error with izsynth : ( i do see a mp3 file created but no sound! i use a speaker connected to spk of the seedcard

sudo izsynth -e naturalreaders -v Peter -t "Welcome home, mr Stark"
== [1/1] - izsynth Name:[Welcome_home__mr_Stark-919753565] =====================
File exist - input:[/dev/shm/Welcome_home__mr_Stark-919753565.mp3] status:[corrupted] action:[resinthesizing]
Synthesizing - input:[/dev/shm/izsynth-20190120-121510/Welcome_home__mr_Stark-919753565.txt] engine:[naturalreaders] voice:[Peter] output:[/dev/shm/Welcome_home__mr_Stark-919753565.mp3] size:[4,0K] type:[text/plain] result:[ERROR]