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

Zero temperature #8

Closed alszaitsev closed 4 years ago

alszaitsev commented 4 years ago

First of all thanks for a great job! I have some issues with the temperature - it shows 0,0, although ThinQ app shows it normal. Device PC12SQ NSJ

D3B214A4-CD34-42DE-8591-37DDF5386C06 AC4BC537-4512-4FD1-A3B3-B5AA22D4E25F

danielbotka commented 4 years ago

I have the same issue, receiving the following error in HomeBridge console 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)

piet2000 commented 4 years ago

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', '')**,
danielbotka commented 4 years ago

@piet2000 can you open a PR for your fix? Then @beele might merge it and will be updated for everyone who has the issue :)

beele commented 4 years ago

I'm starting work on a cleanup of my code and am also pulling in an updated version of wideq, hopefully this will resolve this issue

beele commented 4 years ago

I've published the new version, could you try with that? Please not that the config has changed! Follow the readme!