gruijter / com.gruijter.enelogic

GNU General Public License v3.0
3 stars 2 forks source link

LS110 - Error: Info could not be retrieved from device at Youless.getInfo #25

Closed xmorpheus closed 2 years ago

xmorpheus commented 2 years ago

Hi,

i got the following error:

"[err] 2022-02-01 12:18:07[Driver:LS110] Pair error Error: Info could not be retrieved from device at Youless.getInfo (/node_modules/youless/youless.js:200:11) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async /drivers/LS110/driver.js:49:18 [log] 2022-02-01 12:18:07[Driver:LS110] save button pressed in frontend"

I am running youless ls110 with bg-tech.de firmware ( german frontend )

Modell: LS110 Firmware-Version: 1.2.0.DEbg

I am happy to provide additional information.

gruijter commented 2 years ago

It might be caused by the German frontend giving unexpected responses. Did you try to load the NL frontend? (not sure how you can do that though...)

You could also try to run the test from the NodeJS package I created. But you need to install some stuff on a PC and work a bit with command line. To run the test 1) install NodeJS 2) install this package: https://www.npmjs.com/package/youless 3) run the test 4) see if it throws an error giving a clue what is going on...

xmorpheus commented 2 years ago

I tried your testing function and changed the regex to match german words.

const regExTimeResponse = /Zeit:(.*?)<tr>/; const regExModelResponse = /Modell:(.*?)<tr>/; const regExFirmwareResponse = /Firmware-Version:(.*?)<tr>/; const regExMacResponse = /MAC-Adresse:(.*?)<tr>/;

trying to get info { model: 'LS110', mac: '72:b8:a:14:16:6', firmware: '1.2.0.DEbg', host: '192.168.1.11' } t = 0.045 trying to get basic power readings { cnt: '43632,506', pwr: 586, lvl: 36, dev: '(±1%)', det: '', con: '*', sts: '', raw: 270, net: 43632.506, tm: 1643877938 }

Any chance to auto detect the german version?

gruijter commented 2 years ago

Ah super. You can write code :)

Yes ,I can probably fix this. But maybe some of the other functions are also failing due to German translations. Not easy for me to test :(

If you know how to do a pull request on netgear.js you could fix and test this module yourself (leaving the original regEx results also intact off course)

https://github.com/gruijter/netgear.js/issues/18

gruijter commented 2 years ago

Please test this version and let me know if it works:

https://homey.app/a/com.gruijter.enelogic/test

gruijter commented 2 years ago

Bumb... any feedback from you on the new version I created for you?

gruijter commented 2 years ago

Shame you do noy give any feedback after all the work I put in for you...