-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Troubles sending values from HA to TA (conversion negative to unsigned failed) #69
Comments
as written above, I'd like to add some more logs: CoE v2, sending some "energy" values, which are plausibly sended in the CoE addon, but receiving in UVR610 results in totally wrong numbers.
and now with CoE v1, sending the same Energy values, results in an Overflow during sending:
|
Hi, foremost it is normal that when you try to open the CoE Node over the web interface that you get this cryptic window. About your wrong energy values, can you take a look at the CoE state page in the C.M.I.: http://IP/#status_coe.cgi And about your “nice-to-have” request, you can see the order in the attributes of the |
Hello @DeerMaximum , thank you very much for the update and the explanations.
Great work, thank you so much. If you need a tester for new features or so, gime a shout. |
Hi,
as I'm new to GitHub and this project I wanted to say a "Hi" first of all to the masterpiece of this work, @DeerMaximum. Thank you so much for your hard work at this project and its surroundings, you are doing a great job. These additions to HA are exactly what I was looking for to further optimize my heat system! (sorry for the intro...)
After following the documentation, it was possible for me (with only little problems) to receive data from TA in HA. In the other direction, it is a bit more difficult for me. CoE v1 didn't work for me at all (the was an error in the debug-log, I try to reproduce it and post it in a followup). After switching to Coe v2, some values were received in my UVR610 CAN inputs, but the values are wrong and mixed up. Furthermore, opening the "page" from the newly added virtual CAN devices showed weird characters or simply "Error".
I think there are many issues, some may be on my side (configuration fails) but I think I discovered at least one in the code. If I chose to send a "power value" (unit: W), there is an error in the log like this:
13.10.24-21:38:40 DEBUG httpserver(258): Send analog data to CMI with CoE version 2: values=[ValueTypeModelV2(channel=4, value=-3180.0, unit=69)] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ta-coe/ta_coe/httpserver.py", line 124, in _check_coe_version_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp_pydantic/view.py", line 36, in _iter return await getattr(self, method_name.lower())() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp_pydantic/view.py", line 132, in wrapped_handler return await handler(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ta-coe/ta_coe/httpserver.py", line 267, in post coe.send_analog_message(data_to_send) File "/opt/ta-coe/ta_coe/coe/v2/coeserver_v2.py", line 66, in send_analog_message self.cmi_ip, self._builder.build_analog_message(chunk) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ta-coe/ta_coe/coe/v2/message_builder.py", line 46, in build_analog_message return self._build_header(len(updated_values)) + self._build_value_block( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ta-coe/ta_coe/coe/v2/message_builder.py", line 30, in _build_value_block value = self._int_to_bytes( ^^^^^^^^^^^^^^^^^^^ File "/opt/ta-coe/ta_coe/coe/v2/message_builder.py", line 11, in _int_to_bytes return int.to_bytes(integer, length=length, byteorder="little") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: can't convert negative int to unsigned
Furthermore a request, category "nice-to-have":
In the configuration of the CoE-integration, there is no information which data is bound to which channel. If it would be there, it would make assigning data to the correct CAN input on the TA side more easier. So I have to "guess" from top to down which is the correct channel. Or am I missing something?
Thank you!
PS: (better english or german?)
The text was updated successfully, but these errors were encountered: