Programming

python-yeelight response error, Bulb closed the connection. 발생시

stein 2022. 2. 2. 11:17

File "/home-light-_QDhjiKn-py3.8/lib/python3.8/site-packages/yeelight/main.py", line 344, in _command
    cmd = self.send_command(
  File "/home/jun/.cache/pypoetry/virtualenvs/home-light-_QDhjiKn-py3.8/lib/python3.8/site-packages/yeelight/main.py", line 814, in send_command
    raise BulbException(response["error"])
yeelight.main.BulbException: Bulb closed the connection.

 

위와 같은 에러가 발생해서, 어쩔 수 없는 문제인가보다.. 하고 비동기로 처리하려고 이래저래 헤맸다. 비동기로 구현했지만 socket을 중복으로 열지 못하는 것까지 확인하고 다른 방법을 찾다보니 무슨.. developer 등록하는게 있다고 해서 어플을 들어갔는데...?

 

펌웨어 업데이트가 보이더라.

 

업데이트 하니 저 에러 발생안함.

 

ㅎㅎ.

 

결론: Bulb closed the connection. 이라며 response가 오지 않는 버그가 있다면, 전구의 펌웨어 업데이트를 해주자