Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@hyperlink/open-window-service
Advanced tools
http service that queries Open Weather API and Ecobee to answer if you should open your window for fresh air
http service that queries Open Weather API and Ecobee to answer the question if you should open your window. Create an iOS shortcut to ask Siri if you should open your window.
⚠️ The developer sign up doesn't play well with two-factor authentication turned on. If you have 2FA enabled make sure you disable it on your phone before signing up. You can always reenable it after signing up.
⚠️ App IDs takes time to get enabled so if you get an error abount an invalid app ID wait awhile.
Download this app if you don't already have it on your phone: https://apps.apple.com/us/app/shortcuts/id1462947752
npm install -g @hyperlink/open-window-service
This step is a bit manual unfortunately. I didn't take any time to make this easy because is a one time taks. You're all setup once you get your refresh_token
.
Once Ecobee developer account is registered login to your account and click Developer link to create an app. Fill out Application Name, Application Summary and make note of the API key. This key is what you would use in place for ECOBEE_CLIENT_ID
environment variable
Make an http GET to https://api.ecobee.com/authorize?client_id=<your client ID>&response_type=ecobeePin&scope=smartWrite
that gives you a response:
{
"ecobeePin": "XXXX-ABCD",
"code": "<code needed for next request>",
"interval": 5,
"expires_in": 900,
"scope": "openid,offline_access,smartWrite"
}
Then make a http POST
to
https://api.ecobee.com/token?grant_type=refresh_token&code=<code from above>&client_id=<your client ID>
To get the follow result.
{
"access_token": "<really long string>",
"token_type": "Bearer",
"refresh_token": "<refresh_token>",
"expires_in": 3600,
"scope": "openid,smartWrite,offline_access"
}
ECOBEE_REFRESH_TOKEN
should be the refresh_token
result.
Set the app ID to WEATHER_APP_ID
You can create a script to launch this or use PM2.
module.exports = {
apps: [{
name: 'Open Window Service',
exec_mode: 'fork',
instances: 1,
script: 'src/index.ts',
time: true,
watch: 'src',
env: {
WEATHER_APP_ID: '<YOUR APP ID>',
ECOBEE_REFRESH_TOKEN: '<YOUR TOKEN>',
ECOBEE_CLIENT_ID: '<YOUR CLIENT ID>',
// port the endpoint it's going to be on
PORT: 3000
}
}]
};
FAQs
http service that queries Open Weather API and Ecobee to answer if you should open your window for fresh air
The npm package @hyperlink/open-window-service receives a total of 0 weekly downloads. As such, @hyperlink/open-window-service popularity was classified as not popular.
We found that @hyperlink/open-window-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.