sermayoral
(Sergio Mayoral Martínez)
July 29, 2020, 12:15pm
1
Hi everyone. I have an strange behaviour turning on Kodi with Google Assistant.
I have defined these two shell commands:
shell_command:
kodi_on: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa pi@private_ip '/usr/bin/kodi &'
kodi_off: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa pi@private_ip '/usr/bin/killall -9 kodi.bin_v8'
The problem is that turning on Kodi via Google Home, Google says that there is a problem turning on Kodi, but Kodi starts without problem.
Turning off Kodi works perfectly.
I suppose the problem is ‘kodi’ command to start Kodi doesn’t finish, and the killall command to turn off kodi finalize, so Google undestand everything has gone well.
Do you know if there is a better way to start Kodi, or if there is other better way to do this?
Thanks
tom_l
July 29, 2020, 12:22pm
2
sermayoral
(Sergio Mayoral Martínez)
July 29, 2020, 12:25pm
3
@tom_l it does not work because Kodi is installed in the same server as Home Assistant, The server is always on, but Kodi is not always on.
poudenes
(Poudenes)
July 29, 2020, 12:33pm
4
You can add your Kodi via intergration:
Keep your kodi active. Then you also can use the mediaplayer info “play” “pause” and “idle” in some automations if you want.
sermayoral
(Sergio Mayoral Martínez)
July 29, 2020, 12:36pm
5
@poudenes I have got it, define in this way:
- platform: kodi
name: Kodi Living Room
host: !secret home_internal_ip
turn_on_action:
- service: shell_command.kodi_on
turn_off_action:
- service: shell_command.kodi_off
But the problem remains. As I said, it works, but Google don’t think so…
poudenes
(Poudenes)
July 29, 2020, 12:41pm
6
if you want close the application total then yes you need this.
I’ll keep kodi alive always.
sermayoral
(Sergio Mayoral Martínez)
July 31, 2020, 9:24am
7
Does not anyone know how to execute a prompted shell command with succeed?