This is to manage a Viessmann furnace, using the Viessmann API with Http. The furnace is connected to the Viessmann cloud using a Vitoguide apllication
VIESSMANN API
The API is located here: https://developer.viessmann.com/en/doc/getting-started.
A developer account must be created, using the Vitoguide credentials
My HS server is at 192.168.0.1:8082
Then, at first an API key must be obtained, using http://192.168.0.1:8082/Big6/oauth2_callback.html as redirect URL. This will give you a specific client ID.
At this point, if I am already connected to my Viessmann API using credentials, I can check the API is functional by typing
https://api.viessmann.com/users/v1/u...tions=identity will give a JSON with my installation# (181500)
https://api.viessmann.com/iot/v1/equipment/gateways will give me a JSON with the gateway# (7571381027957198)
https://api.viessmann.com/iot/v1/equ...957198/devices shows all devices
https://api.viessmann.com/iot/v1/equ...er.temperature gives me my boiler temp
So, I guess the API is working great.
OAuth2
According to the API docs I could construct a working URL
Query parameters:
client_id = "216bda04a687f37dce042512b7b831e8"
redirect_uri= "http://192.168.0.1:8082/Big6/oauth2_callback.html"
response_type = "code"
scope = "IoT User"
code_challenge= "2e21faa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c"
URL: https://iam.viessmann.com/idp/v2/aut...b831e8&redirec t_uri=http://192.168.0.1:8082/Big6/oauth2_callback.html&response_type=code&code_challenge=2e21f aa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c&scope=IoT%20User
This url in my browser gives me access to a login page for my Viessmann credentials, if I enter them, I will be oriented to http://192.168.0.1:8082/Big6/oauth2_...K8_QPZulx6jVUD df1CEPpsU which is blank.
At this point I think I understand that the API could connect to Big6
Big6 configuration
POST
URL : https://api.viessmann.com/iot/v1/equipment/installations/181500/gateways/7571381027957198/devices/0/features/{$input}
OAuth2
Client ID: 216bda04a687f37dce042512b7b831e8
Client secret : 2e21faa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c
https://iam.viessmann.com/idp/v2/authorize
https://iam.viessmann.com/idp/v2/token
Scope:" IoT User"
Will not connect when hitting Request Authorization button
Using scope :" IoT User&code_challenge=2e21faa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c "
will go to the login page for credentials when hitting Request Authorization button
So I guess the authentication is OK
HS event
Error in log
0
I have been fighting a lot to get there, but I am stuck.
Any help would be appreciated, thanks
VIESSMANN API
The API is located here: https://developer.viessmann.com/en/doc/getting-started.
A developer account must be created, using the Vitoguide credentials
My HS server is at 192.168.0.1:8082
Then, at first an API key must be obtained, using http://192.168.0.1:8082/Big6/oauth2_callback.html as redirect URL. This will give you a specific client ID.
At this point, if I am already connected to my Viessmann API using credentials, I can check the API is functional by typing
https://api.viessmann.com/users/v1/u...tions=identity will give a JSON with my installation# (181500)
https://api.viessmann.com/iot/v1/equipment/gateways will give me a JSON with the gateway# (7571381027957198)
https://api.viessmann.com/iot/v1/equ...957198/devices shows all devices
https://api.viessmann.com/iot/v1/equ...er.temperature gives me my boiler temp
So, I guess the API is working great.
OAuth2
According to the API docs I could construct a working URL
Query parameters:
client_id = "216bda04a687f37dce042512b7b831e8"
redirect_uri= "http://192.168.0.1:8082/Big6/oauth2_callback.html"
response_type = "code"
scope = "IoT User"
code_challenge= "2e21faa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c"
URL: https://iam.viessmann.com/idp/v2/aut...b831e8&redirec t_uri=http://192.168.0.1:8082/Big6/oauth2_callback.html&response_type=code&code_challenge=2e21f aa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c&scope=IoT%20User
This url in my browser gives me access to a login page for my Viessmann credentials, if I enter them, I will be oriented to http://192.168.0.1:8082/Big6/oauth2_...K8_QPZulx6jVUD df1CEPpsU which is blank.
At this point I think I understand that the API could connect to Big6
Big6 configuration
POST
URL : https://api.viessmann.com/iot/v1/equipment/installations/181500/gateways/7571381027957198/devices/0/features/{$input}
OAuth2
Client ID: 216bda04a687f37dce042512b7b831e8
Client secret : 2e21faa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c
https://iam.viessmann.com/idp/v2/authorize
https://iam.viessmann.com/idp/v2/token
Scope:" IoT User"
Will not connect when hitting Request Authorization button
Using scope :" IoT User&code_challenge=2e21faa1-db2c-4d0b-a10f-575fd372bc8c-575fd372bc8c "
will go to the login page for credentials when hitting Request Authorization button
So I guess the authentication is OK
HS event
Error in log
0
I have been fighting a lot to get there, but I am stuck.
Any help would be appreciated, thanks
Comment