Hi Kenny, Thank you for the pre-release update. I have managed to get it mostly working with a lot of trial and error. The commands are now sent correctly with the raw= config for sending HEX commands. I have two issues still, it wont accept the config with the variables, so each line has IP:Port hard coded (not the end of the world). The next issue is very odd, IP control (no sleep/low power mode) is enabled on the AVR but I’ve found for some reason it stops accepting commands and only works when I have a connection to the AVR web GUI open on my laptop (specifically on the AVR Setup page), oddly as soon as I close the page or navigate to another one the remote stops working too. Is there a way to send it a magic wake on LAN packet or similar to see if that will wake it before it tries to send the power_on command?
Can you post the logs when you’re using variables?
You can use the Wake on LAN entity to wake up the receiver. But I assume this is some kind of power saving feature thats prevents the device from receiving commands when it’s in standby. Look for a setting like network standby or similar that needs to be turned on. Otherweise you should contact Arcam how to change this behaviour. The document I linked a few posts above also contains a setup section but I assume this is already enabled as network control in general works for you.
Below is an extract from the logs when trying to use variables for the IP:Port as specified in your earlier post:
2025-09-25 19:09:55.448005 +00:00 core NOTICE Ok(DriverSetupChange { event_type: Setup, state: WaitUserAction, error: None, require_user_action: Some(Input(SettingsPage { title: {“de”: “Eigene Entitäten-Konfiguration”, “en”: “Custom Entity Configuration”}, settings: [Setting { id: “custom-entities-settings”, label: {“en”: “Custom entities configuration”, “de”: “Eigene Entitäten-Konfiguration”}, field: Label(Label { value: {“en”: “Create your own remote entities with pre-defined commands. More details can be found in the readme file. If you add new commands or features to an existing entity you need to remove and re-add the entity from the configured entity list afterwards.”, “de”: “Erstelle deine eigenen Remote Entitäten mit vor-definierten Befehlen. Mehr Details findest du in der Readme-Datei. Wenn du neue Befehle oder Feature zu einer bestehenden Entitäten-Konfiguration hinzufügst, musst du die Entität anschließend aus der konfigurierten Entitäten-Liste entfernen und neu hinzufügen.”} }) }, Setting { id: “custom_entities”, label: {“de”: “Ersetzte diese Konfiguration mit deiner Eigenen”, “en”: “Replace this configuration with your own”}, field: Textarea(Textarea { value: Some(“_vars:\n arcam_ip: 10.1.0.151\n arcam_port: 50000\nArcam-AVR30-IP:\n Simple Commands:\n POWER_ON:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x7B 0x0D\n POWER_OFF:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x7C 0x0D\n VOLUME_UP:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x10 0x0D\n VOLUME_DOWN:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x11 0x0D\n Features: {}\n”) }) }] })) })
2025-09-25 19:09:55.445319 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 56928)] ->: {‘kind’: ‘event’, ‘msg’: <WsMsgEvents.DRIVER_SETUP_CHANGE: ‘driver_setup_change’>, ‘msg_data’: {‘event_type’: ‘SETUP’, ‘state’: ‘WAIT_USER_ACTION’, ‘require_user_action’: {‘input’: {‘title’: {‘en’: ‘Custom Entity Configuration’, ‘de’: ‘Eigene Entitäten-Konfiguration’}, ‘settings’: [{‘id’: ‘custom-entities-settings’, ‘label’: {‘en’: ‘Custom entities configuration’, ‘de’: ‘Eigene Entitäten-Konfiguration’}, ‘field’: {‘label’: {‘value’: {‘en’: ‘Create your own remote entities with pre-defined commands. More details can be found in the readme file. If you add new commands or features to an existing entity you need to remove and re-add the entity from the configured entity list afterwards.’, ‘de’: ‘Erstelle deine eigenen Remote Entitäten mit vor-definierten Befehlen. Mehr Details findest du in der Readme-Datei. Wenn du neue Befehle oder Feature zu einer bestehenden Entitäten-Konfiguration hinzufügst, musst du die Entität anschließend aus der konfigurierten Entitäten-Liste entfernen und neu hinzufügen.’}}}}, {‘id’: ‘custom_entities’, ‘label’: {‘en’: ‘Replace this configuration with your own’, ‘de’: ‘Ersetzte diese Konfiguration mit deiner Eigenen’}, ‘field’: {‘textarea’: {‘value’: ‘_vars:\n arcam_ip: 10.1.0.151\n arcam_port: 50000\nArcam-AVR30-IP:\n Simple Commands:\n POWER_ON:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x7B 0x0D\n POWER_OFF:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x7C 0x0D\n VOLUME_UP:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x10 0x0D\n VOLUME_DOWN:\n Type: tcp-text\n Parameter:\n address: ${arcam_ip}:${arcam_port}\n text: raw=0x21 0x01 0x08 0x02 0x10 0x11 0x0D\n Features: {}\n’}}}]}}}, ‘cat’: <EventCategory.DEVICE: ‘DEVICE’>}
2025-09-25 19:09:55.441433 +00:00 core NOTICE Ok(DriverSetupChange { event_type: Setup, state: Setup, error: None, require_user_action: None })
2025-09-25 19:09:55.439826 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 56928)] ->: {‘kind’: ‘event’, ‘msg’: <WsMsgEvents.DRIVER_SETUP_CHANGE: ‘driver_setup_change’>, ‘msg_data’: {‘event_type’: ‘SETUP’, ‘state’: ‘SETUP’}, ‘cat’: <EventCategory.DEVICE: ‘DEVICE’>}
2025-09-25 19:09:55.438028 +00:00 custom-intg-requests INFO config DEBUG setup_step not found in __storers because it should not be stored in the config file
2025-09-25 19:09:55.437213 +00:00 custom-intg-requests INFO config DEBUG Saved setup_step: handle_custom into config runtime storage
2025-09-25 19:09:55.435122 +00:00 custom-intg-requests INFO config DEBUG setup_step not found in __storers because it should not be stored in the config file
2025-09-25 19:09:55.435122 +00:00 custom-intg-requests INFO config DEBUG Saved setup_step: custom into config runtime storage
2025-09-25 19:09:55.433465 +00:00 custom-intg-requests INFO config DEBUG setup_reconfigure not found in __storers because it should not be stored in the config file
2025-09-25 19:09:55.433465 +00:00 custom-intg-requests INFO config DEBUG Saved setup_reconfigure: True into config runtime storage
2025-09-25 19:09:55.432095 +00:00 core NOTICE Removed standby inhibitor: Integration setup: requests
2025-09-25 19:09:55.430015 +00:00 custom-intg-requests INFO setup INFO Starting reconfiguration
Once this error is recieved:
”Oops!
Something went wrong while setting up the integration.
OTHER”
I have to uninstall and reinstall the integration to allow me to submit the configuration without the variables and save it sucessfully.
Please extend the log lines as your log doesn’t include any errors. You can use a site like pastebin.com to upload longer logs.
And I think I can already see why it’s failing. You didn’t include any Features and only use Simple Commands for Power On and Off. You should use feature insead as this will also update the state of the entity.
Hi, I’ve taken a larger log extract please let me know if its captured the required errors:
Harmon support, said the AVR is configured correctly and to contact the remote vendor, I’ve gone back to them stating that the remote is working as expected, its the AVR that’s not accepting the commands. As an alternative, it appears to support RS232 any idea how to send the HEX commands over the RS232 output instead of via IP (which is the preferred option), its just I don’t feel like I’m going to get very far with Harmon support.
As an aside I tried using your integration with the GET method to pull the setup page to see if that would trigger whatever behaviour its expecting for IP commands, however it didn’t function that way, I think it maybe needs a persistent connection to that page. Is there a way to trick it into this with your integration?
As I wrote in my previous post you’re missing the features section of the entity configuration. That’s essential. Please look at my example and add you additional simple commands.
Otherwise first try it without the configuration and use the Text over tcp entity with the input source command like: 10.1.0.151:50000,“raw=0x21 0x01 0x08 0x02 0x10 0x7B 0x0D”
RS232/serial support is not yet possible with the Dock. It will be added in a future firmware update.
Apologies it appeared to pickup my previous configuration, so I’ve reinstalled the integration and copy pasted your example above with a clean installation this time.
Updated log output: log extract 2 - Pastebin.com
Thanks for the update about RS232 noted.
I could reproduce this error with or without variables or adding quotes to the text. I need to further investigate this issue.
Does it work when you’re using the text over tcp entity?
UPDATED:
I’ve had bit of a break through, I’ve managed to get the remote commands to function mostly. I took another network packet capture and I noticed that the AVR was now responding to the remote commands, during early troubleshooting I’d been disabling the wait for a text over tcp response message option. Once this was enabled the commands are being accepted by the AVR.
I have one remaining issue left, I’ve added the feature for ‘on’ and ‘off’ code however when added to a sequence the remote gives an “internal server error” on this step however the AVR powers on but activity hangs there, also it works to manually power on/off the AVR if I go to the remote entity rather than the activity sequence.
sequence error - Pastebin.com – NEW Logs from using the ‘On’ feature in a sequence
One more small update, the power off sequence is fine, its just power on that has issues.
Please try this new pre-release: Release v0.8.5 - Pre-release · kennymc-c/ucr2-integration-requests · GitHub
I fixed a bug with integer variables wich caused both of your errors.
Thank you, the IP and Port variables are now working perfectly. Only one thing holding this back from fully working, is the remote still throws an “Internal Server Error” during the power on sequence with the first step (power on the AVR). It turns the AVR on but the remote errors and stops processing the rest of the power on sequence so no further devices are powered on and the activity is stuck.
It appears that the code is expecting a HTTP 100/200/300 however its returning a 408 (timeout) unsure why as the AVR successfully powers on. It only returns a 408 during the power on sequence, during normal operation i.e. using the remote to control the AVR outside of the power on activity sequence it works fine. Is there a way to code it to continue even with a 408 during an activity start sequence. The power off sequence works fine. Also just for reference I’m using the on/off feature not a simple command to do this as recommended previously.
Code from logs for reference:
2025-09-28 16:23:49.798494 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 47436)] ->: {‘kind’: ‘resp’, ‘req_id’: 6, ‘code’: 408, ‘msg’: ‘result’, ‘msg_data’: {}}
2025-09-28 16:23:49.797127 +00:00 custom-intg-requests INFO remote INFO Command on for entity id remote-custom-arcam-avr30-ip failed. State will not be updated
2025-09-28 16:23:49.795796 +00:00 custom-intg-requests INFO commands WARNING Timeout while waiting for a response message from the server
Did you try to increase the timeout in the integration? If an AVR is powered on it has to do a lot and it might take a few seconds.
I tried increasing it all the way up to 30 seconds, each gave a “TimeOut” error still unfortunately.
And you get the timeout after you waited for that configured timeout or directly after you triggered the command? Does it work if you turn off the wait for response setting? Do the other commands work with this? Can you post the log for a successfull command?
Once I trigger the Activity (Watch TV - power on), it appears to wait for sometime before that timeout message is displayed. If I turn off the wait for response setting, then no commands are processed by the AVR at all, so it needs to be on it appears for it to function. All other commands are working, it’s just the Power On when part of an Activity Sequence, the AVR doesn’t seem to send a response in time however it does turn on. I will capture the logs for a working command and upload the log.
Can you also try the power on commands outside of a sequence? There is a hard coded timeout of 30 seconds for a sequence. Maybe it takes longer and the sequence timeout happens before this.
And I guess you have doubled checked that the raw command for power on is correct? Does the power on command alone work with wait for reponse disabled? My guess is that this command doesn’t send any response while others do.
I made a mistake, it doesn’t work outside of a sequence either. I added a power on/off buttons to the remote and the Power off works as expected however the power on gave the same internal error as it does in a sequence, which makes more sense. However the AVR does power on, this error comes up after around 4 seconds.
Extract from Log for “Power on” once pressed on remote:
2025-10-04 12:02:20.804899 +00:00 ui WARN uc.ui.entity.controller: Cannot execute command: “requests.main.remote-custom-arcam-avr30-ip” “remote.on” 500 “Internal server error, please try later”
2025-10-04 12:02:20.797458 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 43754)] ->: {‘kind’: ‘resp’, ‘req_id’: 78, ‘code’: 408, ‘msg’: ‘result’, ‘msg_data’: {}}
2025-10-04 12:02:20.796716 +00:00 custom-intg-requests INFO remote INFO Command on for entity id remote-custom-arcam-avr30-ip failed. State will not be updated
2025-10-04 12:02:20.795470 +00:00 custom-intg-requests INFO commands WARNING Timeout while waiting for a response message from the server
2025-10-04 12:02:18.647020 +00:00 custom-intg-requests INFO config DEBUG Get variables from _vars block in custom entities yaml configuration
2025-10-04 12:02:18.479371 +00:00 custom-intg-requests INFO remote INFO Received on command for remote-custom-arcam-avr30-ip
2025-10-04 12:02:18.477802 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 43754)] <-: {“kind”:“req”,“id”:78,“msg”:“entity_command”,“msg_data”:{“cmd_id”:“on”,“entity_id”:“remote-custom-arcam-avr30-ip”,“entity_type”:“remote”}}
Extract from log for Working “Power off” command:
2025-10-04 11:53:47.885076 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 43754)] =>: {‘kind’: ‘event’, ‘msg’: <WsMsgEvents.ENTITY_CHANGE: ‘entity_change’>, ‘msg_data’: {‘entity_id’: ‘remote-custom-arcam-avr30-ip’, ‘entity_type’: <EntityTypes.REMOTE: ‘remote’>, ‘attributes’: {<Attributes.STATE: ‘state’>: <States.OFF: ‘OFF’>}}, ‘cat’: <EventCategory.ENTITY: ‘ENTITY’>}
2025-10-04 11:53:47.883306 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 43754)] ->: {‘kind’: ‘resp’, ‘req_id’: 65, ‘code’: 200, ‘msg’: ‘result’, ‘msg_data’: {}}
2025-10-04 11:53:47.882582 +00:00 custom-intg-requests INFO remote INFO Updated remote entity status attribute to {<Attributes.STATE: ‘state’>: <States.OFF: ‘OFF’>} for remote-custom-arcam-avr30-ip
2025-10-04 11:53:47.882338 +00:00 custom-intg-requests INFO ucapi.entities DEBUG [configured]: entity ‘remote-custom-arcam-avr30-ip’ attributes updated
2025-10-04 11:53:47.881841 +00:00 custom-intg-requests INFO
2025-10-04 11:53:47.881841 +00:00 custom-intg-requests INFO
2025-10-04 11:53:47.881841 +00:00 custom-intg-requests INFO commands INFO Received data: !
2025-10-04 11:53:47.881514 +00:00 custom-intg-requests INFO commands INFO Sent raw text ‘raw=0x21 0x01 0x08 0x02 0x10 0x7C 0x0D’ over TCP to 10.1.0.151:50000
2025-10-04 11:53:47.248731 +00:00 custom-intg-requests INFO config DEBUG Get variables from _vars block in custom entities yaml configuration
2025-10-04 11:53:47.100356 +00:00 custom-intg-requests INFO remote INFO Received off command for remote-custom-arcam-avr30-ip
2025-10-04 11:53:47.100356 +00:00 custom-intg-requests INFO ucapi.api DEBUG [(‘127.0.0.1’, 43754)] <-: {“kind”:“req”,“id”:65,“msg”:“entity_command”,“msg_data”:{“cmd_id”:“off”,“entity_id”:“remote-custom-arcam-avr30-ip”,“entity_type”:“remote”}}
If the error appears after 4 seconds and the receiver actually turns on it’s probably the time it takes to receive the response. Try to extend the timeout from 4 to 30 seconds. You can also try to trigger another command shortly after powering on the receiver and see if this fails too. As soon as the commands are not failing anymore you have the minimum timeout.
Great news, I had tested changing the timeout value in prior versions before v0.8.5 and it didn’t resolve the issue, however increasing it from 2 seconds to 5 seconds in this version has fixed the issue. Thank you so much for your time and support. I will continue to test it out over the next few days to check it’s all working reliably etc.
It appears that 6 seconds is the most reliable timeout value and is working great, however this has created a new issue. When I press buttons like the “surround mode” switching button, it will appear on the tv screen and displays the surround mode menu, however it won’t accept multiple button presses to cycle the modes anymore due to the delay. I tested this and the maximum delay that buttons requiring multiple presses to cycle or switch functions reliably is 3 seconds, 4 seconds sort of works but less reliably, however 5 seconds or longer and they no longer respond to multiple presses be this slow or fast inputs on the remote control. Any suggestions, as I only really need this longer delay for the power on during the start sequence?