retropie_status:
name: Kodi Status
icon: mdi:raspberrypi
added this in groups as:
- input_boolean.retropie_status
But i get it always off also if kodi is running.
Where am i wrong and how to get it working?
And how to create a switch with these configs to power on and power off the kodi on raspberry?
what happens when you ping your Kodi box manually from a shell terminal?
Note that your Raspberry Pi is going to respond to a ping request even if Kodi is not running, so not sure this is actually what you want. Have you looked at the Kodi component?
Yes, you’re right. So what to do if i want to check if raspberry where is kodi installed is running or not? I need to know this for automating some things…
ah this is different, you can use the ping sensor to know if your RPi is up or not, but that won’t give you any info on Kodi itself
what happens if you try to ping your RPi from a shell terminal on the machine where your HA is installed
If it answers than HA should also get that info.
The other thing is that you ping your RPI quite frequently (every 2 sec), I would try and reduce this as your RPi is going to be busy responding all the time.
If it works then you can try and increase the ping requests
then it should also work in HA. If not check your logs to see if anything obvious shows up?
By the way you may need to give it some time, it take about 5 min to update for me
Ok, thanks… and how you handle this? I mean how you turn off or turn on. I am asked this because i have the same configs as yours but cannot understand how to automate many options about kodi like reboot or suspend or shutdown… I’d like to have an input_boolean with kodi so with it control some automations. I read all the docs in the kodi components, but still don’t understand where they go (in which part of configuration). How to create switches or scripts with all the kodi command available for HASS?
My bad. You can’t actually send the message/command to suspend etc, you need to setup your Kodi in HA such as when you turn it off, it performs one action of your choice
See Turn off Kodi with API calls section in the Kodi docs
Then once you’ve chosen your action, simply send the command to turn it off:
So if i understand right all those commands in kodi section goes to the media_palyer section into configuration.yaml? May i put more than one of them or only one? And then i will have other services to use into automations?