hunterjm / ac-infinity-hacs

Custom Integration for AC Infinity Controllers
MIT License
25 stars 8 forks source link

500 Internal Server Error Server got itself in trouble #7

Open dagrah opened 9 months ago

dagrah commented 9 months ago

When i want to install this integration i get this Error: 500 Internal Server Error Server got itself in trouble I already completly deleted it, reinstall, Hardware reboot etc. but it just wont work. In Version 1.0.2 was no problem since the 2023.09 Update. So am I doing something wrong, or is there a problem with my system?

sashalondon commented 9 months ago

I also have the exact same error trying to install today. Home Assistant 2023.9.3 Supervisor 2023.09.2 Operating System 10.5 v1.0.3

Porterhouse21 commented 9 months ago

same

flamedodger commented 8 months ago

I the same issue. HA OS Raspberry Pi 4 2023.10 Controller 67 Logger: aiohttp.server Source: /usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py:403 First occurred: 15:47:19 (3 occurrences) Last logged: 18:17:05

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin return await func(self, request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 147, in post return await super().post(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post result = await self._flow_mgr.async_init( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 872, in async_init flow, result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 900, in _async_init result = await self._async_handle_step(flow, flow.init_step, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 394, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ac_infinity/config_flow.py", line 104, in async_step_user service_info.advertisement.manufacturer_data[MANUFACTURER_ID]


KeyError: 2306
dagrah commented 8 months ago

2

I hope this will help you

nickythegreek commented 7 months ago

Same 500 error. My 69pro is already connected to the smartphone app. Is that an issue?

dagrah commented 7 months ago

The app has to be completly closed. If its running in the background, HA cant get infos. But you can use the app ofcourse anytime you want and set your shedules or anything else. But you have to close the app, to use it then in HA. Or deactivate Bluetooth on your phone if youre not sure, if the app is really closed

nickythegreek commented 7 months ago

It immediately showed up in HA once I force quit the app. Thank you so much! As I add new sensors (lights, side fan) to the controller, will they automatically be added in HA?

dagrah commented 7 months ago

I only have a fun running, so i cant answer your question. Sorry for that.

nickythegreek commented 7 months ago

I added the light to the setup, unfortunately it did not appear as an entity under the controller. Removed the controller, restarted, and it detected the controller again but no new sensors. At least I can get the temp, humid and vpd though! Appreciate your work on this integration.

Kulturnilpferd commented 2 months ago

The app has to be completly closed. If its running in the background, HA cant get infos. But you can use the app ofcourse anytime you want and set your shedules or anything else. But you have to close the app, to use it then in HA. Or deactivate Bluetooth on your phone if youre not sure, if the app is really closed

This fixed my issue. If the bluetooth adapter is installed within homessistant it has worked for me :)

Viss commented 5 days ago

Hi! I'm having this exact same issue. I just have one fan attached to a pro 69 (bluetooth only). I have a ub100 high-end usb blueooth adapter in the raspberry pi for HA, and that rpi also has a bluetooth adapter. I have a bunch of other things talking bluetooth to it (aranet sensors) and all those are working just fine - I've tried re-seating the usb bt adapter, i made sure the pro 69 was patched to its latest firmware, i made sure there were no other devices attached to it, i went into the terminal in HA and did bluetoothctl scan on, ive rebooted a bunch of times, removed and re-added the repository - it seems nothing i do can get HA to discover the controller - I just get the error from the start of this thread.

anybody have any tips or tricks I can try?

Viss commented 5 days ago

I made a little progress. Here's what I did:


2024-06-23 15:48:50.072 ERROR (MainThread) [custom_components.xiaomi_miio_airpurifier.fan] Got exception while fetching the state: Unable to discover the device 10.0.2.196 , _retry=10
2024-06-23 15:49:16.420 ERROR (MainThread) [homeassistant.components.bluetooth.manager] Error in bluetooth callback
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/manager.py", line 184, in async_register_callback
    callback(service_info, BluetoothChange.ADVERTISEMENT)
  File "/config/custom_components/ac_infinity/coordinator.py", line 87, in _async_handle_bluetooth_event
    self.controller.set_ble_device_and_advertisement_data(
  File "/usr/local/lib/python3.12/site-packages/ac_infinity_ble/device.py", line 76, in set_ble_device_and_advertisement_data
    advertisement_data.manufacturer_data[MANUFACTURER_ID]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^