Python Plugin: Domoticz-Google-Plugin

Python and python framework

Moderator: leecollings

Post Reply
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Python Plugin: Domoticz-Google-Plugin

Post by schulpr »

Hi,

I'm trying to send a message to my Google Home Mini device. Up untill now without succces. I get a timeout.

(Google Home) [Google Home - Huiskamer Volume] Update 2(2):'50'(40): 0(0)
2019-03-26 07:13:38.884 (Google Home) [Google Home - Huiskamer Volume] Update 0(2):'50'(50): 0(0)
2019-03-26 07:13:38.104 Status: User: Admin initiated a switch command (11/Raamlamp/On)
2019-03-26 07:13:38.476 Status: Notification: This is a test message
2019-03-26 07:13:48.731 (Google Home) [Google Home - Huiskamer Volume] Update 0(0):'40'(50): 0(0)
2019-03-26 07:13:48.787 (Google Home) [Google Home - Huiskamer Volume] Update 2(0):'40'(40): 0(0)
2019-03-26 07:13:48.722 Error: (Google Home) Notification 'This is a test message', sent to 'Huiskamer' timed out

I'm not sure in what to fill in for the Voice message IP address. Is this the 192.168.etc with port number like 8080? Do I need to forward a port to my Pi?

Thanks for any suggestions!

Kind regards, Rob
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by Dnpwwo »

@schulpr,

Good news ! No need for nasty IP & port numbers !

That parameters accepts the Google device's 'friendly name'. This is the name that you gave the device during it's initial configuration or, if you created a device group, the group name.

To make sure you get it right, open the Google Home app on your phone and use the device name as shown.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by schulpr »

Hi Dnpwwo,

Are we talking about the same parameter, the "Voice message IP address"?

In "Voice Device/Group" I have the name of my Mini, "Huiskamer".

Kind regards, Rob
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

Let someone write step by step how to send a message to my google mini speaker
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by Dnpwwo »

@schulpr,

My bad. You are correct the "Voice message IP address" is the IP address of the computer your Domoticz instance is running on (probably is 192.168.x.x).

The port should NOT be 8080. It needs to be one that is not in use, try the default.

If you are on a normal home network there should be no need for port forwarding

There is a new version from tonight (1.13.1) that may resolve the time out error message
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
snellejellep
Posts: 241
Joined: Tuesday 16 May 2017 13:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Neterlands
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by snellejellep »

kniazio wrote:Let someone write step by step how to send a message to my google mini speaker
I made this video: https://youtu.be/bC3HEBhbp0k i hope that answers your question

Verstuurd vanaf mijn SM-G975F met Tapatalk

raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by schulpr »

@Dnpwwo,

It's working fine now. Thanks!

Regards, Rob
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

snellejellep wrote: Wednesday 27 March 2019 11:25
kniazio wrote:Let someone write step by step how to send a message to my google mini speaker
I made this video: https://youtu.be/bC3HEBhbp0k i hope that answers your question

Verstuurd vanaf mijn SM-G975F met Tapatalk
I do not have Chromecast for Google Home mini only
How do I send a message to Google Home Mini?
snellejellep
Posts: 241
Joined: Tuesday 16 May 2017 13:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Neterlands
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by snellejellep »

You can put in the name of the google home mini and it should work

Verstuurd vanaf mijn SM-G975F met Tapatalk

raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

snellejellep wrote: Wednesday 27 March 2019 13:38 You can put in the name of the google home mini and it should work

Verstuurd vanaf mijn SM-G975F met Tapatalk
Where should I enter it?
snellejellep
Posts: 241
Joined: Tuesday 16 May 2017 13:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Neterlands
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by snellejellep »

Under hardware, see pictureImage

Verstuurd vanaf mijn SM-G975F met Tapatalk
raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

After the last update, I have something like this in the logs:

Code: Select all

 Error: (Google Home) 'gtts' module import error: No module named 'gtts': Voice notifications will not be enabled
DutchHans
Posts: 229
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by DutchHans »

Hi, there has been a major change in the plugin. You need to install gtts. See the readme on github..it says in fetail what's needed. You also need to manually create the directory "messages" in the plugin directory.

Succes, Hans
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

During installation of gtts, there were such errors:

Code: Select all

Collecting beautifulsoup4 (from bs4->gtts)
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 594, in urlopen
    chunked=chunked)
  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 391, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 387, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.5/http/client.py", line 1198, in getresponse
    response.begin()
  File "/usr/lib/python3.5/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 792, in get_page
    "Cache-Control": "max-age=600",
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment
    total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
The previous error still occurs

Code: Select all

2019-04-10 21:37:19.928 Error: (Google Home) 'gtts' module import error: No module named 'gtts': Voice notifications will not be enabled
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

It's OK. I installed gtts again by sudo
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by heggink »

Any idea how to resolve
discoveryCallback: 'Chromecast' object has no attribute 'start'
The plugin starts fine, then shows this error and no devices are created.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by heggink »

nvm, needed to read the forum first and then update pychromecast. Sorry.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
deve87
Posts: 45
Joined: Saturday 08 April 2017 8:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by deve87 »

I can't get my notifications working. The Home mini activates when notifications is send, adjusting volume and plays a short announce melody, that's all. No text.

I use
commandArray['Google - Spiller'] = "SendNotification God morgen"

After 60 sec. I got

Error: (Google høytaler) Notification sent to 'Stue google' timed out
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by kniazio »

I have the same
gerbenvanasselt
Posts: 74
Joined: Friday 07 September 2018 14:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta 4.1
Location: Netherlands
Contact:

Re: Python Plugin: Domoticz-Google-Plugin

Post by gerbenvanasselt »

The text widget is not updated anymore with info on the track that is playing. The rest works great.
Running domo 4.1063 and python 3.5.3

Tried with TuneIn, youtube and Poweramp. Status remains 0 or none.

Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest