Hello!
Could you add the package expect to hass.io? It is great for making script that connect to network equipment to enable and disable stuff like firewall policys or switchports. If you do that i don’t have any more reasons to run the not really supported installation on docker and can switch to a nuc image.
Some backgrund info about what i’m using expect for:
Some of the lines in my configuration.yaml-file
switch:
- platform: command_line
switches:
child_internet_status:
command_on: bash -x /config/child-internet-unblock.sh
command_off: bash -x /config/child-internet-block.sh
friendly_name: child Internet Status
device_tracker:
- platform: ping
hosts:
childpc: 192.168.127.60
sensor:
- platform: history_stats
name: Child PC ON today
entity_id: device_tracker.childpc
state: 'home'
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
Then i have a automation that disables my child’s internet access after a certain amount of hours online.
never mind. found pexpect that does the job as good as expect. Took 2 minutes to adapt the expect script to pexpect and it also works without any need to add any new packages with apk