Closed kaiatkins closed 4 years ago
I have no idea, Try the latest version I updated some stuff so it works on python 3.7.x I've tested on rbpi3/4 and macosx
/homebridge/node_modules/homebridge-lg-airco/resources/wideq # python3 example.py -c “US” -l “en-US” -s "wideq_state.json" ls
Traceback (most recent call last):
File "example.py", line 1, in
looks still same issue
Python seems to be missing some dependencies. Is it a special kind of python installation?
Same error here. All was working perfectly until the last week.
Any idea?
Ok, solved. You need to install the "requests" module. I followed this instructions:
https://stackoverflow.com/questions/17309288/importerror-no-module-named-requests
Updated readme with this information! @Xivi08 @kaiatkins does this fix the issue for you?
Progressing :) Was able to get the url and paste the link back, (had to restart homebridge first after install to get it to work properly)
Now just this error message appears:
[1/29/2020, 1:29:03 PM] [LG-AirCon-MB] TypeError: Cannot read property 'substring' of undefined at parseMon (/homebridge/node_modules/homebridge-lg-airco/src/lg/wideq.js:122:42) at python.then (/homebridge/node_modules/homebridge-lg-airco/src/lg/wideq.js:25:40) at process._tickCallback (internal/process/next_tick.js:68:7)
Thank you again for your help in this matter.
@kaiatkins If you open the wideq.js file (in nano/vim/...)
Add
console.log(monitorLines);
below line 118 so it should look like this:
const parseMon = (data) => {
const monitorLines = data.split('; ');
console.log(monitorLines);
return {
onOff: monitorLines[0],
mode: monitorLines[1],
currentTemp: monitorLines[2].substring(4).replace('°C', ''),
targetTemp: monitorLines[3].substring(4).replace('°C', ''),
speed: monitorLines[4].substring(10).replace('\n', '')
};
};
And then run it again. It should print some extra info in the logging. Could you paste that here. Might be something temperature related (like no celcius temperature available)
I have added but don't see anything additional in logs just the Line number change wideq.js:122:42) to wideq.js:123:42)
37m[1/31/2020, 3:50:17 PM][39m Got SIGTERM, shutting down Homebridge... [37m[1/31/2020, 3:50:25 PM][39m Loaded config.json with 1 accessories and 0 platforms. [37m[1/31/2020, 3:50:25 PM][39m --- [37m[1/31/2020, 3:50:25 PM][39m Loaded plugin: homebridge-lg-airco [37m[1/31/2020, 3:50:25 PM][39m Registering accessory 'homebridge-lg-airco.HomebridgeLgAirco' [37m[1/31/2020, 3:50:25 PM][39m --- [37m[1/31/2020, 3:50:25 PM][39m Loaded plugin: homebridge-config-ui-x [37m[1/31/2020, 3:50:25 PM][39m Registering platform 'homebridge-config-ui-x.config' [37m[1/31/2020, 3:50:25 PM][39m --- [37m[1/31/2020, 3:50:25 PM][39m Loading 0 platforms... [37m[1/31/2020, 3:50:25 PM][39m Loading 1 accessories... [37m[1/31/2020, 3:50:25 PM][39m [36m[LG-AirCon][39m Initializing HomebridgeLgAirco accessory... [0;37m[1/31/2020, 3:50:25 PM] [0m[0;36m[Config][0m [0;33mHomebridge Config UI X v4.9.0 is listening on :: port 9191[0m Path to script file: /homebridge/node_modules/homebridge-lg-airco/resources/wideq/example.py Path to state file: /homebridge/node_modules/homebridge-lg-airco/resources/wideq/wideq_state.json
[1/31/2020, 3:50:29 PM][39m [36m[LG-AirCon][39m TypeError: Cannot read property 'substring' of undefined at parseMon (/homebridge/node_modules/homebridge-lg-airco/src/lg/wideq.js:123:42) at python.then (/homebridge/node_modules/homebridge-lg-airco/src/lg/wideq.js:25:40) at process._tickCallback (internal/process/next_tick.js:68:7)
I have the same issue. Added the extra logging and the message is :
[ 'Session expired.\n' ]
I have the same issue. Added the extra logging and the message is :
[ 'Session expired.\n' ]
Same for me. Any fix?
I fixed this. The issue is with "°C" in the example.py remove from example.py in the lines the "°C". 'cur {0.temp_cur_c}°C; ' 'cfg {0.temp_cfg_c}°C; ' then remove from /src/lg/wideq.js
currentTemp: monitorLines[2].substring(4)**.replace('°C', '')**,
targetTemp: monitorLines[3].substring(4)**.replace('°C', '')**,
I've published the new version, could you try with that? Please not that the config has changed! Follow the readme!
I am using oznu/docker-homebridge with homebridge UI enabled on Western Digital PR4100
the error I am getting when home bridge loads:
[8/28/2019, 10:35:23 AM] Homebridge is running on port 53998. Traceback (most recent call last): File "/homebridge/node_modules/homebridge-lg-airco/resources/wideq/example.py", line 1, in import wideq File "/homebridge/node_modules/homebridge-lg-airco/resources/wideq/wideq/init.py", line 3, in from .core import * # noqa File "/homebridge/node_modules/homebridge-lg-airco/resources/wideq/wideq/core.py", line 9, in import requests ModuleNotFoundError: No module named 'requests'
Here is python3 version:
/homebridge/node_modules/homebridge-lg-airco/resources/wideq # python3 --version Python 3.7.3
When running command: python3 example.py -c “US” -l “en-US” -s "wideq_state.json" ls
/homebridge/node_modules/homebridge-lg-airco/resources/wideq # python3 example.py -c “US” -l “en-US” -s "wideq_state.json" ls Traceback (most recent call last): File "example.py", line 1, in import wideq File "/homebridge/node_modules/homebridge-lg-airco/resources/wideq/wideq/init.py", line 3, in from .core import * # noqa File "/homebridge/node_modules/homebridge-lg-airco/resources/wideq/wideq/core.py", line 9, in import requests ModuleNotFoundError: No module named 'requests'