Caso is selling wine coolers in Germany. Some of these are called “Smart” since they have WLAN and phone app. Unfortunately they are cloud based. But they finally have an “experimental API” which at least returns set and actual temperatures and some other status information (far from complete but anyway). OpenAPI and Swagger are chinese to me so I asked my son to create a CURL command for me .
If somebody is interested to go into details: The API is here: > https://publickitchenapi.casoapp.com/, the documentation is here: Swagger UI
.
The curl command is: curl -X POST -H “x-api-key: $API_KEY” -H “Content-Type: application/json” -d “{"technicalDeviceId": "$DEVICE_ID"}” https://publickitchenapi.casoapp.com/api/v1.1/Winecooler/Status
I glued this with some bash code to send the json data to OpenHAB (works well).
API key is here:
technicalDeviceId is here:
The guy at Caso is very friendly and says that he wants a complete API but he has to argue with his bosses about it.
Unfortunately I won’t be the right person to program a binding for Caso. If somebody is interested I am willing to help with testing.
It seems to work ok (within the limits of the API). Every once in a while a status 0 occured, probably because the API timed out. When I used the curl command I noticed that it takes a while to respond. Thanks for your efforts.
Bernd, currently there are lots of timeouts - the last 24 hours the binding did not succeed to get values from the API. The API response time for a curl command is more than 40 seconds but there is always a response.
[23:44:22] root@openhabian:/etc/openhab/caso# ./casotest
{"temperature1":12,"targetTemperature1":12,"temperature2":18,"targetTemperature2":18,"power1":true,"power2":true,"light1":false,"light2":false,"logTimestampUtc":"2024-09-25T21:30:22.2802008Z","temperatureUnit":"C","hint":"Note: Device status and content of this message may differ due to synchronization intervals of distributed systems."}
[23:45:04] root@openhabian:/etc/openhab/caso#
You might want to make the timeout period adjustable, or at least as high as 60 seconds, or you take - let’s say - 1/5 or 1/4 of the polling period as timeout period. Thanks for your time.
Yes, saw this approx 2 weeks ago. No responses anymore.
Changed timout to 60 secs and status is delivered correctly. Nevertheless I don’t get the light requests working even if http request is answered with status 200 ok.