Note: from version 4.0.2.0 it's not required to create your own client ID / secret. So the following procedure is not necessary, unless you want to create your own credentials. |
||
NOTE: New HS feature "Run as Service" prevents authorisation prompt. To configure Google credentials HS must run as normal process, not as service.
|
||
2. Create New Project |
||
3.Name the project (any name) |
||
4. Select the created project Note: eaiser option for the following instructions is using project urls, I'll also list the urls - you need to append your project ID to the urls (i.e. project=gcal-3-320002) |
||
5. Select "APIs and services" and Dashboard. Select "ENABLE APIS AND SERVICES" URL: https://console.cloud.google.com/api...=gcal-3-320002 |
||
6. Select "Google Calendar API" and Click ENABLE URL: https://console.cloud.google.com/api...=gcal-3-320002 |
||
7. Select "Create Credentials". Select Google Calendar API from the list, select "User Data", then "Next": URL: https://console.cloud.google.com/api...=gcal-3-320002 |
||
8. CONFIGURE CONSENT SCREEN - Enter App Name, Email (twice), Click "SAVE AND CONTINUE" |
||
9. On SCOPES screen Click "ADD OR REMOVE SCOPES" Select "calendar.readonly" and "calendar.events", click "UPDATE", Click "SAVE AND CONTINUE" |
||
10. "OAuth Client ID" Application type: Desktop App, Click "Create" and "Done" |
||
11. "OAuth consent screen" URL: https://console.cloud.google.com/api...=gcal-3-320002 Test users => ADD USERS Add your gmail address again |
||
12. Select 'pencil' to see the client ID and Secret URL: https://console.cloud.google.com/api...=gcal-3-320002 |
||
13. Copy"Client ID" and "Client Secret" to your Google Calendar Credentials configuration and click "Save" Google should pop-up OAuth authorisation window, follow the prompts. When finished - the plugin should get the list of you calendarts and create HS devices - 5 event devices per calendar. |
Announcement
Collapse
No announcement yet.
Configuring Google Credentials
Collapse
X
-
Configuring Google Credentials
Tags: None
-
Using authenticator.exe for headless HS install
If the HS is installed on headless (no GUI) Linux computer - the last reserve is to use authenticator.exe on another computer which does have GUI (better Windows) to obtain authorization token from Google. The app is included in the plugin install in "HS root"/bin/AKGoogleCalendar - copy the whole folder to Windows computer.
Note 1: Before using authenticator.exe you still have to obtain (and save/Submit on the config page) ClientID and ClientSecret from Google - follow instructions post #2 Configuring Google Credentials.
Note 2: On Linux even if you execute a command from the directory where it's located - you still need to prepend path, i.e:Code:./authenticator.exe
Code:sudo chmod a+x authenticator.exe
Now execute:
Code:authenticator.exe ClientID ClientSecret
Code:********************************************* Credential file saved to: D:\My\Temp\Release\token.json D:\My\Temp\Release\token.json\Google.Apis.Auth.OAuth2.Respon ses.TokenResponse-user ********************************************* pp08kp35e77ap05mmm94a00gmk@group.calendar.google.com S-Heat #f691b2 i04d1nir7395dmril3dvpstijg@group.calendar.google.com S-Gates #16a765 jgcuopiksi78f231qq5t23b2pg@group.calendar.google.com omeseer #fbe983 95dfa41185hao6gmvpss2nelro@group.calendar.google.com HS-TV #ffad46
Alternatively you can copy created token.json folder manually to: "HS root"/Bin/AKGoogleCalendar/token.json"
Then restart plugin.
-
Windows 10
HS4 Pro
Google Calendar API
Following all instructions, and including adding the .json file to "C:\Program Files (x86)\HomeSeer HS4\Bin\AKGoogleCalendar\token.json" folder ,restarting plug-in and getting the awaiting authorization, Ive even opened HS4 pro in Chrome and opened the appropriate gmail account to no avail..
Please advise
Comment
-
Originally posted by austinbl View PostWindows 10
HS4 Pro
Google Calendar API
Following all instructions, and including adding the .json file to "C:\Program Files (x86)\HomeSeer HS4\Bin\AKGoogleCalendar\token.json" folder ,restarting plug-in and getting the awaiting authorization, Ive even opened HS4 pro in Chrome and opened the appropriate gmail account to no avail..
Please advise
And what .json file did you add to "C:\Program Files (x86)\HomeSeer HS4\Bin\AKGoogleCalendar\token.json"?
And lease provide output from Tools => Help
And anything in the logs?
I need info, thank you.
Comment
-
Can you please describe what exactly "no avail" means?
Nothing works, all attempts proves useless.
And what .json file did you add to "C:\Program Files (x86)\HomeSeer HS4\Bin\AKGoogleCalendar\token.json"?
I added the one with the client id and secret, It has the same info i copied /pasted after the Google API >creating the credentials then plugging into the Google API plugin
And lease provide output from Tools => Help
Code:Date/time=1/8/2022 1:10:55 AM Central Standard Time Version=HS4 Pro Edition 4.2.7.0 (Windows) License=Registered Confguration File=C:\Program Files (x86)\HomeSeer HS4\Data\HomeSeerData.json In Virtual Machine=No MFG: dell inc. Antivirus=Windows Defender OS=Microsoft Windows 10 Pro - Work Station OS Version=10.0.19044 Uptime=7 Days 0 Hours 59 Minutes 35 Seconds Lan IP=192.168.1.171 (Automation_PC) Device Count=26 Event Count=1 Processor:=Intel64 Family 6 Model 94 Stepping 3 at 2.97 GHz Modules/Threads=129 Modules, 59 Threads Available Threads=1023 System Load=208 Processes, 9% Load Free/Total Memory=558.80 MBytes / 3.89 GBytes (14% free) Free/Total Virtual Memory=1.26 GBytes / 7.75 GBytes (16% free) HomeSeer Memory Used=52 Mbytes Plugin Memory Used=7 EXE Plug-Ins using 95 Mbytes Plugins Installed=AK GoogleCalendar 4.0.0.20,AK Traccar 4.0.0.44,Ecobee 4.0.15.0,IFTTT 3.0.1.4,LIFX 4.0.7.0,MyZWaveParameters 3.20.0.9,NetCam Plugin 1.0.0.5,Z-Wave 3.0.9.0,Z-Wave Parameters 4.0.35.0,Z-Wave UI 1.0.0.0
Only this::
1/8/2022 12:46:48 AM
HomeSeer
Device Control
Device: GoogleCalendar Main Google Calendar to Poll (-102) by/from: CAPI Control Handler
Comment
Comment