[Bug]: The Adapter Catches Heos-Devices

by ADMIN 40 views

Introduction

This article reports a bug in the adapter, which catches some Heos devices and displays error messages indicating that the connection to the device cannot be cut. The issue has been observed for an extended period, and the adapter is restarted twice a day via cron. In this article, we will delve into the details of the bug, provide relevant log output, and discuss potential solutions.

Contact Details

If you have any questions or would like to report a similar issue, please feel free to contact me at meister.mopper@gmail.com.

What Happened?

For some time now, the adapter has been catching some (not all) Heos devices, resulting in several error messages. The connection to the device cannot be cut, and the adapter displays the following error messages:

  • TypeError: Cannot read properties of null (reading 'socket')

To remedy this issue, I have to stop the adapter and delete the devices with all objects from the object tree. However, the error reappears at irregular intervals.

Adapter Version

The adapter version is 4.0.0.

JS-Controller Version

The JS-Controller version is 7.0.6.

Node JS Version

The Node JS version is 20.19.1.

NPM Version

The NPM version is 10.8.2.

Operating System

The operating system is Debian.

Relevant Log Output

The following log output is relevant to this issue:

chromecast.0	2025-05-09 07:50:59.838	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:59.332	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:54.718	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:54.204	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:49.598	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:49.079	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:44.478	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:43.946	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:39.357	errorHEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:38.812	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')

Anything Else?

Unfortunately, there is no response from the adapter or the Heos devices, making it challenging to diagnose and resolve the issue.

Potential Solutions

Based on the log output and the error messages, it appears that the issue is related to the adapter's inability to disconnect from the Heos devices. To resolve this issue, the following potential solutions can be explored:

  1. Update the adapter version: The current adapter version is 4.0.0. It may be worth updating to the latest version to see if the issue is resolved.
  2. Update the JS-Controller version: The current JS-Controller version is 7.0.6. Updating to the latest version may resolve the issue.
  3. Check the Heos device configuration: It is possible that the Heos device configuration is causing the issue. Checking the device configuration and ensuring that it is set up correctly may resolve the issue.
  4. Reset the adapter: Resetting the adapter may resolve the issue. This can be done by stopping the adapter and deleting the devices with all objects from the object tree.
  5. Contact Heos support: If none of the above solutions work, it may be worth contacting Heos support for further assistance.

Conclusion

Frequently Asked Questions

In this article, we will address some of the frequently asked questions related to the adapter catching Heos devices.

Q: What is the adapter catching Heos devices?

A: The adapter is catching some Heos devices and displaying error messages indicating that the connection to the device cannot be cut.

Q: What are the error messages?

A: The error messages are:

  • TypeError: Cannot read properties of null (reading 'socket')

Q: What is the adapter version?

A: The adapter version is 4.0.0.

Q: What is the JS-Controller version?

A: The JS-Controller version is 7.0.6.

Q: What is the Node JS version?

A: The Node JS version is 20.19.1.

Q: What is the NPM version?

A: The NPM version is 10.8.2.

Q: What is the operating system?

A: The operating system is Debian.

Q: What is the log output?

A: The log output is:

chromecast.0	2025-05-09 07:50:59.838	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:59.332	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:54.718	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:54.204	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:49.598	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:49.079	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:44.478	error	HEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:43.946	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:39.357	errorHEOS Sauna - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')
chromecast.0	2025-05-09 07:50:38.812	error	Marantz CINEMA 60 - Error disconnecting - TypeError: Cannot read properties of null (reading 'socket')

Q: What are the solutions?

A: The potential solutions are:

  1. Update the adapter version: The current adapter version is 4.0.0. It may be worth updating to the latest version to see if the issue is resolved.
  2. Update the JS-Controller version: The current JS-Controller version is 7.0.6. Updating to the latest version may resolve the issue.
  3. Check the Heos device configuration: It is possible that the Heos device configuration is causing the issue. Checking the device configuration and ensuring that it is set up correctly may resolve the issue.
  4. Reset the adapter: Resetting the adapter may resolve the issue. This can be done by stopping the adapter and deleting the devices with all objects from the object tree.
  5. Contact Heos support: If none of the above solutions work, it may be worth contacting Heos support for further assistance.

Q: What is the recommended course of action?

A: The recommended course of action is to try the potential solutions listed above. If none of these solutions work, it may be worth contacting Heos support for further assistance.

Q: What is the estimated time to resolve the issue?

A: The estimated time to resolve the issue is unknown. It may take some time to diagnose and resolve the issue, and it may require multiple attempts to resolve the issue.

Q: What is the expected outcome?

A: The expected outcome is that the adapter will no longer catch Heos devices and display error messages. The connection to the device will be able to be cut, and the adapter will function as expected.