HomeScript icon indicating copy to clipboard operation
HomeScript copied to clipboard

[Error] Unable to set wemo smart plug

Open sawjai opened this issue 3 years ago • 2 comments

When I use hs.py to set wemo smart plug on/off, I got this exception Traceback (most recent call last): File "/root/hs.py", line 91, in hs.setStates(sys.argv[argumentLength-1] or None) File "/usr/local/lib/python3.9/dist-packages/homescript/init.py", line 124, in setStates item['value'][0]['value'] = int(value) IndexError: list index out of range.

I try to debug the problem, and I found if I make minor change to "/usr/local/lib/python3.9/dist-packages/homescript/init.py" file, it fixes the issue. See attached modified init.py, I am not sure if there is any other place that need to modify.

homescript_debug_2022.03.09.log init.py.gz

sawjai avatar Mar 09 '22 16:03 sawjai

Hi, thank you for identifying issues and contributing. It would be great if you could fork this repo and create a PR with your changes.

Apologies, since I haven't been able to find the time with my day job to actually debug and evaluate these issues.

menahishayan avatar Jan 01 '23 15:01 menahishayan

@sawjai Thanks for that, I was seeing the same error. Your fix works for me however I'm getting Response 470 errors now. Any thoughts?

job2310 avatar Jan 20 '23 12:01 job2310