Coder Social home page Coder Social logo

Comments (7)

vin-w avatar vin-w commented on June 16, 2024 1

Hi roleoroleo,

Thanks for being so response! Really appreciate!

My model:
Firmware Version | 0.2.4 (yi-hack version)
Model Suffix | y20ga (yi camera model)

I fixed the setup error and it works!
See PR
#2

from yi-hack_ha_integration.

roleoroleo avatar roleoroleo commented on June 16, 2024

Do you want to try the last version?

from yi-hack_ha_integration.

lesensei avatar lesensei commented on June 16, 2024

I'm on the same HA version (2021.4.4) and just tried your latest code (commit 4e5d78b). I'm getting a different error:

File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 107, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 214, in _async_handle_step
result: dict = await getattr(flow, method)(user_input)
File "/config/custom_components/yi_hack/config_flow.py", line 61, in async_step_user
auth = HTTPBasicAuth(user, password)
NameError: name 'HTTPBasicAuth' is not defined
2021-04-23 20:52:51 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: 

Would you like me to try with http auth disabled on the camera ?

from yi-hack_ha_integration.

roleoroleo avatar roleoroleo commented on June 16, 2024

Yes please, I tested it without auth.
Tomorrow I will try to enable it.

from yi-hack_ha_integration.

lesensei avatar lesensei commented on June 16, 2024

OK, I could add the integration, but no new device or entity has been added to HA. I got the following logs:

2021-04-23 21:11:25 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry yi-hack-501395xxxxxx for yi_hack
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/yi_hack/__init__.py", line 49, in async_setup_entry
hass.config_entries.async_update_entry(entry, data={**entry.data, CONF_TOPIC_SOUND_DETECTION: mqtt[CONF_TOPIC_SOUND_DETECTION]})
KeyError: 'TOPIC_SOUND_DETECTION'
2021-04-23 21:11:30 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: 

from yi-hack_ha_integration.

roleoroleo avatar roleoroleo commented on June 16, 2024

Which model do you have?
mstar? allwinner? allwinner-v2?

from yi-hack_ha_integration.

roleoroleo avatar roleoroleo commented on June 16, 2024

Maybe I fixed it with the last commit.
Both, auth and TOPIC_SOUND_DETECTION.

from yi-hack_ha_integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.