Z-Wave and Google Home issue

Same thing ^^

pi@raspberrypi:~ $ dig plus.gladysassistant.com

<<>> DiG 9.11.5-P4-5.1+deb10u5-Raspbian <<>> plus.gladysassistant.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28120
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;plus.gladysassistant.com.      IN      A

;; ANSWER SECTION:
plus.gladysassistant.com. 300   IN      A       188.114.97.3
plus.gladysassistant.com. 300   IN      A       188.114.96.3

;; Query time: 72 msec
;; SERVER: 9.9.9.9#53(9.9.9.9)
;; WHEN: Wed Mar 23 14:08:19 CET 2022
;; MSG SIZE  rcvd: 85

Well, I don’t know what to do, so I don’t have any local leads. :face_with_spiral_eyes:

I’ll check out the new ones, but you don’t have any issues, right?
Otherwise, too bad, I’ll wait for the Syno app to reinstall from scratch.

I have no issues with a similar configuration, which is why I don’t understand

I rebooted just in case the config didn’t propagate everywhere, I’ll continue to monitor, thanks
I still had the same issue around 5 PM ^^

@spenceur Ok it seems the issue is not coming from there, we’re making progress :slight_smile:

To better explain what happens in the « reportState Â» function, as you have Google Home connected, your local instance propagates to Google Home the changes in the values of your devices to update the state on the Google Home side. This allows you, for example, if you have a lamp, to see the correct current state of your lamp the next time you open the Google Home app, even if in the meantime there have been changes on the Gladys side.

Of course, to avoid Gladys Plus spamming Google Home if you have very verbose devices locally, the local instance sends a maximum of one event per device and per 5 seconds.

Example: If you turn your light on, off, on, off 12 times in a row, Gladys will only send one event and not 12, I’ve thought about it well :smiley: (And if there are no state changes, Gladys sends nothing)

However, if you have 10 different lamps that turn on at the same time at your place, Gladys will send 10 requests more or less at the same time.

And that’s where I think there could be an issue.

EAI_AGAIN errors do not necessarily mean that it comes from the DNS server, it can also be the getaddrinfo service that gets confused locally when it is under load.

And that’s where we need to check if that’s the case: if the integrations you use locally suddenly become very verbose (or if you have a scene that turns on all the bulbs in your house at the same time), I wonder if this can cause problems with concurrent access to this local DNS service, and result in errors.

We would need to see in your case how often you update the states of your devices (this can be found in the DB in the t_device_feature_state table), and see if there are times of the day when you have high contention. If that’s the case, it doesn’t necessarily mean that’s it, but it’s a first lead.

Nevertheless, don’t panic @spenceur, the only consequence of these errors is that Google Home is not up to date with the last local state, it’s not critical to the functioning of Gladys :slight_smile:

Hi @spenceur,

Following our conversation this morning, I made a PR to limit the frequency of calls to Gladys Plus at the level of this network call « google home reportState Â».

I limited it to 2 concurrent calls, and a minimum of 200ms per call, which avoids saturating your Pi in case of a peak of local state changes!

The PR is here:

I merged it earlier, it will be in the next version of Gladys, probably at the beginning of next week :slight_smile:

You haven’t stopped at all!
Well done

For your information, this fix is available in Gladys Assistant v4.8.2 :slight_smile:

I hope you will see fewer DNS errors in your logs with this fix, keep us updated!

More information: