Feature: Enable/Add Seat Climate + heating features with slight validation for US cars#294
Conversation
|
@g-play01 Thanks for this PR! I have no real way of testing this but is it backward compatible? |
|
@Hacksore it should not change current behavior if one never passed the seatClimateSettings and therefore should have backward compatibility, it does work for my car without the seat options too. the biggest change that may be breaking would be vehiclestartoptions.heatedfeatures is now a number not boolean but not sure if that feature was fully implemented / adopted prior to this so perhaps may not break anything ? https://github.com/Hacksore/bluelinky/pull/294/files#r2250620153 While it should have no impact on vehicles that don't have bluelinked climate seats took some extra caution and ported the validation logic that the hyundai_kia_connect_api project uses for this (any ICE / EVs gen 3+) but otherwise it looks like it has broad compatibility also I should mention, the update does clean up the vehicle start API body by conditionally adding some keys like seatHeaterVentInfo (added if provided) and ignionduration (removed unless ICE / gen 3+ EV) so the outbound API call may not be 1:1 identical but functionally should not be any diff I also think this is likely more in-line with how Bluelink's pages work |
| temperature: 70, | ||
| defrost: false, | ||
| heatedFeatures: false, | ||
| heatedFeatures: 0, |
There was a problem hiding this comment.
change of heatedfeatures type, not sure how this worked previously as a bool given on Hyundai's side it seems to be an ENUM
added logic and messages for heatedfeatures backwards compatiblity with being a boolean also tightened up some types and logic for seat climate control
|
@Hacksore - It's now backwards compatible ! LMK your thoughts on this :) |
|
LGTM! ill end up shipping this in the next major version to accommodate #300. |
This now allows you to start a US car with seat climate (0 to 8 representing various states of the seat climate) and the car's heating/defrosting options via heating1 (0 to 3) the corresponding status of the numbers to capabilities follows:
the API changes to optionally accept driverSeat, passengerSeat, rearLeftSeat, rearRightSeat keys (with valid seat climate values) under vehicle.start({seatClimateSettings:{}}) [Only on US vehicles] and heatedFeatures is now number input instead of boolean
//NOTE: the logic does not validate for sending climate status to a seat that does not support it. e.g. ventilating a seat that does not have ventilation capabilities
Validation only Checks for valid statuses & valid seats for the API call itself... It may not match with actual vehicle abilities such as lack of ventilation or rear seat heating, you may want to be careful with sending a improper payload for your car as it's likely to get flagged / mess up the car's remote capabilities due to errors. 🤷 I am not liable for any issues, i.e. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This work is mostly based on the hyundai_kia_connect_api Project. I could only get it tested on a personal vehicle in the US, per the Hyundai Kia Connect Project it should work across Geos with slight changes, tried making it extensible for that future.