WTH isn’t UDP comms integrated in HA?

what i always do to test those commands to know what error 1 means for instance, i enter the homeassistant container itself, and then fire the command manually, then you can see the error

Well it’s what I wanted to since first day working on these but unhappy it looks like it’s no more possible to access the HA container itself for security reasons :frowning: All threads found around were too old about it !
So far I have found a way to get it working, it’s not nice and most efficient but it works…

hmm? you can still access it? jut use this command

docker exec -it homeassistant /bin/bash

i have found my old dimmer.py script btw, dont use it anymore :slight_smile:

import socket
import codecs
import binascii
import sys

host = ''
port = 1001
message = "ED43310000000000000000000000AFAF45" + sys.argv[1] + sys.argv[2]
string = binascii.a2b_hex (message)
mySocket = socket.socket()
1 Like

Not working in Terminal addon of Hassio, states that docker can’t be found :frowning:

Thanks a lot for the share :wink: although I’m unable to get it working on my side (error 1 always in logs…)

zektor_vol: python3 /config/python_scripts/volume_analog_zektor.py {{(states('input_number.volume_tr') | int)}}

If I test it in debugger I get well the proper result but not when running the shell_command from an automation for example :frowning:

maybe the name is different, it works with terminal ssh addon, i use it al the time

do a “docker ps” command to see the names of all running containers

on Hassio ? as on mine the system doesn’t even have the docker command in it :frowning: Hassos 8.1 here core 2022.5.5 :confused:

i run the same :slight_smile:

no specific options for the Terminal/ssh addon ? I don’t have same prompt as you and for sure on mine docker command is not avalaible :frowning:
I use that addon just to be sure it’s well the same:

i use this addon, maybe its because of the “protection mode” i disabled :slight_smile:

i also see in readme :

* Has the option to access the Docker instance running on the host system.

I don’t have a solution to your problem but I did want to note that command line notify is basically the same as shell command except it doesn’t have the weird restrictions on piping and you can pass arguments to your command.

Or well you can pass an argument. Whatever you put in message in the service call is provided to your command as stdin. If I need multiple arguments I just use a delimiter and split it into variables first. Which isn’t great but still way better then shell command. I don’t think I use shell command at all anymore, command line notify is just better.

1 Like