Implementation of "Remote Sensor" Support & Various Performance Improvements #340
JasonGoldenDDT
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Disclaimer: I am new to Javascript and Typescript development. I used co-pilot to edit this plugin's installed code to test changes important for my environment. My focus was purely on the LG Window AC I have in an awkward location.
Goal: Implement a remote sensor to drive climate control.
Side Quest - Improve responsiveness and improve UI accuracy.
I need to use a 'remote sensor' to drive when my AC turns on and off. Due to the layout and age of my rental, I've ducted air from the AC's location near the floor in the living room, to expel cold air into my adjacent bedroom. Primarily at night.
Without this arrangement I would spend 50-60 more a month on energy. I live in an urban environment next to a fire station. It's not possible for us to sleep with a window open.
This inspired a deep dive into ways of improving the efficiency of cooling my bedroom at night. Using the AC's temperature sensor would result in excessive power use.
Initially I used IR control, however the lack of feedback meant automation fell out of sync frequently resulting in the AC either running longer, or not long enough.
This plugin has been great, however for awhile I could not determine why I could not rely on it to control my AC, using Home shortcuts to turn the ac on or off based on two rules for temperature in the bedroom between specific times.
This worked well, but it was difficult to change, and I wanted to integrate this into the actual "heater-cooler' UI.
Following a recent injury I had time to kill and I spent a little over a month with Co-Pilot to enhance several plugins that I rely on. Because of the financial impact, this was the first one.
Through what felt like endless conversations with Co-pilot I finally arrived with the version I attached. I learned the plugin is polling ThinQ V2 devices too frequently causing the device to miss commands. Tuned this to rely on the MQTT heartbeat instead.
Implemented a MQTT listener to listen to temp and humidity data from a broadlink RM 4. This is working really well.
Implemented "Smart Auto" - replicating the AC's logic into the plugin, mapping the remote temp sensor into the 'heater-cooler' UI and allowing the user to adjust the "target temp" as well.
This eliminated the home automation shortcuts and makes it really user friendly.
Additionally I attempted to improve Fan Speed mapping, suppressing unsupported options like "swing mode" and enabled "filter maintenance" service.
These edits have been running for a week now. I'm seeing an improvement in power consumption from my IR control method, as the feedback logic in the code ensures the AC's state is in sync.
homebridge-lg-thinq.zip
It would be awesome if this project could implement some of these updates. I'm not a homebridge dev and rarely work with GitHub, maintaining a branch would be time consuming.
I am hoping having the attached working example could inspire quick refinements to this plugin.
Beta Was this translation helpful? Give feedback.
All reactions