For those who want to see a demo of the feature, I’ve put a video on Twitter that shows the setup and use of Google Home in less than a minute!
I’m proud of myself ![]()
https://twitter.com/pierregillesl/status/1405786308329365504
For those who want to see a demo of the feature, I’ve put a video on Twitter that shows the setup and use of Google Home in less than a minute!
I’m proud of myself ![]()
https://twitter.com/pierregillesl/status/1405786308329365504
Honestly, this feature is top-notch. Smart home assistants (Google / Alexa) are everywhere. In this case, I have a slightly cheaper Alexa, and it would be a great feature to develop. It clearly adds interest to Gladys because you can mix Gladys and Google assistants, etc!
That’s great! To be honest, I’ve had a custom image of Gladys with Google Home for a few months now, the only thing missing is the local network setup, otherwise it works pretty well ![]()
However, we will need to maintain the conversion of Gladys devices vs Google devices for new types and new features.
Hello! In fact, it’s a great feature @pierre-gilles, well done!
I would be interested, however, in the local part by @AlexTrovato
!
I’m addressing a detail in your implementation, @AlexTrovato. Currently, you call reportState with every state change of a device.
The issue is that Google’s API has limits (the Pi/network on which most people run Gladys as well), and some on the forum have quite robust installations that refresh their states very frequently.
In Google’s documentation, it’s specified:
On my side, I coded a « debounce » per device, to limit the sending of new states and call their API at worst every X seconds.
For now, I set it to 5 seconds (a device can update its state once every 5 seconds).
The code is as follows:
const SEND_STATE_TIMEOUT = 5 * 1000;
if (this.forwardStateToGoogleHomeTimeouts.has(event.device_feature)) {
clearTimeout(this.forwardStateToGoogleHomeTimeouts.get(event.device_feature));
}
const newTimeout = setTimeout(() => {
sendCurrentState(event.device_feature);
}, SEND_STATE_TIMEOUT);
this.forwardStateToGoogleHomeTimeouts.set(event.device_feature, newTimeout);
The downside, however, is that this delays the sending of all events by 5 seconds, but it’s required for this technique to work: if we used a throttle instead of a debounce, we would end up with a « false » state on Google’s side (as it would only be the old state).
What do you think about it?
Hello everyone!
To keep you updated, the continuous integration is progressing well.
I’m at the finishing stages, but the final stretch is more complicated than I thought ![]()
Before release, it’s rather well done on Google’s side, there are automated tests that are put in place to check that the integration works well, and then the app must be validated by Google. This takes about 1-2 weeks from what I’ve read.
Currently, I’m at the integration tests:
In parallel, I’m handling the « legal » part so that the application is accepted by Google (brand verification, website, privacy policy, terms and conditions, etc.)
Once all that is ready, I have a certification form to fill out for Google to accept the application and then we’ll have to wait for their feedback.
I’ll keep you posted!
To keep you updated, I’m still working on it, but I’m completely stuck.
The integration works, but I can’t get the Google-side tests to run, which are necessary integration tests to be validated.
It’s very « black box » on their end, it’s very hard to know what they expect. The documentation is very poor, and even wrong in some places (the attributes are not the same depending on whether it’s the request body or the response, the Google API is really not consistent..).
I’m not the only one on the forums to have this kind of problem, and so I spend my days (literally
) browsing the internet to find the missing detail in the current integration.
I read the code of other home automation systems to find the difference but it’s really a needle in a haystack, especially since it works functionally, it’s really the tests that don’t work on Google’s side!
In short, the tests work well when I have a bulb without temperature management, but as soon as I add temperature management it fails:
I have the impression that as soon as I add the « temperatureK » attribute in the reportState, Google doesn’t see it even though I send it!
It’s driving me crazy ![]()
A few hours later, I found a lead, I’m not sure if it’s the solution but at this point.. ![]()
Basically, I think the Google API only accepts lamps that have the RGB color feature OR temperature, but not both, it’s one or the other.
I managed to pass the tests by configuring a Gladys instance with 2 bulbs:
Color and temperature do not work together
In any case, the integration tests pass with this solution:
After that, what seems strange to me is that the tests seem to be designed to work on a bulb that would have all the features together, so it seems odd.
After that, it’s hard to know: no examples from Google, it’s complete confusion
Edit: so indeed it’s what I thought, the tests are therefore in « skip » and we only have 89% coverage with this scenario:
After that, it’s hard to know if it will pass the review or not
Well, I created a StackOverflow issue to ask for help, I’m clearly stuck.
First time in years that I go to StackOverflow to ask a question ^^
If someone here has the answer or even just a clue to make these tests work, I’m interested!
Hello everyone!
Some news about this integration, I finally received an answer on Stackoverflow (it’s quite technical, you can see the answer on Stackoverflow if you’re interested: https://stackoverflow.com/questions/68205798/in-reportstate-of-the-google-smarthome-api-temperaturek-amp-spectrumrgb-doesn)
I managed to pass the tests with this answer, and I filled out their 12-page form to apply for certification, which will then allow me to request a review of the Gladys Assistant application.
Normally, the certification will take 2 weeks (fingers crossed that it passes), then it will probably take the same amount of time for the review (fingers crossed that it passes). Since it’s the first review, it wouldn’t be surprising if there are feedbacks followed by a new 2-week period to re-validate… I won’t hide the fact that it’s not very pleasant to work with them on this integration, Google is a big company and there is no way to contact them, it’s very black box from A to Z ^^ The « code » part will ultimately represent only 5% of the time of this integration.
I threw my bottle into the sea, I cross my fingers so that we can have this in Gladys as soon as possible ![]()
I’m getting back to you, I hadn’t noticed but it’s possible to make an « alpha » release without Google validation, so I can give you access to this feature in advance while the integration is being validated! ![]()
I think it would be great to have alpha testers even before releasing it, so it’s actually a good thing that we’re taking this path before the release.
I’m going on summer vacation soon, so I’m not sure I’ll have time to give you access now, but if you’re interested in joining this alpha at the start of the school year (whether you’re a Gladys Plus user or not), you can reply to this message that you’re interested and we’ll discuss the details in private
(as I would need your Google Home email)
Hello! I am interested ![]()
If you want me to test, I’m going on vacation Sunday
Interested in testing too ![]()
I am interested in testing
Hello everyone!
For your information, Google has just responded to my certification request: it’s moving forward! ![]()
On Gladys’ side, I just need to set up a few integration tests, merge them into master, and then release Gladys.
Then, on Google’s side, I will start the process for the alpha, and at that point, I will ask you for your Google email to add you to the alpha.
I’ll keep you updated on all this!
Update: I fixed the tests and merged to master. It will go out in alpha in the next version of Gladys ![]()
Meanwhile, I continue to move forward with Google for certification and official integration!
To keep you updated, now that I’m in contact with Google, things are moving much faster! (They were probably on vacation this summer)
They respond quite quickly to emails, and we’re in the process of launching a test procedure
Fingers crossed! ![]()
Hello everyone!
News about the Google Home integration.
After a week of almost daily exchanges with my contact at Google, I finally managed to give access to the Google Home integration via Gladys Plus to @VonOx, our first tester ![]()
To give you the details, the « release alpha/beta » feature offered by the Google console is broken on Google’s side, and according to my contact, it won’t be fixed anytime soon ^^
I won’t tell you about the look of our email exchanges, I thought that at Google they were pros: not at all, it’s complete DIY
Especially since internally the information doesn’t seem to circulate well, so the guy was learning about the state of the service through my observations.
In short, to give @VonOx access to this alpha version, my contact at Google advised me to simply give full (read-only) access to my Google admin console. It’s not crazy but it does the job for the alpha.
Given these conditions, I don’t think I can do an « extended » alpha as I planned (sharing the integration with dozens of testers), because even @VonOx I trust him, but I can’t give free access to my Google console on the internet ^^
So the plan is rather to do a production release quite quickly, and before talking publicly about the release, I will share the information privately for testing with those who wish to ![]()
Correction of the issue encountered with @VonOx: