Giter Club home page Giter Club logo

hacs-nuvo-serial's Issues

Issue with direct (USB to SERIAL) connection to NUVO grand concerto

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.

Unable to create socket://ip:port

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.

Cannot Setup Nuvo-Serial on freshly installed HA

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

nuvo_serial won't load and cannot delete integration

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.

Nuvo becomes “unavailable”

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!

Sleeping E6G Causes "Failed to call service media_player/turn_on."

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:

  • After the error is displayed, I can successfully turn on the zone or any other zone
  • After the error is displayed, it won't occur again until all zones have been off for a while
  • The error can occur for any zone once all zones have been off for a while

I am fairly confident that the issue is related to the Nuvo sleeping.

Automation Triggers Missing?

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.

Enhancement: Consider adding a service to allow date/time sync w/ HA

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

Nuvo Concerto

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.

Custom componenent issue with serial port

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

Allowing connection via Music Port (

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?

Connection errors, help would be greatly appreaciated.

Hi,
First of all id like to say a massive thank you for your hard work for this HA addon on. I recently purchased a house and it came with Grand Concerto and every room wired up.
Anyway long story short i am attempting to get this connected to HA, but after 6 hours i feel like i am loosing it a bit :).
This is a POE/RS232 device that i decided to go ahead with https://www.waveshare.com/wiki/RS232/485/422_TO_POE_ETH_(B)#Software
device works fine i can access web GUI and adjust all the settings. But when i'm entering socket address during installation as as such: socket://192.168.1.201:4196 after about 5-10 seconds i get error message "Failed to connect"

This is logs from HA:
Logger: homeassistant
Source: util/async_.py:123
First occurred: 9:07:25 PM (5 occurrences)
Last logged: 9:33:15 PM

Error doing job: Exception in callback SerialTransport.call_connection_lost(None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 119, in check_loop
integration_frame = get_integration_frame()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 61, in get_integration_frame
raise MissingIntegrationFrame
homeassistant.helpers.frame.MissingIntegrationFrame

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.11/site-packages/serial_asyncio/init.py", line 417, in call_connection_lost
self.serial.close()
File "/usr/local/lib/python3.11/site-packages/serial/urlhandler/protocol_socket.py", line 104, in close
time.sleep(0.3)
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 168, in protected_loop_func
check_loop(func, strict=strict)
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 123, in check_loop
raise RuntimeError( # noqa: TRY200
RuntimeError: Detected blocking call to sleep inside the event loop. Use await hass.async_add_executor_job(); This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue

And this is a second error log from HA:
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 multi-zone amplifier (serial) (documentation, issues)
First occurred: 9:06:58 PM (5 occurrences)
Last logged: 9:32:37 PM

Traceback (most recent call last):
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 500, 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 640, in readuntil
await self._wait_for_data('readuntil')
File "/usr/local/lib/python3.11/asyncio/streams.py", line 525, 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 502, 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

Any help or guidence in the right direction would be greatly appreaciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.