-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use deviceTypeVersion returned from API #1
Use deviceTypeVersion returned from API #1
Conversation
c58d1fd
to
a0089e4
Compare
mid: this.#sessionID, | ||
token: this.#accessToken, | ||
application_version: "1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The majority of these changes are me re-ordering the fields around to align to the same ordering of fields sent from the dashboard.
actionSource: 'WEB', | ||
action: "actionControl", | ||
macAddress: hvac.getMacAddress(), | ||
deviceTypeVersion: hvac.getDeviceTypeVersion() || "BI01", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plumbing this from hvac object.
@@ -86,12 +86,13 @@ class CieloAPIConnection { | |||
device.deviceName, | |||
device.applianceId, | |||
device.fwVersion, | |||
device.deviceTypeVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recording the value gotten from the API to the local HVAC object.
@Taik , thanks for picking this up! Work has been nuts for me recently, hence my radio-silence. These changes are what I was hoping for, it was tricky for me to test/discover of the the device specific differences since I only have one type of Cielo device at my house. |
This PR records the
deviceTypeVersion
value when populating device info object from the returned from the/web/devices
endpoint, and uses it when sending commands.I've tested this locally via
node demo.js
and all commands seems to be working. Apologies ahead of time for the big diff -- the majority of the changes are just fromprettier
running.Some background context:
For newer Mr. Cool Split Units, the
deviceTypeVersion
is different than what is originally hard-coded (BP01). For my device, BP04 is sent.Here's a sample
actionControl
command payload: