Closed certifield closed 1 year ago
It looks like the data returned by the energy manager could not be parsed.
Can you open the link below with a browser and tell me what you get as a response?
http://192.168.178.222/rest/kiwigrid/wizard/devices
Normally you should receive a JSON string as a response.
On Mon, Oct 31, 2022, 17:22 certifield @.***> wrote:
Good day, unfortunately I get the following error during configuration:
[image: image] https://user-images.githubusercontent.com/84770380/199057630-ec97e3f8-be09-4735-8d8e-c61614426fed.png
Here is the information from the log:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: aiohttp.server Source: custom_components/solarwatt_energymanager/config_flow.py:64 Integration: SOLARWATT EnergyManager (documentation, issues) First occurred: 17:16:30 (1 occurrences) Last logged: 17:16:30
Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/solarwatt_energymanager/energy_manager.py", line 31, in test_connection raise CannotParseData solarwatt_energymanager.energy_manager.CannotParseData
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/config/custom_components/solarwatt_energymanager/config_flow.py", line 63, in async_step_user serial_number = await validate_host(user_input) File "/config/custom_components/solarwatt_energymanager/config_flow.py", line 32, in validate_host serial_number = await eman.test_connection() File "/usr/local/lib/python3.10/site-packages/solarwatt_energymanager/energy_manager.py", line 33, in test_connection raise CannotParseData solarwatt_energymanager.energy_manager.CannotParseData
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/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 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, 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 82, 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/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 178, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/solarwatt_energymanager/config_flow.py", line 64, in async_step_user except em.CannotConnect: AttributeError: module 'solarwatt_energymanager' has no attribute 'CannotConnect'
— Reply to this email directly, view it on GitHub https://github.com/Mas2112/solarwatt-energymanager-homeassistant/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJLAZHNO5YBHT6CUIE4ADWF7W2TANCNFSM6AAAAAARTHZZ4U . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The following information will be output:
{"message":"HTTP 404 Not Found","exceptionType":"javax.ws.rs.NotFoundException","stackTrace":{"javax.ws.rs.NotFoundException: HTTP 404 Not Found":["org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:323)","org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)","org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)","org.glassfish.jersey.internal.Errors.process(Errors.java:315)","org.glassfish.jersey.internal.Errors.process(Errors.java:297)","org.glassfish.jersey.internal.Errors.process(Errors.java:267)","org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)","org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)","org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)","org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)","org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)","org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)","org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)","org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)","com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)","org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)","org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)","org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)","org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)","org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)","org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)","org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)","org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)","org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)","org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)","org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)","org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)","org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)","org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)","org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)","org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)","org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)","org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)","org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)","org.eclipse.jetty.server.Server.handle(Server.java:494)","org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)","org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)","org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)","org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)","org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)","org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)","org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)","java.base/java.lang.Thread.run(Thread.java:829)"]}}
It appears that you have an EnergyManager that's not supported by the component.
Do you have the newer EnergyManager Flex, which is black? Mine is a white one
On Mon, Oct 31, 2022, 20:20 certifield @.***> wrote:
The following information will be output:
{"message":"HTTP 404 Not Found","exceptionType":"javax.ws.rs.NotFoundException","stackTrace":{"javax.ws.rs.NotFoundException: HTTP 404 Not Found":["org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:323)","org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)","org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)","org.glassfish.jersey.internal.Errors.process(Errors.java:315)","org.glassfish.jersey.internal.Errors.process(Errors.java:297)","org.glassfish.jersey.internal.Errors.process(Errors.java:267)","org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)","org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)","org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)","org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)","org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)","org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)","org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)","org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)","com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)","org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)","org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)","org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)","org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)","org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)","org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)","org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)","org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)","org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)","org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)","org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)","org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)","org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)","org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)","org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)","org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)","org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)","org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)","org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)","org.eclipse.jetty.server.Server.handle(Server.java:494)","org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)","org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)","org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)","org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)","org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)","org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)","org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)","java.base/java.lang.Thread.run(Thread.java:829)"]}}
— Reply to this email directly, view it on GitHub https://github.com/Mas2112/solarwatt-energymanager-homeassistant/issues/9#issuecomment-1297558296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJLAZMLTSY634YISFLARTWGALXPANCNFSM6AAAAAARTHZZ4U . You are receiving this because you commented.Message ID: @.*** com>
Correct it is the Solarwatt Manager flex.
So I can not connect the gateway with your integration?
Beste Grüße / Best regards
The EnergyManager Flex is not supported by this integration. Unfortunately, I don't have one, so I don't know how to make it work with the new EnergyManager.
On Mon, Oct 31, 2022, 20:44 certifield @.***> wrote:
Correct it is the Solarwatt Manager flex.
So I can not connect the gateway with your integration?
Beste Grüße / Best regards
— Reply to this email directly, view it on GitHub https://github.com/Mas2112/solarwatt-energymanager-homeassistant/issues/9#issuecomment-1297586878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJLAYVJN3B5HRICUQ6WDLWGAOQ3ANCNFSM6AAAAAARTHZZ4U . You are receiving this because you commented.Message ID: @.*** com>
Okay, thanks for the feedback! Beste Grüße / Best regards
Or would you have desire/interest to expand your integration?
I could test the connection and provide you with the needed information.
If the JSON structure is the same, I can try to integrate it.
I just need to know which URL to call.
If it's completely different, then it'll have to be a completely different integration.
On Mon, Oct 31, 2022, 21:09 certifield @.***> wrote:
Or would you have desire/interest to expand your integration?
I could test the connection and provide you with the needed information.
— Reply to this email directly, view it on GitHub https://github.com/Mas2112/solarwatt-energymanager-homeassistant/issues/9#issuecomment-1297622720, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJLAZC2GE6X4AE4ZHURLTWGARO5ANCNFSM6AAAAAARTHZZ4U . You are receiving this because you commented.Message ID: @.*** com>
That would be great!
What information do you need from me?
Can you log into your EnergyManager and turn on your debugger tool in chrome and try to find the GET request where the data is queried?
I need the URL for the GET request and a sample JSON file.
On Mon, Oct 31, 2022, 21:21 certifield @.***> wrote:
That would be great!
What information do you need from me?
— Reply to this email directly, view it on GitHub https://github.com/Mas2112/solarwatt-energymanager-homeassistant/issues/9#issuecomment-1297636379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJLA2M2LP7YNTZU6DNZHTWGAS5JANCNFSM6AAAAAARTHZZ4U . You are receiving this because you commented.Message ID: @.*** com>
Is this the information you need? .har files are not supported therefore as zip. 192.168.178.222.har.zip
By the way, you don't happen to be from Germany?
Thanks for the info. The structure on the Manager Flex is now completely different, so a new integration must be created. I currently don't have the time to do this. Hopefully someone else will create one soon.
BTW. Yes, I live in Germany (but not German).
Hello, unfortunately I get the following error during configuration:
Here is the information from the log:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: aiohttp.server Source: custom_components/solarwatt_energymanager/config_flow.py:64 Integration: SOLARWATT EnergyManager (documentation, issues) First occurred: 17:16:30 (1 occurrences) Last logged: 17:16:30
Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/solarwatt_energymanager/energy_manager.py", line 31, in test_connection raise CannotParseData solarwatt_energymanager.energy_manager.CannotParseData
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/config/custom_components/solarwatt_energymanager/config_flow.py", line 63, in async_step_user serial_number = await validate_host(user_input) File "/config/custom_components/solarwatt_energymanager/config_flow.py", line 32, in validate_host serial_number = await eman.test_connection() File "/usr/local/lib/python3.10/site-packages/solarwatt_energymanager/energy_manager.py", line 33, in test_connection raise CannotParseData solarwatt_energymanager.energy_manager.CannotParseData
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/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 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, 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 82, 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/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 178, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper result = await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/solarwatt_energymanager/config_flow.py", line 64, in async_step_user except em.CannotConnect: AttributeError: module 'solarwatt_energymanager' has no attribute 'CannotConnect'