Go Client for Velux Active KIX 300
go get github.com/nougad/velux-cli
# will fail with: package github.com/nougad/velux-cli/client: cannot find package "github.com/nougad/velux-cli/client" in any of:
# go then into `src/github.com/nougad/velux-cli` to generate the swagger client
$ cd src/github.com/nougad/velux-cli
# make changes to the `config.go` file and add velux client id and client secret
# and run make
$ make
Login to Velux using username and password
CLIENT_ID=".."
CLIENT_SECRET=".."
USERNAME="email"
PASSWORD=""
curl -v -d "grant_type=password&client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&username=${USERNAME}&password=${PASSWORD}&user_prefix=velux" https://app.velux-active.com/oauth2/token
Then create a file named token.json
{
"token": {
"access_token": "5...d|5...0",
"refresh_token": "5...d|c...4",
"scope": [
"all_scopes"
],
"expires_in": 10800
},
"refreshed": "2019-08-11T21:42:51.597296912+02:00"
}
Documented in velux-protocol.md.
Can be found in openhab.md file.
The current OpenHab netatmo binding might be able to use the reading from
GetMeasure
but it does not allow to override the API endpoint so I could not
try.
There is currently no OpenHab binding since it would require disclosing client secret and client id reverse engineered by Android App. More details at https://community.openhab.org/t/connecting-velux-active-kix-300/75696
Can be found in swagger.yaml. Only relevant methods added.
Due to missing union types in of OpenAPI 2.0 and missing code generators in
OpenHab 3.0 the setState
only takes percentage right now.
stopall
is missing- Only rollershutters supported right now