Giter Club home page Giter Club logo

hacs-nuvo-serial's Introduction

nuvo_serial

Home Assistant custom component integration to control a Nuvo Grand Concerto/Essentia G using a serial connection.

What this Integration does:

Auto discovers zone and source settings from a Nuvo Grand Concerto/Essentia G amplifier, create HA Entities for each settings, allowing control through the Home Assistant web interface.

Amplifier controls exposed:

Zone:

  • On/Off
  • Mute
  • Volume
  • Source selection

Zone EQ:

  • Bass control
  • Treble control
  • Speaker balance control
  • Loudness compensation control

Zone Volume:

  • Maximum volume level
  • Initial: volume level when a zone is powered on for the first time
  • Page: volume level when zone is in page mode
  • Party: volume level when zone is in party mode
  • Volume Reset: toggle to control whether a zone should always reset to Initial volume level at every power on

Source:

  • Gain control

System:

  • Party Mode
  • Paging
  • Zones AllOff

What this Integration does not do:

Provide support for any Nuvo amplifier other than the Grand Concerto/Essentia G.

Interface or control any Nuvonet source component.

Provide a way to send metadata or menus to zone keypads.

Features

Communication between the Nuvo and Home Assistant uses Local Push for state changes, meaning no polling of the Nuvo occurs, so the web interface is fast and responsive. Also as the underlying library nuvo-serial monitors the serial port for activity, any changes to the Nuvo made through zone keypads will be immediately reflected in Home Assistant.

Connection

Connection to the Nuvo amplifier is via the "Programming and Serial Control" RS-232 9-pin female connector, either cabled direct to the device running Home Assistant or remotely over a network using a serial-to-network device.

Direct

Direct connection to the device running Home Assistant, either through a serial-to-serial cable if the device has a serial port, or a USB-to-RS-232 9-pin male cable.

NOTE when using a usb to serial cable, the device name assigned e.g /dev/ttyUSB1 may change when the machine is rebooted and multiple devices on the USB bus are enumerated in a different order. Obviously if this happens Home Assistant will be using the old device name for the serial port and will not be able to contact the Nuvo. To prevent this it's a good idea to assign a fixed device name to the USB cable e.g. /dev/nuvo

Systems and syntax will vary depending on OS etc, but a good Linux-based overview is here.

It essentially comes to down to:

  • Use lusb command to identify usb cable ID
  • Create /etc/udev/rules.d/99-usb-serial.rules
  • Add line: SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="nuvo"
  • Reboot, check for existence of /dev/nuvo
  • Use /dev/nuvo as Port url in the Integration configuration

Remote

Connecting to the Nuvo over a network is possible using a hardware serial-to-network adapter or software such as ser2net.

The port url should then be in the form: socket://host:port

e.g.

A possible ser2net configuration connecting TCP port 10003 to the nuvo device on /dev/ttyUSB1:

Old syntax:

10003:raw:0:/dev/ttyUSB1:57600 8DATABITS NONE 1STOPBIT

ser2net.yaml syntax:

connection: &nuvo
    accepter: tcp,10003
    enable: on
    options:
      kickolduser: true
    connector: serialdev,
              /dev/ttyUSB1,
              57600n81,local

Port URL: socket://192.168.5.1:10003

Installing

hacs_badge

Install using the Home Assistant Community Store HACS.

Once HACS is installed, search the available Integrations for Nuvo multi-zone amplifier (serial) and install to make the integration available for install to Home Assistant.

In Home Assistant home page go to Configuration->Integrations->Add Integration-> Nuvo multi-zone amplifier (serial)

Configure through the GUI:

Port: the url of the serial port e.g /dev/ttyUSB1

Model: Grand Concerto or Essentia G

The existing physical zones and source names are automatically discovered and displayed for optional modification.

An Entity will now be created for each:

Entity Integration Type
Zone Media Player
Zone balance Number
Zone bass Number
Zone treble Number
Zone loudness compensation Switch
Zone Volume Max Number
Zone Volume Initial Number
Zone Volume Page Number
Zone Volume Party Number
Zone Volume Reset Switch
Source Gain Number

Services

nuvo_serial.all_off

Switch off all zones.

nuvo_serial.page_on

Activate Paging feature for all zones. This uses the in-built Nuvo paging feature to switch all zones to use fixed source 6 at a pre-configured paging volume.

nuvo_serial.page_off

Deactivate Paging feature, restoring all zone to pre-page state.

nuvo_serial.party_on

Make the media player zone the party host.

nuvo_serial.party_off

Release the media player zone from being the party host.

nuvo_serial.snapshot

Take a snapshot of the media player zone. Useful for implementing a custom paging feature using automations.

nuvo_serial.restore

Restores the last snapshot of the media player zone.

Keypad Services

The following services simulate pressing the media buttons on a zone's keypad. Useful for testing automations without having to physically press the keypad button.

nuvo_serial.simulate_next_button

Simulate pressing zone keypad Next button.

nuvo_serial.simulate_prev_button

Simulate pressing zone keypad Prev button.

nuvo_serial.simulate_play_pause_button

Simulate pressing zone keypad Play/Pause button.

Automations Triggers

In addition to the media player integration built-in triggers provided by Home Assistant, this integration also provides device triggers for zone keypad Prev, Next and Play/Pause buttons. A press of one of these buttons will cause a device automation trigger to fire. E.g. Triggers for the zone named "Kitchen" can be found in the Automations trigger interface named:

  • Kitchen keypad prev button pressed
  • Kitchen keypad next button pressed
  • Kitchen keypad play/pause button pressed

NOTE: The Nuvo only emits keypad button event messages (and thus the Home Assistant keypad triggers will only fire) when the currently selected Source for a Zone is configured as a Non-Nuvonet source. As of now there is no way to configure the source type through the Home Assistant integration. Use the nuvo-serial Python library or the Windows-based Nuvo Configurator software.

Lovelace Frontend Configuration

Everything in this section is optional and shows a heavily opinionated method of configuring Lovelace to display the Nuvo entities. While it may not be to everyones taste, it should at least give some inspiration for configuration possibilites.

The core Media Player integration (and therefore any Lovelace media control card representing a media player entity) does not provide a way to control a media device's EQ settings. Each EQ setting is modeled using the Number integration. The advantage of this is the ability to use the native number ranges exposed by the Nuvo for each control rather than a card showing a generic 0-X scale.

While Home Assistant will auto-create Lovelace media control and number cards for each Nuvo entity, a more polished look can be achieved using third-party cards mini-media-player and lovelace-slider-entity-row, both cards are installable through HACS.

This example Lovelace configuration displays the EQ settings in a Conditional card that is only displayed when the zone is switched on and an input_boolean entity is True. This input_boolean is toggled by tapping the mini-media-player representing the zone. In order to achieve this, an additional input_boolean entity per-zone needs manually created (it's purely to control the frontend EQ Conditional card, it doesn't represent anything on the Nuvo itself).

e.g. In configuration.yaml:

input_boolean:
  eq_office:
    name: Office EQ
    initial: off
  eq_kitchen:
    name: Kitchen EQ
    initial: off

Will create the entities:

input_boolean.eq_office
input_boolean.eq_kitchen

As shown the yaml section below, the tap action on each mini-media-player will call the input_boolean.toggle service.

Example section in ui-lovelace.yaml:

views:
  - title: MusicZones
    cards:
      - type: vertical-stack
        cards:
          - type: entities
            entities:
              - type: custom:mini-media-player
                entity: media_player.office
                group: true
                hide:
                  controls: false
                  info: true
                  power_state: false
                  play_pause: true
                  prev: true
                  next: true
                icon: mdi:speaker-wireless
                volume_stateless: true
                tap_action:
                  action: call-service
                  service: input_boolean.toggle
                  service_data:
                    entity_id: input_boolean.eq_office

              - type: custom:slider-entity-row
                entity: media_player.office
                full_row: true
                step: 1
                hide_state: false
                hide_when_off: true

          - type: conditional
            conditions:
              - entity: media_player.office
                state: "on"
              - entity: input_boolean.eq_office
                state: "on"
            card:
              type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: number.office_bass
                  name: Bass
                  icon: mdi:music-clef-bass
                  hide_state: false
                  hide_when_off: true
                  full_row: false

                - type: custom:slider-entity-row
                  entity: number.office_treble
                  full_row: false
                  name: Treble
                  icon: mdi:music-clef-treble
                  hide_state: false
                  hide_when_off: true

                - type: custom:slider-entity-row
                  entity: number.office_balance
                  full_row: false
                  name: Balance
                  hide_state: false
                  hide_when_off: true

                - entity: switch.office_loudcmp
                  name: LoudComp
                  show_state: true

                - type: custom:slider-entity-row
                  entity: number.office_volume_max
                  full_row: false
                  name: Volume Max
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - type: custom:slider-entity-row
                  entity: number.office_volume_initial
                  full_row: false
                  name: Volume Initial
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - type: custom:slider-entity-row
                  entity: number.office_volume_page
                  full_row: false
                  name: Volume Page
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - type: custom:slider-entity-row
                  entity: number.office_volume_party
                  full_row: false
                  name: Volume Party
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - entity: switch.office_volume_reset
                  name: Volume Reset
                  show_state: true

          - type: entities
            entities:
              - type: custom:mini-media-player
                entity: media_player.kitchen
                group: true
                hide:
                  controls: false
                  info: true
                  power_state: false
                  play_pause: true
                  prev: true
                  next: true
                icon: mdi:speaker-wireless
                volume_stateless: true
                tap_action:
                  action: call-service
                  service: input_boolean.toggle
                  service_data:
                    entity_id: input_boolean.eq_kitchen

              - type: custom:slider-entity-row
                entity: media_player.kitchen
                full_row: true
                step: 1
                hide_state: false
                hide_when_off: true

          - type: conditional
            conditions:
              - entity: media_player.kitchen
                state: "on"
              - entity: input_boolean.eq_kitchen
                state: "on"
            card:
              type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: number.kitchen_bass
                  name: Bass
                  icon: mdi:music-clef-bass
                  hide_state: false
                  hide_when_off: true
                  full_row: false

                - type: custom:slider-entity-row
                  entity: number.kitchen_treble
                  full_row: false
                  name: Treble
                  icon: mdi:music-clef-treble
                  hide_state: false
                  hide_when_off: true

                - type: custom:slider-entity-row
                  entity: number.kitchen_balance
                  full_row: false
                  name: Balance
                  hide_state: false
                  hide_when_off: true

                - entity: switch.kitchen_loudcmp
                  name: LoudComp
                  show_state: true

                - type: custom:slider-entity-row
                  entity: number.kitchen_volume_max
                  full_row: false
                  name: Volume Max
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - type: custom:slider-entity-row
                  entity: number.kitchen_volume_initial
                  full_row: false
                  name: Volume Initial
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - type: custom:slider-entity-row
                  entity: number.kitchen_volume_page
                  full_row: false
                  name: Volume Page
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - type: custom:slider-entity-row
                  entity: number.kitchen_volume_party
                  full_row: false
                  name: Volume Party
                  hide_state: false
                  hide_when_off: true
                  icon: mdi:tune

                - entity: switch.kitchen_volume_reset
                  name: Volume Reset
                  show_state: true

This configuration will display the cards below, with the EQ settings card toggled by tapping on the media player, in any area not containing a control:

Lovelace

hacs-nuvo-serial's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lleo19

hacs-nuvo-serial's Issues

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?

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.

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!

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

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.

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

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.

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.

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.

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.

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.