Dieses Thema beginnt auch mich zu interessieren.
Könnt ihr die von Euch genau verwendeten Befehle mal posten bzw. wo habt ihr denn die API-Beschreibung her ?
Wenn das mit cURL geht, dann lässt sich das bestimmt auch mit VB oder ähnlichem in ein Tool mit Oberfläche gießen.....
Hi Ralph,
Die Intro ist hier: https://developer.services-sma…core_concepts/quickstart/
Zitat
...
1. Setting up Postman
- Download Postman on getpostman.com and install it
- Open Postman
- Download the LIVISI Postman Collection and Environment
- Import the LIVISI Postman Collection and Environment
Die API-Reference ist "noch" hier:
SmartHome Api
Die Settings unter "Environment" in Postman

POST Token
In Postman hab ich 4 Modifikationen vornehmen müssen
1. URL (muss m man immer anpassen):
https://{{capiURL}}/api/{{capiVersion}}/ --> http://{{capiURL}}/
2. im Tab Authorization hat bei mit nur über "inherit auth from parent" geklappt
3. Headers in Postmann ergänzen, da sonst wegen "nicht JSON" es nicht geklappt hat

4. Body mit Zugangsdaten und ganz wichtig via "grant_type"

Dann sollte ein Request folgendermaßen aussehen:
POST http://192.168.178.102:8080/auth/token
POST http://192.168.178.102:8080/auth/token: {
"Request Headers": {
"content-type": "application/json",
"authorization": "Basic Y2xpZW50SWQ6Y2xpZW50UGFzcw==",
"user-agent": "PostmanRuntime/7.36.3",
"accept": "*/*",
"postman-token": "a2f57bb5-3ecd-4f61-842e-f185ef9b99b8",
"host": "192.168.178.102:8080",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive",
"content-length": "96"
},
"Request Body": "{\n \"username\": \"admin\",\n \"password\": \"###personal-local-pw###\",\n \"grant_type\": \"password\"\n}",
"Response Headers": {
"access-control-allow-origin": "*",
"content-type": "application/json",
"content-length": "764"
},
"Response Body": "{\"token_type\": \"Bearer\",\"access_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.....2NFksOMB4eh4CC54ODeMVikO06siDDpwhIJQABTeQ\",\"expires_in\": 172800,\"refresh_token\": \"f38e6af85bfd40de9bdb1633065ab686\"}"
}
Alles anzeigen
Um alle Devices als JSON zu bekommen
GET http://192.168.178.102:8080/device/
GET http://192.168.178.102:8080/device/: {
"Request Headers": {
"authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...ODeMVikO06siDDpwhIJQABTeQ",
"accept": "application/json",
"user-agent": "PostmanRuntime/7.36.3",
"postman-token": "9dcc0e71-569d-4434-92a1-df9daf724784",
"host": "192.168.178.102:8080",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive"
},
"Response Headers": {
"access-control-allow-origin": "*",
"content-type": "application/json",
"content-length": "4358"
},
"Response Body": "[{\"id\": \"00000000000000000000000000000000\",\"config\": {\"ac...66ee90bac4\"]}]"
}
Alles anzeigen
Hier eine Beispiel-Response (JSON)
Hab nur 2 Geräte eingebunden, Router und Außensteckdose. Der Rest kommt als Standard mit
[
{
"id": "00000000000000000000000000000000",
"config": {
"activityLogEnabled": true,
"firmwareVersion": "8.17",
"hardwareVersion": "01.00a",
"hostname": "SHCONTROLLER01",
"name": "SmartHome Controller 2-1",
"protocolId": "Virtual",
"softwareVersion": "1.2.44.498",
"timeOfAcceptance": "2022-11-14T12:36:17+00:00",
"timeOfDiscovery": "2022-11-14T12:36:17+00:00",
"timeZone": "W. Europe Standard Time",
"wifiActiveSsid": "YOUR_SSID"
},
"manufacturer": "RWE",
"type": "SHCA",
"version": "1.0",
"desc": "/desc/device/SHCA.RWE/1.0",
"class": "SmartHomeController",
"product": "core.RWE",
"serialNumber": "401562590...",
"location": null,
"capabilities": [
"/capability/1c55c810e3e6420da75e83b6eb61207e",
"/capability/d2f13f213bed497d828395101a2ea3f1"
]
},
{
"id": "14a424c64ae243c1bbaf04ec9186f30e",
"config": {
"clientId": null,
"deviceId": null,
"deviceInfo": null,
"name": null,
"pairedSince": null,
"protocolId": "Virtual",
"timeOfAcceptance": "2022-11-14T12:36:17+00:00",
"timeOfDiscovery": "2022-11-14T12:36:17+00:00"
},
"manufacturer": "RWE",
"type": "PresenceDevice",
"version": "1.0",
"desc": "/desc/device/PresenceDevice.RWE/1.0",
"class": "",
"product": "PresenceDevice.RWE",
"serialNumber": "",
"location": null
},
{
"id": "5440266d6184407e95ef02b09c9a4400",
"config": {
"name": "Sunrise Sunset Sensor",
"protocolId": "Virtual",
"timeOfAcceptance": "2022-11-14T12:40:17+00:00",
"timeOfDiscovery": "2022-11-14T12:40:17+00:00"
},
"manufacturer": "RWE",
"type": "SunriseSunsetSensor",
"version": "2.0",
"desc": "/desc/device/SunriseSunsetSensor.RWE/2.0",
"class": "",
"product": "SunriseSunsetSensor.RWE",
"serialNumber": "aaad31f2-fda6-48b5-8eb7-2a9b6dfd6ca0",
"location": null,
"capabilities": [
"/capability/579d069eb65a45b5aa48ef6aa66afc27"
]
},
{
"id": "60a6d786daea4a6e929308e3833d8468",
"config": {
"name": "Notification Sender",
"protocolId": "Virtual",
"timeOfAcceptance": "2022-11-14T12:40:18+00:00",
"timeOfDiscovery": "2022-11-14T12:40:18+00:00"
},
"manufacturer": "RWE",
"type": "NotificationSender",
"version": "1.0",
"desc": "/desc/device/NotificationSender.RWE/1.0",
"class": "NotificationSender",
"product": "NotificationSender.RWE",
"serialNumber": "",
"location": null,
"capabilities": [
"/capability/703c5411fa164939b6be287d97529bd5",
"/capability/72f23238b603477abaad7255a8dae83c",
"/capability/4edc8ed41f9b49b485966aaeb37f16bd"
]
},
{
"id": "076ba9da318d4f7da5cc3ebc69ae724c",
"tags": {
"internalStateId": "Vacation"
},
"config": {
"name": "Urlaub",
"protocolId": "Virtual",
"timeOfAcceptance": "2022-11-14T12:40:25+00:00"
},
"manufacturer": "RWE",
"type": "VariableActuator",
"version": "2.0",
"desc": "/desc/device/VariableActuator.RWE/2.0",
"class": "VirtualVariable",
"product": "VariableActuator.RWE",
"serialNumber": "076ba9da318d4f7da5cc3ebc69ae724c",
"location": null,
"capabilities": [
"/capability/ea11aa4b024a475cb8adbe2898b32604"
]
},
{
"id": "9d098c6fd51545f3abfcf23a50253467",
"tags": {
"internalStateId": "HomeAway"
},
"config": {
"name": "Zuhause",
"protocolId": "Virtual",
"timeOfAcceptance": "2022-11-14T12:40:25+00:00"
},
"manufacturer": "RWE",
"type": "VariableActuator",
"version": "2.0",
"desc": "/desc/device/VariableActuator.RWE/2.0",
"class": "VirtualVariable",
"product": "VariableActuator.RWE",
"serialNumber": "9d098c6fd51545f3abfcf23a50253467",
"location": null,
"capabilities": [
"/capability/55a51228d4ab4d65bee47f7584d2f52a"
]
},
{
"id": "f0a7459b207d4382aa41a1b317a89e98",
"tags": {
"type": "TRouterId",
"typeCategory": "TCRangeExtenderId"
},
"config": {
"name": "Ersatz Router 1",
"protocolId": "Cosip",
"timeOfAcceptance": "2024-02-15T13:16:56+00:00",
"timeOfDiscovery": "2024-02-15T13:15:37+00:00"
},
"manufacturer": "RWE",
"type": "PSR",
"version": "1.0",
"desc": "/desc/device/PSR.RWE/1.0",
"class": "",
"product": "CosipDevices.RWE",
"serialNumber": "91420000...",
"location": "/location/e538a58ed1fd4af59b80ca69e39eb3c3",
"capabilities": [
"/capability/1e8e31387281463b9bf26c9142c1ee7c"
]
},
{
"id": "cd8e7dd784114656ac5e3dc8498792d0",
"tags": {
"type": "TFairyLightsId",
"typeCategory": "TCLightId"
},
"config": {
"name": "Lichterkette",
"protocolId": "Cosip",
"timeOfAcceptance": "2024-02-20T16:15:38+00:00",
"timeOfDiscovery": "2024-02-20T16:15:00+00:00"
},
"manufacturer": "RWE",
"type": "PSSO",
"version": "1.0",
"desc": "/desc/device/PSSO.RWE/1.0",
"class": "",
"product": "CosipDevices.RWE",
"serialNumber": "9141710....",
"location": "/location/a6423e974ebb4702a32181be2e22dd2a",
"capabilities": [
"/capability/dc35c2aa1ff242e48e95f666ee90bac4"
]
}
]
Alles anzeigen