Hi! I wonder how I could check if my Samsung Smart TV is turned on - first I thought the ping plugin could do the job but turns out, the WiFi connection is also active in standby mode. Is there a simple way to achieve that? I’d like to turn on some lamps next to the TV if the TV is switched on and the sun has set…
[solved]Detect if Samsung Smart TV is turned ON?
Weird, my samsung tv turns wifi off when in standby… Try with a ethernet cable?
Also set a static ip address on your tv.
Another option, if you are connected via HDMI is to write a bash script to monitor CEC output. I turn my tv on by CEC.
If you are going to use CEC, this command turns it on:
execute "echo 'on 0' | cec-client -s"
And this for off
execute "echo 'standby 0' | cec-client -s"
Another alternative is to ping your smartphone, and then turn tv on via cec, lights on IF after sunset?
Thanks - I have assigned a static IP but I can’t use an Ethernet cable due to the position of the TV.
Did I understand you correctly that you connected your raspberry pi to you tv to control it somehow? What exactly are you controlling besides turning it on?
You understand it correctly.
However, cec is very limited. So i am using it only to turn my tv on or off.
There are ways to mute, vol up and vol down but i havnt tested it.
There is also a python script floating around to control the tv, maybe you can look into that?
Also try the following. Turn your tv wifi off by menu and see if pimatic can ping it. Should say absent, if not, there is something wrong in your config. Then post that part of the config here.
OK, epic facepalm - shame on me: The IP I used was assigned twice in my network. And to make it worse I changed it to another “random” IP that was ALSO already assigned in my network, Took some time to figure that out!
So now I get the presence, which is great - but how do I create a rule that is triggered the moment the TV is turned on or off? I only found a way to trigger the rule if the status changed but I didn’t figure out how I can select to what state it changes. And with ping it seems I can only check if a device is present but not set something like “is becoming present”?
Create a PinPresence device to ping the IP address en use the following rules:
when TV signals absent foror
when TV signals present
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm