hey guys,
I have a shell command that should be sending commands received from my various scripts though unfortunately I cant seem to figure out why they wont actually pass through. Been trying to use sockets to pass these commands through.
I can SSH from my PC and run commands just fine, though cant get it to go from HA.
Basically this is the setup; Button> Script > Shell command > Script > Telnet commands > Audio processor
config.yaml:
shell_command:
dsp_telnet: 'echo "{{ command }}" | /usr/bin/nc 127.0.0.1 65432'
one of the scripts as a guide for how i have them setup:
zone1_source1:
alias: Zone 1 Source 1
sequence:
- action: shell_command.dsp_telnet
data:
command: "SourceSelector1 set sourceSelection 1"
- action: input_select.select_option
data:
option: Source 1
target:
entity_id: input_select.zone1
I get this in my logs from when the script starts:
[2024-11-27 00:12:10] Creating new Telnet connection...
[2024-11-27 00:12:10] Command listener running on 0.0.0.0:65432
[2024-11-27 00:12:13] Telnet connection established.
Heres my button yaml incase:
type: vertical-stack
cards:
- type: custom:bubble-card
card_type: pop-up
hash: "#source1"
name: Source 1
show_header: false
- type: custom:bubble-card
card_type: separator
name: Source 1
icon: mdi:bluetooth-audio
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.zone1_source1
show_state: false
name: Zone 1
button_action:
tap_action:
action: call-service
target: {}
service: script.zone1_source1
double_tap_action:
action: none
hold_action:
action: none
tap_action:
action: none
double_tap_action:
action: none
hold_action:
action: none
I for the life of me cant figure this out, if anyone has any guidance id be forever in your debt.