beele / HomebridgeLgSmartThinqAirco

Homebridge plugin for controlling a split unit LG SmartThinq Airco unit
GNU General Public License v3.0
30 stars 7 forks source link

Issue after update #15

Closed WojtekWro closed 4 years ago

WojtekWro commented 4 years ago

After update Homebridge starts but accessory LgAirCoole does not answer.

When I try to configure it again I have this result: python3 example.py -c PL -l pl-PL -p /var/homebridge/wideq_state.json File "example.py", line 263 help=f'one of: {", ".join(EXAMPLE_COMMANDS)}') ^ SyntaxError: invalid syntax

beele commented 4 years ago

What did you update, which versions of node/homebridge/the plugin are you running....

WojtekWro commented 4 years ago

I'm sorry. I was not accurate. For the last couple of months I was using homebridge-lg-airco plugin version 0.0.998. everything was perfect. I have updated it to version 0.1.2. and now plugin starts but accessory seems to not connect to the LG. Homebridge - 1.1.1 node - v12.16.3 my JSON Config "accessories":[ { "accessory": "LgAirCooler", "name": "Klimatyzator", "model": "DC12RQNSJ", "country": "PL", "language": "pl-PL", "maxCoolingTemp": 26, "minCoolingTemp": 18, "maxHeatingTemp": 30, "minHeatingTemp": 5, "updateInterval": 60000, "debug": false, "dummy": false },

WojtekWro commented 4 years ago

IMG_0562 I hope the language on the screenshot is not problem ;-)

beele commented 4 years ago

Try enabling the debug flag again and see what the output is. (hopefully I'll soon be able to switch to a full javascript implementation so the python crap wont be needed anymore)

WojtekWro commented 4 years ago

You mean debug option in config.json? Do you think it can affect setup process?

beele commented 4 years ago

Yes that debug option ;) Normally restarting the homebridge instance should not log you out (if you do the edit quick enough)

WojtekWro commented 4 years ago

Bellow is extract from output. But I think the problem is that, there is no wideq_state.json in /var/homebridge. It should be added there automatically during setup process I guess.

Jun 24 10:51:25 rpi3 homebridge[2942]: [6/24/2020, 10:51:25] Homebridge is running on port 51826. Jun 24 10:51:25 rpi3 homebridge[2942]: /var/homebridge/wideq_state.json Jun 24 10:51:25 rpi3 homebridge[2942]: [6/24/2020, 10:51:25] [Klimatyzator] python3 -u example.py -c PL -l pl-PL -p /var/homebridge/wideq_state.json -v ls Jun 24 10:51:25 rpi3 homebridge[2942]: 2020-06-24T08:51:25.851Z HAP-NodeJS:EventedHTTPServer Server listening on port 46505 Jun 24 10:51:25 rpi3 homebridge[2942]: [6/24/2020, 10:51:25] TV is running on port 46505. Jun 24 10:51:25 rpi3 homebridge[2942]: [6/24/2020, 10:51:25] Please add [TV] manually in Home app. Setup Code: 031-45-151 Jun 24 10:51:25 rpi3 homebridge[2942]: File "example.py", line 263 Jun 24 10:51:25 rpi3 homebridge[2942]: help=f'one of: {", ".join(EXAMPLE_COMMANDS)}', Jun 24 10:51:25 rpi3 homebridge[2942]: ^ Jun 24 10:51:25 rpi3 homebridge[2942]: SyntaxError: invalid syntax Jun 24 10:51:25 rpi3 homebridge[2942]: (node:2942) UnhandledPromiseRejectionWarning: python error! Jun 24 10:51:25 rpi3 homebridge[2942]: (node:2942) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) Jun 24 10:51:25 rpi3 homebridge[2942]: (node:2942) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

WojtekWro commented 4 years ago

I installed new instance of Homebridge on a new device and now it works fine. Thank you for your work.