sprocket-9 / hacs-nuvo-serial

Custom component to control a Nuvo Grand Concerto/Essentia G multi-zone amplifier via serial connection
MIT License
9 stars 1 forks source link

Unable to create socket://ip:port #4

Closed jeffdoo closed 2 years ago

jeffdoo commented 2 years ago

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.

jeffdoo commented 2 years ago

Actually, the error message is "Failed to connect"

And the following is the first (of two) errors in the log:

` Logger: homeassistant Source: util/async_.py:141 First occurred: 7:55:57 PM (1 occurrences) Last logged: 7:55:57 PM

Error doing job: Exception in callback SerialTransport._call_connection_lost(SerialExcepti...disconnected')) Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.9/site-packages/serial_asyncio/init.py", line 417, in _call_connection_lost self._serial.close() File "/usr/local/lib/python3.9/site-packages/serial/urlhandler/protocolsocket.py", line 104, in close time.sleep(0.3) File "/usr/src/homeassistant/homeassistant/util/async.py", line 180, in protected_loop_func checkloop(func, strict=strict) File "/usr/src/homeassistant/homeassistant/util/async.py", line 141, in check_loop raise RuntimeError( RuntimeError: Detected blocking call to sleep inside the event loop. Use await hass.async_add_executor_job(); This is causing stability issues. Please report issue `

larry-glz commented 2 years ago

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. have you checked that ser2net is running OK? try doing: sudo systemctl status ser2net.service assuming your running this on a rpi

sprocket-9 commented 2 years ago

I've just tried using this new (to me) style ser2net yaml configuration you supplied and the integration is working fine with it. If your HA is running inside a container, possibly it has no IP route or blocked by firewall when trying to connect to 192.168.10.201:10000.

jeffdoo commented 1 year ago

I realize this issue has been marked as closed but even with the lastest updates installed I still get a "Failed to connect" message.

RaspberryPi with ser2net running on .201 and a RaspberryPi running HomeAssistant on .60 (the rpi build, not custom) ....

I can connect from my desktop and laptop computer to ser2net (putty, .201, raw, port 10003) and issue commands (e.g.; VER) and see the unsolicited messages being returned (radio tuner data). But, when I attempt to connect through the plugin using "socket://192.168.10.201:10003" I receive the error; "Failed to connect".

I understand it is working for you, is there something from a HomeAssistant standpoint that I am missing? I can ping the ser2net node just fine from my RaspberryPi HA node (I do not have any solutions installed to "telnet").

Thanks

sprocket-9 commented 1 year ago

Hi Jeff,

It's got the feeling of a low level network issue rather than a problem with the integration, but a bit more info might help shed some light:

Which Nuvo model do you have? The two compatible models are: Grand Concerto model NV-I8GM Essentia G model NV-E6G

RaspberryPi running HomeAssistant on *.60 (the rpi build, not custom)

https://www.home-assistant.io/installation/ Which installation method covers your install?

I can ping the ser2net node just fine from my RaspberryPi HA node (I do not have any solutions installed to "telnet").

How are you doing the ping, from within HA itself or the bare node OS?

Do you have any other integrations installed which access other devices on your home network ok?

To get a clearer idea I really need to see a full log from Home Assistant with debug logging enabled for nuvo_serial integration - this has the query/response output of the integration talking to the Nuvo.

Try adding this to configuration.yaml and restarting HA:

logger:
  default: info
  logs:
    nuvo_serial: debug

You can try pasting the log in your reply here if it formats ok and is readable, or at https://privatebin.at/ but the file may be too big - either filter the log file with lines containing "nuvo" or use something like dropbox if that's the case.

jeffdoo commented 1 year ago

Hi Jeff,

It's got the feeling of a low level network issue rather than a problem with the integration, but a bit more info might help shed some light:

Which Nuvo model do you have? The two compatible models are: Grand Concerto model NV-I8GM Essentia G model NV-E6G

RaspberryPi running HomeAssistant on *.60 (the rpi build, not custom)

https://www.home-assistant.io/installation/ Which installation method covers your install?

I can ping the ser2net node just fine from my RaspberryPi HA node (I do not have any solutions installed to "telnet").

How are you doing the ping, from within HA itself or the bare node OS?

Do you have any other integrations installed which access other devices on your home network ok?

To get a clearer idea I really need to see a full log from Home Assistant with debug logging enabled for nuvo_serial integration - this has the query/response output of the integration talking to the Nuvo.

Try adding this to configuration.yaml and restarting HA:

logger:
  default: info
  logs:
    nuvo_serial: debug

You can try pasting the log in your reply here if it formats ok and is readable, or at https://privatebin.at/ but the file may be too big - either filter the log file with lines containing "nuvo" or use something like dropbox if that's the case.

Terribly sorry, I never got a notification there was a reply here!!!

I have downloaded the latest version (2.0.1) and it still experiences the same problem. I am also transitioning from the standalone Raspberry Pi to a VM running under TrueNAS Scale. The TrueNAS Scale instance also experiences the same exact problem. I will attempt the above items this weekend and share the logs with you.

jeffdoo commented 1 year ago

Well it would appear that the connection is being made according to the log file but it's encountering an issue when it gets to Zone 7 (which is not being used). I will add that I do have the zone expander connected.

Please let me know what else I can do to assist in debugging this issue. I would absolutely love to work with you in getting Metadata back on the keypads (was easily done years ago), time sync, and paging ... It has been years since our Nuvo system was properly integrated.

ha_nuvo_20230326.txt

sprocket-9 commented 1 year ago

MSGCLASSIFIER: Process received message: b'#ZCFG7,ENABLE1,NAME"Zone 7",SLAVETO0,GROUP0,SOURCES255,XSRC0,IR2,DND0,LOCKED0,SLAVEEQ0\r\n'

The configuration in your Nuvo system is in an invalid state and returning 255 for the SOURCES field on Zone 7, it should be a number between 0-63.

Someone else encountered this problem before and the fix is to use the Windows Nuvo configuration software to load its default configuration file in the system unit, which will reset it.