I am running nuts on this… but step by step:
I am running a Logitechmediaserver to serve music to all rooms of my house. However, the LMS somtimes hangs and with an automation I want LMS to be restarted without user interaction.
Therefore I created a PING sensor, but if the service for LMS stopps running, the PING is still ok. So I tried to grab the HTTP code (200 is OK everything else should trigger a service restart).
The sensor is always "on" also if I shut of the LMS service manually it will not switch to "off".I also tried to replace payload_off: "000" with payload_off: "" but there is no change detected.
Does anyone know what I am doing wrong?
I also just used a sensor with the following setup (in my sensor.yaml):
Long shot: what you’re getting is 200 sent to stderr, because you’re redirected the actual document to /dev/null; but you need the code sent to stdout. Try:
Failed to connect to host. curl managed to get an IP address to the machine and it tried to setup a TCP connection to the host but failed. This can be because you have specified the wrong port number, entered the wrong host name, the wrong protocol or perhaps because there is a firewall or another network equipment in between that blocks the traffic from getting through.
I get that I can sucessfully retrieve a 200 and an error if the service is down (because no http code is actually delivered or can’t be read or whatever, correct?). But why is the entity not updating, at leat to not available or sinmilar?!