hjdhjd / homebridge-myq

:car: myQ Liftmaster and Chamberlain Plugin for Homebridge https://github.com/nfarina/homebridge
Other
570 stars 44 forks source link

MQTT payloads are not consistant. Sometimes "Open" instead of "open" #1058

Closed mhuca closed 1 year ago

mhuca commented 1 year ago

Describe The Problem:

when publishing MQTT command to garagedoor/get the payload returned on the myq/aabb11122233/garagedoor is proppercase capitalised. e.g. Open, Opening, Closed, Closing

When opening and closing the garage door regularly it send all lower case payloads eg. open, opening, closed, closing

line 175 in src/myq-garagedoor.ts is missing the .toLowerCase()

This causes problems for other subscribers to the mqtt topic which are expecting consistent payloads.

To Reproduce:

when publishing MQTT command to garagedoor/get the payload returned on the myq/aabb11122233/garagedoor is NOT proppercase capitalised. e.g. open, opening, closed, closing

Logs:

Not visable in logs

Show the Homebridge logs here.
Remove any sensitive information.

Homebridge Configuration:

Show the relevant portion of your homebridge config.json here, if needed.
Remove any sensitive information.

{ "email": "xxxx@gmail.com", "password": "xxx111xxx111xxx111", "mqttTopic": "myq", "mqttUrl": "mqtt://xxx:xxxxx@10.0.0.36:1883", "platform": "myQ" }, Screenshots:

Environment:

System Information Timezone GMT-0400 OS Ubuntu Focal Fossa (20.04.5 LTS) Hostname homebridge IPv4 (eth0) 10.0.0.33 Node.js Version v18.12.1 User xxxx Storage Path /var/lib/homebridge Config Path /var/lib/homebridge/config.json Plugin Path /var/lib/homebridge/node_modules Docker Yes Service Mode Yes

hjdhjd commented 1 year ago

Thanks, I’ll take a look at this for a future release. Appreciate the report.

hjdhjd commented 1 year ago

Addressed in 2.11. Thanks.