Commit Graph

78 Commits

Author SHA1 Message Date
dependabot[bot]
e320d658e8 chore(deps): Bump dayjs from 1.11.18 to 1.11.19 (#185) 2025-11-23 14:56:52 +00:00
dependabot[bot]
c8dac38563 chore(deps-dev): Bump js-yaml from 4.1.0 to 4.1.1 (#187) 2025-11-23 14:56:24 +00:00
Pascal Bourque
94acdede23 fix: Prevent AWS_ERROR_MQTT_UNEXPECTED_HANGUP connection interruptions (#179)
By using a stable, unique per-process client identifier.

Also:

- Configured MQTT auto-reconnect on interruption
- Reset connection on high MQTT connection interruption rate
v2.0.2
2025-11-08 15:12:30 -05:00
dependabot[bot]
d007c2d745 chore(deps-dev): Bump typedoc from 0.28.13 to 0.28.14 (#174) v2.0.1 2025-11-03 11:51:43 +00:00
dependabot[bot]
5d9981f9e0 chore(deps): Bump @aws-sdk/credential-providers from 3.901.0 to 3.922.0 (#173) 2025-11-03 11:49:06 +00:00
dependabot[bot]
2f2cdef0ee chore(deps-dev): Bump typedoc-material-theme from 1.4.0 to 1.4.1 (#175) 2025-11-03 11:48:50 +00:00
dependabot[bot]
193f67226b chore(deps-dev): Bump typescript-eslint from 8.41.0 to 8.46.2 (#176) 2025-11-03 11:48:46 +00:00
dependabot[bot]
ef8d787e05 chore(deps-dev): Bump the dev-dependencies group across 1 directory with 2 updates (#177) 2025-11-03 11:48:39 +00:00
Pascal Bourque
0c71ed95ce chore: Changed dependabot schedule from daily to weekly (#171) 2025-11-02 12:10:05 -05:00
Pascal Bourque
d861a50136 fix!: Device and state properties are now optional (#170)
Updated DeviceBase, BrandInfo, and DeviceState interfaces to make most properties optional, improving flexibility for partial objects and better handling of missing data.
v2.0.0
2025-11-01 09:33:31 -04:00
allcontributors[bot]
7b332b1416 docs: add remiolivier as a contributor for code (#169)
Adds @remiolivier as a contributor for code.

This was requested by bourquep [in this
comment](https://github.com/bourquep/mysa-js-sdk/pull/156#issuecomment-3474627057)

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Pascal Bourque <pascal@cosmos.moi>
v1.4.0
2025-10-31 19:47:48 -04:00
remiolivier
15edd9dbbf feat: Partial support for the AC-V1-1 thermostat (#156)
## Feat. Add Support for Mysa AC-V1-1 Devices

### Overview
This PR aims to extend **mysa2mqtt** to support **Mysa AC-V1-1**
thermostats in addition to the existing baseboard models.
AC-V1 devices use different operating modes and fan modes, which
required updates to both mode translation and MQTT behavior.
Tested with `BB-V1-1` and `AC-V1-1`.

*Note: I'm no typescript expert so code might not look the best but is
fully tested*

### Key Changes
- Supports `cool`, `dry`, `fan_only`, and `auto` in addition to `off`
and `heat`.
  - New fan modes: `auto`, `low`, `medium`, `high`, and `max`.    

### Does not support yet
 - Vertical swing
 - Horizontal swing

### Technical stuff
`AC-V1-1` payload:

`"body":{"success":1,"type":2,"trig_src":3,"state":{"md":3,"sp":23.5,"lk":0,"ho":1,"br":100,"da":2,"fn":5,"ss":4,"ssh":12,"it":0}}}}`

Fan mode values: 1 = 'auto', 3 = 'low', 5 = 'medium', 7 = 'high', 8 =
'max'
**I named the value 8 max as I needed a 4th value but is not tied to
anything in HA or Mysa**

### Testing
```
npm run example

[23:13:06.300] INFO (example/3281203): [example] 'Office Room' status changed: 21.9°C, 49%, 0W
[23:13:21.701] INFO (example/3281203): [example] 'Office Room' status changed: 21.9°C, 49%, 0W
[23:13:21.938] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"heat","setPoint":23,"fanSpeed":"auto"}
[23:13:33.282] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"heat","setPoint":23.5,"fanSpeed":"auto"}
[23:13:38.132] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"heat","setPoint":23.5,"fanSpeed":"high"}
[23:13:44.380] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"fan_only","setPoint":23.5,"fanSpeed":"high"}
[23:13:52.609] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"cool","setPoint":23.5,"fanSpeed":"high"}
[23:13:57.942] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"heat","setPoint":23.5,"fanSpeed":"high"}
[23:14:01.052] INFO (example/3281203): [example] 'Family Room' state changed. {"deviceId":"<redacted>","mode":"heat","setPoint":23.5,"fanSpeed":"auto"}
```
PR to `mysa2mqtt` coming right after
2025-10-31 19:39:28 -04:00
Pascal Bourque
0c906fefe9 fix: Better resilience towards MQTT connection loss and errors (#168) 2025-10-31 15:47:15 -04:00
dependabot[bot]
137e51efa0 chore(deps-dev): Bump the dev-dependencies group across 1 directory with 8 updates (#166) 2025-10-31 13:58:29 +00:00
dependabot[bot]
5644bd7a1e chore(deps): Bump @aws-sdk/client-iot from 3.901.0 to 3.920.0 (#165) 2025-10-31 13:41:31 +00:00
dependabot[bot]
e434b96087 chore(deps-dev): Bump @eslint/js from 9.34.0 to 9.38.0 (#158) 2025-10-31 13:41:19 +00:00
dependabot[bot]
bec3a9804d chore(deps): Bump dayjs from 1.11.13 to 1.11.18 (#149) 2025-10-31 13:41:03 +00:00
dependabot[bot]
64ba134b76 chore(deps-dev): Bump tsx from 4.20.3 to 4.20.6 (#148) 2025-10-31 13:40:46 +00:00
dependabot[bot]
8dfb1b7e82 chore(deps-dev): Bump dotenv from 17.2.1 to 17.2.3 (#147) 2025-10-31 13:40:02 +00:00
Pascal Bourque
d813c4f9a9 fix: Race condition when initializing the MqttClientConnection (#144)
Fixes https://github.com/bourquep/mysa2mqtt/issues/41
v1.3.3
2025-10-05 14:53:17 -04:00
Pascal Bourque
598edf50d9 fix(example): Provide error object as first arg to rootLogger.error() (#143) v1.3.2 2025-10-05 11:04:22 -04:00
Pascal Bourque
ad34fe7486 style: Fixed lint errors introduced by all-contributors bot (#142) 2025-10-05 10:54:48 -04:00
allcontributors[bot]
daed17753e docs: add jagmandan as a contributor for code (#140)
Adds @jagmandan as a contributor for code.

This was requested by bourquep [in this
comment](https://github.com/bourquep/mysa-js-sdk/pull/139#issuecomment-3369095675)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-10-05 10:45:23 -04:00
jagmandan
b845fe5a82 fix: Unable to control BB-V2-0 thermostats (#139)
This change was identified while investigating why my BB-V2-0 Mysa would
not respond to device state commands from Home Assistant (using
mysq2mqtt). The id type was previously in unix time (seconds), but
should be in milliseconds per the reference here:
https://github.com/dlenski/mysotherm/blob/main/mysa_messages.md Making
this update corrected the behavior and commands now work successfully.
2025-10-05 10:44:34 -04:00
Pascal Bourque
bb876ef60d ci: Add CodeQL analysis workflow configuration (#141) 2025-10-05 10:41:33 -04:00
dependabot[bot]
2aa7bd1679 chore(deps): Bump @aws-sdk/client-iot from 3.835.0 to 3.901.0 (#136) 2025-10-05 14:20:52 +00:00
dependabot[bot]
df16d2553b chore(deps-dev): Bump conventional-changelog-conventionalcommits from 9.0.0 to 9.1.0 (#98) 2025-10-05 14:18:26 +00:00
dependabot[bot]
55ec9a8fe9 chore(deps): Bump axios from 1.9.0 to 1.12.1 in the npm_and_yarn group across 1 directory (#114) 2025-10-05 14:18:11 +00:00
dependabot[bot]
77e972bde2 chore(deps-dev): Bump typedoc from 0.28.11 to 0.28.13 (#115) 2025-10-05 14:17:59 +00:00
dependabot[bot]
ed8a83f89b chore(deps): Bump @aws-sdk/credential-providers from 3.876.0 to 3.901.0 (#137) 2025-10-05 14:17:33 +00:00
dependabot[bot]
aa6ed44a19 chore(deps-dev): Bump pino from 9.7.0 to 9.13.0 (#138) 2025-10-05 14:17:13 +00:00
Pascal Bourque
98003665b8 fix: Build error after TypeScript update (#95) v1.3.1 2025-08-29 08:14:35 -04:00
dependabot[bot]
7afec1a7a9 chore(deps-dev): Bump the dev-dependencies group across 1 directory with 10 updates (#78) 2025-08-29 12:02:56 +00:00
dependabot[bot]
e6631b0fd8 chore(deps): Bump form-data from 4.0.2 to 4.0.4 in the npm_and_yarn group (#69) 2025-08-29 11:56:32 +00:00
dependabot[bot]
efaf3310d2 chore(deps-dev): Bump dotenv from 16.5.0 to 17.2.1 (#71) 2025-08-29 11:56:16 +00:00
dependabot[bot]
a62b538c42 chore(deps-dev): Bump typedoc from 0.28.5 to 0.28.11 (#91) 2025-08-29 11:55:28 +00:00
dependabot[bot]
2023e8b321 chore(deps-dev): Bump @eslint/js from 9.29.0 to 9.34.0 (#92) 2025-08-29 11:55:17 +00:00
dependabot[bot]
808e8f1037 chore(deps-dev): Bump typescript-eslint from 8.35.0 to 8.41.0 (#93) 2025-08-29 11:55:02 +00:00
dependabot[bot]
f201c7944a chore(deps): Bump @aws-sdk/credential-providers from 3.835.0 to 3.876.0 (#94) 2025-08-29 11:54:39 +00:00
dependabot[bot]
f6c6127dab chore(deps): Bump @aws-sdk/credential-providers from 3.830.0 to 3.835.0 (#42) 2025-06-25 14:44:42 +00:00
dependabot[bot]
73cec9a90e chore(deps): Bump aws-iot-device-sdk-v2 from 1.21.5 to 1.22.0 (#40) 2025-06-25 14:41:32 +00:00
dependabot[bot]
39fc9048df chore(deps-dev): Bump typescript-eslint from 8.34.0 to 8.35.0 (#43) 2025-06-25 14:38:35 +00:00
dependabot[bot]
45d69453df chore(deps): Bump @aws-sdk/client-iot from 3.830.0 to 3.835.0 (#44) 2025-06-25 14:38:21 +00:00
Pascal Bourque
6dc6da2dde chore(deps): Updated brace-expansion to fix CVE-2025-5889 (#37) v1.3.0 2025-06-21 10:58:17 -04:00
Pascal Bourque
0cf7a1756c feat(example): Ability to output raw data from the thermostats (#36) 2025-06-21 10:33:08 -04:00
dependabot[bot]
51b8f64dab chore(deps): Bump @aws-sdk/client-iot from 3.826.0 to 3.830.0 (#33) 2025-06-21 13:36:28 +00:00
dependabot[bot]
14ee1d30eb chore(deps-dev): Bump tsx from 4.19.4 to 4.20.3 (#30) 2025-06-21 13:35:23 +00:00
dependabot[bot]
4680ca2f85 chore(deps-dev): Bump @eslint/js from 9.28.0 to 9.29.0 (#32) 2025-06-21 13:35:06 +00:00
dependabot[bot]
3f020d5dc3 chore(deps): Bump @aws-sdk/credential-providers from 3.826.0 to 3.830.0 (#34) 2025-06-21 13:33:25 +00:00
dependabot[bot]
e93741525c chore(deps-dev): Bump the dev-dependencies group across 1 directory with 4 updates (#35) 2025-06-21 13:32:47 +00:00