dm82m / hass-Deltasol-KM2

Custom component for retrieving sensor information from Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB
MIT License
25 stars 6 forks source link

Your device was reachable but we could not correctly detect it #19

Closed frantzphilippe closed 2 years ago

frantzphilippe commented 2 years ago

Hello,

As indicated in the logs, I create an issue here (Your device was reachable but we could not correctly detect it) Error obtained for an KM2. Don't know what's going on.

What would you need to help in debug?

Error while setting up deltasol platform for sensor 10:54:32 – (ERREUR) Capteur (intégration personnalisée) Unexpected error fetching deltasol_km2_sensor data: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose 10:54:31 – (ERREUR) deltasol (intégration personnalisée) Stopping Deltasol Resol integration due to previous error: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose 10:54:31 – (ERREUR) deltasol (intégration personnalisée) Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose 10:54:31 – (ERREUR) deltasol (intégration personnalisée)

Frantz

dm82m commented 2 years ago

Can you please enable debug log, restart your home assistant and post the logs again:

https://github.com/dm82m/hass-Deltasol-KM2#troubleshooting

frantzphilippe commented 2 years ago

Thank you! Done : Cette erreur provient d'une intégration personnalisée

Logger: custom_components.deltasol Source: custom_components/deltasol/deltasolapi.py:71 Integration: deltasol (documentation, issues) First occurred: 11:21:06 (1 occurrences) Last logged: 11:21:06

Unexpected error fetching deltasol_km2_sensor data: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/deltasol/sensor.py", line 80, in async_update_data raise error File "/config/custom_components/deltasol/sensor.py", line 76, in async_update_data data = await hass.async_add_executor_job(api.fetch_data) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/deltasol/deltasolapi.py", line 104, in fetch_data raise error File "/config/custom_components/deltasol/deltasolapi.py", line 89, in fetch_data product = self.detect_product() File "/config/custom_components/deltasol/deltasolapi.py", line 71, in detect_product raise IntegrationError(error) homeassistant.exceptions.IntegrationError: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose

and:

Logger: homeassistant.components.sensor Source: custom_components/deltasol/sensor.py:55 Integration: Capteur (documentation, issues) First occurred: 11:21:07 (1 occurrences) Last logged: 11:21:07

Error while setting up deltasol platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/deltasol/sensor.py", line 95, in async_setup_platform await update_unique_ids(hass, coordinator.data) File "/config/custom_components/deltasol/sensor.py", line 55, in update_unique_ids for unique_id, endpoint in data.items(): AttributeError: 'NoneType' object has no attribute 'items'

Hope this helps.

dm82m commented 2 years ago

no, that is not all I need, there should be information like these:

2022-07-21 08:14:34 INFO (SyncWorker_1) [custom_components.deltasol] Auto detecting Resol Deltasol product from http://192.168.178.15/cgi-bin/get_resol_device_information
2022-07-21 08:14:34 DEBUG (SyncWorker_1) [custom_components.deltasol] response: vendor = "RESOL"
product = "KM2"
serial = "XXX"
version = "1.2.0"
build = "rc1"
name = "KM2-XXX"
features = "vbus,km2"
2022-07-21 08:14:34 INFO (SyncWorker_1) [custom_components.deltasol] Detected Resol Deltasol product: km2
2022-07-21 08:14:34 DEBUG (SyncWorker_1) [custom_components.deltasol] Retrieving data from km2
2022-07-21 08:14:34 DEBUG (SyncWorker_1) [custom_components.deltasol] KM2 requesting sensor data url http://192.168.178.15/cgi-bin/resol-webservice
dm82m commented 2 years ago

you can use home assistant logging and filter based on the keyword 'deltasol' and then post the full log content here.

frantzphilippe commented 2 years ago

Oh OK, I hope I'm good this time :

2022-07-25 11:18:13 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration deltasol which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-07-25 11:21:06 INFO (SyncWorker_10) [custom_components.deltasol] Auto detecting Resol Deltasol product from http://192.168.2.102/cgi-bin/get_resol_device_information 2022-07-25 11:21:06 DEBUG (SyncWorker_10) [custom_components.deltasol] response: vendor = "RESOL" 2022-07-25 11:21:06 ERROR (SyncWorker_10) [custom_components.deltasol] Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose 2022-07-25 11:21:06 ERROR (MainThread) [custom_components.deltasol] Stopping Deltasol Resol integration due to previous error: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose 2022-07-25 11:21:06 ERROR (MainThread) [custom_components.deltasol] Unexpected error fetching deltasol_km2_sensor data: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose File "/config/custom_components/deltasol/sensor.py", line 80, in async_update_data File "/config/custom_components/deltasol/sensor.py", line 76, in async_update_data File "/config/custom_components/deltasol/deltasolapi.py", line 104, in fetch_data File "/config/custom_components/deltasol/deltasolapi.py", line 89, in fetch_data File "/config/custom_components/deltasol/deltasolapi.py", line 71, in detect_product homeassistant.exceptions.IntegrationError: Your device was reachable but we could not correctly detect it, please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose 2022-07-25 11:21:06 DEBUG (MainThread) [custom_components.deltasol] Finished fetching deltasol_km2_sensor data in 0.235 seconds (success: False) 2022-07-25 11:21:06 DEBUG (MainThread) [custom_components.deltasol] Checking for sensors with old ids in registry. 2022-07-25 11:21:07 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up deltasol platform for sensor File "/config/custom_components/deltasol/sensor.py", line 95, in async_setup_platform File "/config/custom_components/deltasol/sensor.py", line 55, in update_unique_ids

dm82m commented 2 years ago

within your network, please open this url in a web browser and post the result: http://192.168.2.102/cgi-bin/get_resol_device_information

frantzphilippe commented 2 years ago

Done : vendor = "RESOL" product = "VBus/LAN Adapter" serial = "001e66423ecb" version = "2.0" build = "rc1-WL-MAR" name = "RESOL-LAN-Atelier" features = "vbus" pcbserial = "4032220"

dm82m commented 2 years ago

seems that you are not having a KM2 or DL2 or DL3 device. instead you are having the vbus lan adapter. this plugin is not working with the vbus lan adapter.

see: https://github.com/dm82m/hass-Deltasol-KM2/issues/17

frantzphilippe commented 2 years ago

Oh Yes, sorry! It's true that I wanted to buy the KM2, but it was not avaialble so I bought the vbus LAN adaptor. But as I used successfully the json-live-data server tool provided here I thought it could maybe use the same way to read data. Sorry to have disturbed you and thank you very much for your prompt answers.

dm82m commented 2 years ago

yes if you run this server and emulate a km2 you can use our plugin here to grab the data from the emulated km2.

frantzphilippe commented 2 years ago

I don’t have that skill, but maybe with a few tips, to understand how to emulate a km2, I could try to make it by myself?

dm82m commented 1 year ago

@frantzphilippe I created an Home Assistant addon to run the json-live-data-server. Would you like to be a test candidate?