Skip to content

Releases: heatvent/control4_amp

v0.1.10 prefix fix

Choose a tag to compare

@heatvent heatvent released this 27 Jul 20:32
ee2cc1e
Update udp_communication.py

v0.1.09 fix prefix

Choose a tag to compare

@heatvent heatvent released this 27 Jul 20:29
d3194c4

def send_data(self, command):
"""Send data to Control4 Amp."""
# Adjusted sequence initialization and formatting
self.sequence = (self.sequence % 99) + 1 # Wrap around at 99 and start at 01
data = f'0gha{self.sequence:02d} {command}\r\n'
if self.transport:
self.transport.sendto(data.encode(), (self.ip, self.port))
_LOGGER.info("Sent command: %s to %s:%s", data, self.ip, self.port)

v0.1.08 udp communication fix

Choose a tag to compare

@heatvent heatvent released this 27 Jul 20:15
cf3c253

changed:

data = f'0gha{self.sequence:02d} {command}\r\n'

to:

data = f'0g00{self.sequence:02d} {command}\r\n'

v0.1.07 command prefix bugfix

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:55
0501a89

changed
data = f'0g{self.sequence:02d}ha00 {command}\r\n'

to
data = f'0gha{self.sequence:02d} {command}\r\n'

v0.1.06 multiple amps

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:48
37594d8
Update __init__.py

v0.1.05 fix to udp_communication.py

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:40
50dbde3

To resolve this, add the following import statement at the beginning of your udp_communication.py:

python
Copy code
from .const import DOMAIN
This import statement will bring the DOMAIN variable into the scope of udp_communication.py, allowing your handle_response method to use it without encountering a NameError. Ensure that this import is correct and that const.py is in the same directory as udp_communication.py and correctly contains the DOMAIN variable declaration.

v0.1.04: fixes to media_player.py

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:36
415711a

Replace this line:

python
Copy code
udp_comm = UDPCommunication(entry.data["ip_address"], entry.data["port"])
With this:

python
Copy code
udp_comm = UDPCommunication(hass, entry.data["ip_address"], entry.data["port"])
Make sure that the hass object is available in the scope where you're creating the UDPCommunication instance, which it should be since you're inside a Home Assistant setup function. This change should resolve the TypeError and help in creating the devices correctly.

udp_communication.py improvements

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:32
306ce9a

Key Changes:
Initialization with Home Assistant Context: Added Home Assistant's context to manage updates and communicate with the main thread.
Structured Command Handling: Added a method to handle incoming messages and dispatch updates to Home Assistant, using the dispatcher.
Command Sequence Handling: Incorporated a sequence counter to ensure command uniqueness, wrapping at 99 as specified.
Error Handling: Added robust error logging for troubleshooting.
Async Handling: Ensured proper use of asyncio for network communications.

config_flow.py improvements

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:27
7737a27

config_flow.py improvements

Working Version

Choose a tag to compare

@heatvent heatvent released this 27 Jul 19:21
7f342c0

This is a current working version with responses from the amp and devices created.