sprocket-9 / hacs-nuvo-serial Goto Github PK
View Code? Open in Web Editor NEWCustom component to control a Nuvo Grand Concerto/Essentia G multi-zone amplifier via serial connection
License: MIT License
Custom component to control a Nuvo Grand Concerto/Essentia G multi-zone amplifier via serial connection
License: MIT License
I have a question with the HA component you built for use with Nuvo mutli zone amps. Does the code validate the model on the initial setp connection? When trying to add the device it seems to take a bit before failing the connection. I ask as I am trying to use this with a Nuvo Concerto device and wanted to see if a connection is being established.
If the code could be modified and you are looking to test on a Concerto I am willing to test this out.
hi. it seems the component fails to load after upgrading to HA 2023.3.5 . This is the error:
Logger: homeassistant.setup
Source: setup.py:213
First occurred: 8:01:05 AM (1 occurrences)
Last logged: 8:01:05 AM
Setup failed for custom integration nuvo_serial: Unable to import component: No module named 'typeguard.importhook'
i'm on v2.0.0. thanks.
3/18 - also, as mentioned by others, i cannot delete the integration either.
Attempting to add the integration and receiving an error stating "Invalid Port" ....
Nuvo-Serial integration dialog -
socket://192.168.10.201:10000
ser2net json configuration -
connection: &con01
accepter: tcp,10000
enable: on
options:
kickolduser: true
connector: serialdev,/dev/ttyUSB0,57600n81,local
The connector works perfectly when I remotely telnet and I can execute Nuvo commands.
Hi, Appologies im not very technical and dont want to mess with your code since i have zero experience. Regardless i have received a deprecated aliases warning in the logs. this is a message:
Logger: homeassistant.helpers.typing
Source: helpers/deprecation.py:197
First occurred: 6:16:34 PM (3 occurrences)
Last logged: 6:16:35 PM
HomeAssistantType was used from nuvo_serial, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'nuvo_serial' custom integration
HomeAssistantType was used from webrtc, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'webrtc' custom integration
ServiceCallType was used from webrtc, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.ServiceCall instead, please report it to the author of the 'webrtc' custom integration
-Also another thing i've been getting some warning about async as well, but i used chatgpt and adjusted init.py. Warnings now stopped. To be honest not sure what i've done or was it really necessary, anyway i made a backup just in case. But this is edited init.py:
instead of adding a whole text here i will attach the file... When i copy and pasted it looked messy :)
Anyway thank you very much for your work...
init.txt
First off all, thanks for all the effort that has been put in this integration.
I just found it by looking at a way of adding my multiroom NUVO Grand Concerto to my home assistant setup.
Everything fine, since HACS was allready up and running it looked very simple.
I verified the right port for the direct USB to serial link from the raspberry pi 'hardware' section and am pretty sure that's all good.
Still I get the "FAILED TO CONNECT" response.
(when selecting the essentia model, I get the incompatible version error, so pretty sure there is some communication going on).
I post the last lines of my attempt as found in the log file. Unfortunatly i cannot make anything out of it.
2023-12-18 23:37:02.478 ERROR (MainThread) [custom_components.nuvo_serial.config_flow]
Traceback (most recent call last):
File "/config/custom_components/nuvo_serial/config_flow.py", line 111, in async_step_init
self._nuvo = await get_nuvo_async(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/init.py", line 35, in get_nuvo_async
await nuvo.connect()
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 710, in connect
await self._state_tracker.get_initial_states()
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 185, in get_initial_states
await self._get_zone_configurations()
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 221, in _get_zone_configurations
await self._nuvo.zone_configuration(zone)
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 101, in wrapper
return await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/icontract/_checkers.py", line 757, in wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 839, in zone_configuration
return await self._connection.send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 504, in send_message
response = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 681, in _message_response_reader
processed_type, d_class = process_message(self._model, message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/message.py", line 797, in process_message
d_class = msg_class.from_string(msg) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/message.py", line 548, in from_string
z_sources = SourceMask(int(zone_values.group("sources"))).to_list()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 712, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 1143, in new
raise exc
File "/usr/local/lib/python3.11/enum.py", line 1120, in new
result = cls.missing(value)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 1401, in missing
raise ValueError(
ValueError: <flag 'SourceMask'> invalid value 255
given 0b0 11111111
allowed 0b0 00111111
Any help or suggestions are much appreciated.
I am getting an error from my install and it is pointing to the custom component. here is my only log:[http://pastie.org/p/6D1DNDBoY26P7ZfrtRCiER]
This error originated from a custom integration.
Logger: custom_components.nuvo_serial.config_flow
Source: custom_components/nuvo_serial/config_flow.py:111
Integration: nuvo_serial (documentation, issues)
First occurred: 6:46:16 AM (1 occurrences)
Last logged: 6:46:16 AM
Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 490, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 676, in _message_response_reader
message = await self._read_message_from_buffer()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 719, in _read_message_from_buffer
message = await self._reader.readuntil(self._eol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/streams.py", line 637, in readuntil
await self._wait_for_data('readuntil')
File "/usr/local/lib/python3.11/asyncio/streams.py", line 522, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 504, in send_message
response = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 492, in wait_for
raise exceptions.TimeoutError() from exc
TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/nuvo_serial/config_flow.py", line 111, in async_step_init
self._nuvo = await get_nuvo_async(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/init.py", line 35, in get_nuvo_async
await nuvo.connect()
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 710, in connect
await self._state_tracker.get_initial_states()
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 184, in get_initial_states
await self._get_party_status()
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 101, in wrapper
return await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 245, in _get_party_status
return await self._nuvo._connection.send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nuvo_serial/connection.py", line 514, in send_message
raise MessageResponseError(err_msg) from exc
nuvo_serial.exceptions.MessageResponseError: RESPONSEREADER: Timeout waiting for response to message: *Z0PARTY0
Using HA in a Docker container, installed HACS successfully. Downloaded Nuvo-Serial successfully. When I initiate setup it fails with "Failed to Connect" error. At first thought it was an issue with the home assistant container accessing the serial port. After a few days of changing mappings and enabling privileged with no success I connect the docker server to my laptop via serial and tried to initiate the setup again I could see through real term that the serial communication was working when *VERcr showed in the terminal.
Eventually, I found my way to the Home Assistant logs where I could see that Nuvo-Serial is asking for data and the Nuvo GC is not giving the answer it will accept. I am attaching the log file. If you could please give me instructions in how I can rectify this I would appreciate your help.
File "/usr/local/lib/python3.12/enum.py", line 1426, in missing
raise ValueError(
ValueError: <flag 'SourceMask'> invalid value 255
given 0b0 11111111
allowed 0b0 00111111
Thanks,
Mark
home-assistant_2024-05-06T15-44-05.561Z.log
In the Automation Triggers
section, README.md
indicates that I should be able to trigger automations using the keypads. When I choose any of my Essentia G media player entities as the device for a device trigger while creating a new automation, the Trigger
dropdown remains disabled and indicates No triggers
. As such, I can't trigger automations using my keypads. The documentation doesn't make it clear whether the availability of this option is limited to specific devices (for instance, perhaps it's a Grand Concerto only feature?) or configurations (for instance, even though this system never had more than 3 nuvonet devices, maybe all sources are configured as nuvonet devices?), so I am not certain if this is a limitation of my system, expected pending specific action I haven't taken, or an issue that might merit additional investigation.
hi. I have a tcp-to-rs232 converter (USR-TCP232-302) attached to a Grand Concerto. I can connect to it from HA just fine. However, it seems to “disconnect” after a few minutes and the zones/etc become unavailable. This is the error i see in the logs:
`Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/nuvo_serial/media_player.py:529
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 7:04:31 AM (2 occurrences)
Last logged: 7:04:43 AM
[547465673264] RESPONSEREADER: Timeout waiting for response to message: *Z1ON
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/nuvo_serial/connection.py", line 665, in _message_response_reader
message = await self._read_message_from_buffer()
File "/usr/local/lib/python3.10/site-packages/nuvo_serial/connection.py", line 708, in _read_message_from_buffer
message = await self._reader.readuntil(self._eol)
File "/usr/local/lib/python3.10/asyncio/streams.py", line 617, in readuntil
await self._wait_for_data('readuntil')
File "/usr/local/lib/python3.10/asyncio/streams.py", line 502, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/nuvo_serial/connection.py", line 493, in send_message
response = await asyncio.wait_for(
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
await result
File "/config/custom_components/nuvo_serial/media_player.py", line 529, in async_turn_on
await self.nuvo.set_power(self.zone_id, True)
File "/usr/local/lib/python3.10/site-packages/nuvo_serial/connection.py", line 99, in wrapper
return await coro(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/icontract/_checkers.py", line 587, in wrapper
result = await func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/nuvo_serial/grand_concerto_essentia_g.py", line 765, in set_power
return await self._connection.send_message(
File "/usr/local/lib/python3.10/site-packages/nuvo_serial/connection.py", line 503, in send_message
raise MessageResponseError(err_msg) from exc
nuvo_serial.exceptions.MessageResponseError: RESPONSEREADER: Timeout waiting for response to message: *Z1ON
`
I’ve left “TCP Server-kick off old connection” unchecked and have disabled “Reset Timeout” in the converter, but didn’t seem to make a difference. The current workaround that seems to be working is that I’ve left a zone on (one of the unused extra zones) and this seems to keep the connection active. Any other fix for this? Thanks!
The keypads can display time when switched off.
Due to daylight saving change or just drift, the time displayed may not be accurate.
A simple service used in an automation to sync date and time would be useful
the command to be sent to nuvo GC multizone is " *CFGTIME yyyy,mm,dd,h,mm "
the response is a simple #OK or error (#?) in case of formatting error
My Nuvo system isn’t used much, so I assume it is frequently in its power saving state. Because of this, I usually get an error anytime I try to turn on a zone. If I understand the seemingly related conversation in the Legrand Nuvo multi-room audio support Home Assistant Community Thread, post#75 should resolve that issue. This is based on post#78 explaining the standby behavior. However, even that is the correct fix, I'm not 100% certain whether or not it ever was (or could be) merged for HACS. Post#88 says v 1.1.0 includes "Essentia G fixes" so it seems feasible that a fix was merged and only partially resolves the issue (or that regression occurred in v2, which is all I have ever run). Since I am running v2.0.1 (the latest), I thought I should submit my issue here for review vs attempting an old fix that might be more likely to break things.
So, to report the issue formally:
I get an error like this when trying to turn on a zone:
Failed to call service media_player/turn_on.
RESPONSEREADER: Timeout waiting for response to message: *Z5ON
The 5 in “*Z5ON” is the zone number in this example, so it varies depending on which zone I am trying to turn on.
Given these points:
I am fairly confident that the issue is related to the Nuvo sleeping.
I own an old music port, which sits between my Grand Concerto and my PC. It supports the entire stack of commands, but changes one little thing that breaks the implementaiton. When querying *VER to the serial port, the response is two lines, where the first one can be ignored:
#VER"NV-NNA FWv1.08 HWv0"
#VER"NV-I8G FWv2.66 HWv0"
I would love to keep the music port connected as is, since I do not think it will break anything. I have tried to look at the code in order to find where the model is defined.
Apparently this is done in:
from nuvo_serial.const import MODEL_GC
but I cannot find a definition of MODEL_GC
in any of the files.
Therefore it appears that I am not sufficiently well-versed in git (and / or python) to fix this myself and submit a proposed change. Can you help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.