Yes - in the console, only this (related to Millheat) comes:
357 │ Active │ 80 │ 3.3.0.202203120350 │ openHAB Add-ons :: Bundles :: Millheat Binding
Yes - in the console, only this (related to Millheat) comes:
357 │ Active │ 80 │ 3.3.0.202203120350 │ openHAB Add-ons :: Bundles :: Millheat Binding
I´m trying to set vacation mode, but I get an error code 6012 “invalid result”.
Any pointers to what could possibly be wrong?
I´m using a script to set the relevant commands (start, end etc) for activating holiday mode.
var Vacation_Mode_Start = zdt.now().toLocalDateTime();
var Vacation_Mode_End = zdt.now().toLocalDateTime().plusDays(14);
//Update MillHeat vacation mode
events.sendCommand('Millheat_Vacation_Mode_Start',Vacation_Mode_Start);
events.sendCommand('Millheat_Vacation_Mode_End',Vacation_Mode_End);
events.sendCommand('Millheat_Vacation_Mode','ON');
events.sendCommand('Millheat_Vacation_Mode_Advanced','ON');
events.sendCommand('Millheat_Vacation_Target_Temperature','16');
From the debug log
1fc5eac128-11691 > POST https://eurouter.ablecloud.cn:9005/millService/v1/holidayChooseHome
1fc5eac128-11691 > Accept-Encoding: gzip
1fc5eac128-11691 > User-Agent: Jetty/9.4.50.v20221201
1fc5eac128-11691 > Connection: Keep-Alive
1fc5eac128-11691 > X-Zc-Major-Domain: seanywell
1fc5eac128-11691 > X-Zc-Msg-Name: millService
1fc5eac128-11691 > X-Zc-Sub-Domain: milltype
1fc5eac128-11691 > X-Zc-Seq-Id: 1
1fc5eac128-11691 > X-Zc-Version: 1
1fc5eac128-11691 > Content-Type: application/x-zc-object
1fc5eac128-11691 > X-Zc-Timestamp: 1693413143
1fc5eac128-11691 > X-Zc-Timeout: 300
1fc5eac128-11691 > X-Zc-Nonce: xxxxxxxxxxxxx
1fc5eac128-11691 > X-Zc-User-Id: 69281
1fc5eac128-11691 > X-Zc-User-Signature: xxxxxxxxx
1fc5eac128-11691 > X-Zc-Content-Length: 133
1fc5eac128-11691 > Host: eurouter.ablecloud.cn:9005
1fc5eac128-11691 > Content-Length: 133
{
“homeList”: [
{
“homeId”: xxxxxxxxx
}
],
“timeZoneNum”: “+02:00”,
“key”: “isHoliday”,
“value”: 1
}
2023-08-30 18:32:23.820 [DEBUG] [llheat.internal.client.RequestLogger] - Response 1fc5eac128-11691
1fc5eac128-11691 < HTTP/1.1 200 OK
1fc5eac128-11691 < Content-Length: 43
1fc5eac128-11691 < Content-Type: application/x-zc-object
1fc5eac128-11691 < Server: Jetty(9.1.5.v20140505)
1fc5eac128-11691 < X-Zc-Msg-Name: X-Zc-Err
1fc5eac128-11691 < X-Zc-Trace-Id: xxxxxxxxxx
1fc5eac128-11691 < Date: Wed, 30 Aug 2023 16:32:23 GMT
{
“errorCode”: 6012,
“error”: “invalid result”
}
In gen 3 devices, there is a local REST API: GitHub - Mill-International-AS/Generation_3_REST_API: Local REST API documentation
I don’t use “cloud” solutions by principle, I don’t want companies to record every bit of my life. Using the local REST API, you can even disable the cloud functionality altogether, making it a completely local device.
Does this binding work with the local REST API? From what I’ve read above, it doesn’t seem so. If not, is there some other binding that does this, or will I just have to start from scratch using the HTTP binding or something of the sort?
Correct, it does not work with Gen3 and direct connection as Gen2 via cloud was the latest and greatest when the binding was written.
I don’t have any Gen3 devices, but I’m sure there are other users out there that does. Why not create a PR to this binding to share your efforts?
BRG
That’s a bit more involved than I envisioned, but I can have a look to see if it’s feasible. Where exactly is the repo for this binding? Is it this one? GitHub - seime/openhab2-addons: Add-ons for openHAB 2.x
My initial thoughts are that it doesn’t sound very straight-forward to combine “hacked cloud API use” and local API use in one binding. Do you see a “clean” way to separate the two within the same binding?
No, it is part of the official distribution: openhab-addons/bundles/org.openhab.binding.millheat at main · openhab/openhab-addons · GitHub
It is no problem to support both cloud and direct gen3 in the same binding, just use a different thingID (ie gen3-heater
or something). Most code can be moved to a separate subpackage (i.e. .cloud
) to keep it as separate as possible from the direct connection code for V3 devices.
Or you can - as you suggest - create a separate binding. I’ll leave it to the addons maintainers to share their preference.