Open matteopeli opened 10 months ago
Hi @matteopeli Thanks for the feedback, yes the integration should use your local host since this should perform local interactions only. I guess that error means we reached the device and authenticated successfully (I think). I will later share some commands, so we can look at this together in meantime can you enable the logs in the integration and post them here (please remove any confidential info). As mentioned, I only have one device so this was tested with that model only, hopefully with the community help we can ensure other models are supported.
@matteopeli I looked into the HA logs you shared and into the code, it looks like your device might be sending a different response from the model I have. In order to be able to implement support for your device model I need to have access to the debug logs, that will provide me the responses retrieved from your device. You can follow the instruction from HA as described in here (in that case it's for the mqtt integration but you have the same options for the ecoforest integration). Let me know if you have any troubles I am happy to assist.
Hi, I Tryed to swith on the log but I can't change the log option due to the integration is not be visibile the the integration page. I can only add the 3 parameters Host/user/pwd and after the integration goes in errore and disappears in the page. The log I have now are only what I already sent. Let me know how can i help you Thanks Matteo
@matteopeli you can follow this and configure in yaml the debug logging for the integration.
# Example configuration.yaml entry
logger:
default: info
logs:
homeassistant.components.ecoforest: debug
FYI, I will push a change so that the libraries logs this type of errors in the error level, but not sure when will be released.
sorry for the late answer. log in attach. host: https://192.168.1.45:8000/
Let me know for any concerns Matteo
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/ecoforest/config_flow.py", line 46, in async_step_user device = await api.get() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyecoforest/api.py", line 46, in get return Device.build( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyecoforest/models/device.py", line 123, in build model=stats["Me"],
KeyError: 'Me'
@matteopeli Unfortunately the library logs don't appear on HA logs, I have added the following PR https://github.com/home-assistant/core/pull/103274 to ensure that library logs are enabled when the integration debug is enabled.
With this additional information will be present in the logs and I will be able to help you.
I hope this get's release in the upcoming patch version.
The patch is going to be released on 2023.11.1. Please test it with the debug enabled as explained on https://github.com/pjanuario/pyecoforest/issues/12#issuecomment-1769213777 and post the log entries.
using 2023.11.1 File "/usr/src/homeassistant/homeassistant/components/ecoforest/config_flow.py", line 46, in async_step_user device = await api.get() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyecoforest/api.py", line 46, in get return Device.build( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyecoforest/models/device.py", line 123, in build model=stats["Me"],
KeyError: 'Me'
@matteopeli you need to enable the logs as mentioned in the previous comments.
@matteopeli you can follow this and configure in yaml the debug logging for the integration.
# Example configuration.yaml entry logger: default: info logs: homeassistant.components.ecoforest: debug
FYI, I will push a change so that the libraries logs this type of errors in the error level, but not sure when will be released.
I did it but the error is the same unfortunately
2023-11-10 11:13:08.666 ERROR (MainThread) [homeassistant.components.ecoforest.config_flow] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/ecoforest/config_flow.py", line 46, in async_step_user device = await api.get() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyecoforest/api.py", line 46, in get return Device.build( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyecoforest/models/device.py", line 123, in build model=stats["Me"],
KeyError: 'Me'
@matteopeli apologies, but been a bit busy with work and family.
Take a look at this comment: https://github.com/home-assistant/home-assistant.io/issues/30031#issuecomment-1837185818
This allows you to run a debug script that output the device information.
Describe the bug I have a Ecoforest ECOAIR boiler at home and I tried using the integration unfortunately with some issues.
To Reproduce HA version 2023.10.0 In the integration parameters I used as HOST: http://ecoforesthome.com/it/user , user and pwd. but i got in the log: httpx.HTTPStatusError: Client error '404 Not Found' for url 'http://ecoforesthome.com/it/user/recepcion_datos_4.cgi' For more information check: https://httpstatuses.com/404 I tried also with http://ecoforesthome.com/ or http://ecoforesthome.com/es
I tried also with mine local url: https://192.168.1.198:8000/ because I checked the url: https://192.168.1.198:8000/recepcion_datos_4.cgi and it seems working correctly. but I got a different error see in logs attached. File "/usr/local/lib/python3.11/site-packages/pyecoforest/models/device.py", line 123, in build model=stats["Me"],
I look forward to hearing from you and thanks for the great job you did. Matteo