tavicu / homebridge-samsung-tizen

Homebridge plugin for Samsung TV's with Tizen OS
MIT License
639 stars 86 forks source link

SmartThings Art Mode #493

Closed fillmoreracer closed 2 years ago

fillmoreracer commented 2 years ago

We chatted awhile back about creating an automation that would send a Frame TV into art mode if powered off. Since SmartThings has an "art mode" button, would this now be possible with your SmartThings integration?

tavicu commented 2 years ago

From what I can see in the SmartThings API there is no information regarding this. Probably SmartThings uses the same API that my plugin does.

An ideea, but don't know how good it is or if it's working. To create a shortcut that waits 30 seconds or something and after that set the TV to power in Art Mode. Then set an automation that when the TV goes off to call this shortcut.

tavicu commented 2 years ago

I have checked the code and it should be doable.

Make a shortcut that waits 30 seconds then it toggles the Art Mode Switch. Then make an automation that calls the shortcut when the Power Switch turns off.

Turning on the Art Mode switch first will check if the TV is powered off, if it is, first it will turn it on then switch to art mode.

But here you may have another problem, turning the TV on while being on HDMI may actually turn on your Apple TV and switch to HDMI. Check it and see the results :)

fillmoreracer commented 2 years ago

I completed all of your steps and it seemed to work, but randomly while watching something on the Apple TV, a power off command is detected by your power switch in homekit, which triggers the automation to perform the shortcut. Which behaves exactly as it did before (in my previous issue request dialog).

fillmoreracer commented 2 years ago

@jplusrco seems to have this exact same issue. The plug-in receives a power off command from "somewhere" and activates the automation and shortcut. We need to figure out why and how the plug-in is receiving this command.

tavicu commented 2 years ago

I suspect your TV is responding slower. Try to set timeout to 1000 or 1500

tavicu commented 2 years ago

https://github.com/tavicu/homebridge-samsung-tizen/issues/474#issuecomment-1046979538

fillmoreracer commented 2 years ago

I've tweaked some settings and am currently testing this configuration:

• In the Homebridge plug-in settings page, set the Frame TV advanced configuration to:

☑️ for Display and control Real Power with Main Accessory (for Frame TV's)

Uncheck both options below that (disable art switch and disable power switch).

I have the automation set as follows, When Frame TV Power turns off (the toggle switch for frame tv power), then do shortcut "art mode", which is a 3 second wait time and then turns on the Frame TV Art Mode switch. So far, the automation has not been triggered by a false power off signal. 🤞

fillmoreracer commented 2 years ago

This configuration works flawlessly! @jplusrco, I recommend this setup as it allows the use of just the Apple TV remote (either the new one with the power button or the older model via sleep command). Thanks Octavian, consider this issue closed.

fillmoreracer commented 2 years ago

I spoke too soon, the automation triggered without any input again. I tried changing the timeout, problem still happens at 1000, automation won't even trigger at 1500. Any ideas?

tavicu commented 2 years ago

Ok, let's start from the beginning so i could understand better. Since i don't have a frame tv anymore i will need more info because it's impossible for me to test this scenario!

Let's turn off Homebridge and all automations, like we don't even have them.

Now we only have a Frame TV and an Apple TV connected with HDMI. I know that on the Frame TV there is a setting where you could choose what to do when you press the Turn off from the remote. You can choose between going to art mode and turning the power off! Having this setting set to go to art mode and having the HDMI-CEC enabled, when you turn off your Apple TV it will send a signal to the Frame to turn off. And the TV will actually power off instead of going to art mode like it should and like you selected the option.

Now, what you would like to do with home automation is to find a workaround that after all this happens to turn the tv back on and set it on art mode!

It's that correct?

After that we will go further with questions depending on your answer.

And thank you for the donation! I really appreciate it!

fillmoreracer commented 2 years ago

You are most welcome for the donation, and thank you for your support with this.

My frame tv is a 2020 model and does not have a feature (as far as I know) to set power off to art mode vs. blank screen. I've reset it multiple times and this setting has never come up. My Apple TV 4K is a brand new 2021 model, and has the Siri remote with the power button. The power button sends an HDMI CEC command to turn the tv off, and skips Art Mode. On the Samsung remote, the power button is the art mode button. You click it once to send the TV to art mode, or hold it down to power off.

This is where my "fix" needs to be implemented. Unless there's a way to do it without your plug-in (perhaps the setting you're talking about, which I can't find), I'm not sure how else to accomplish my goal.

tavicu commented 2 years ago

Ok. So we know Samsung have a problem over here and unfortunately we can't fix it because none of us works at Samsung :) I have searched over google and also found a lot of people complaining about this. Some of them said they got an update for the newer models that fixed the issue, but only the newer models (if you ask me 2020 it's still new and should receive updates, if you ask Samsung ... eh).

Also i have found a lot of issues reporting that the TV will go to Art Mode random while using Apple TV. Do you also have this problem (again, only using the TV + Apple TV, no automations, no homebridge)? Some of them reported fixed after they disabled the setting for motion sensor. There is a sensor and if it doesn't detect movement for a time it will automatically switch to Art Mode.

Depending if you have or not the second problem i will probably ask you to make some changes to the code if you are comfortable with this!

fillmoreracer commented 2 years ago

I am not having the problem you're talking about with the motion sensor. I have always had the motion sensor setting turned off.

This morning I spoke with the Apple TV & TVos software engineering support team. I was able to figure out that the 2020 model Samsung Frame TV's and 2021 models are handling HDMI CEC commands differently. It is a Samsung firmware issue. The 2021 models are able to enter art mode via an HDMI CEC command, the 2020 models are not able to, at least not yet.

As far as the Samsung SmartThings integration is concerned, I would think that your plug-in could incorporate the SmartThings' app's ability to enter Art Mode via an in-app button press. Do you know if the SmartThings api has any Art Mode support?

tavicu commented 2 years ago

I cannot find anything regarding art mode on the smartthings api. But there is a way to see if it's supporting. If we make a call to the smartthing status api we will get what features can be changed and what requests it's supporting. But since i cannot find anything i suspect they are using the same API as my plugin does.

Anyway, if you are willing to try I could make a file that send the request and you will have to run it. Let me know if you want.

But, knowing that your TV goes OFF and having two switches added for frames (the power switch and the art mode switch), could you tell me what was the problem with the automation? Because from what i'm seeing setting an automation that triggers when the Power switch goes off and and then turn Art Mode switch on should work.

fillmoreracer commented 2 years ago

I have two switches and one other tile that appears like a tv screen, all for my frame tv. The tile that looks like a tv appears to mimic what the power switch displays. See the attached screenshot. I've tried the automation with both the screen tile and the power switch as the trigger for the automation and they behave exactly the same.

The problem I'm encountering with the automation is random power off triggers sending the frame tv into art mode while streaming anything using any Apple TV app. I've tried entering a timeout in my config (1000, 1300, and 1500), and they do delay the switches from activating but the problem persists. I'm willing to try anything. image

tavicu commented 2 years ago

I have two switches and one other tile that appears like a tv screen, all for my frame tv. The tile that looks like a tv appears to mimic what the power switch displays. See the attached screenshot. I've tried the automation with both the screen tile and the power switch as the trigger for the automation and they behave exactly the same.

Here you can read how the switches works: https://github.com/tavicu/homebridge-samsung-tizen/issues/318#issuecomment-817323066

The problem I'm encountering with the automation is random power off triggers sending the frame tv into art mode while streaming anything using any Apple TV app. I've tried entering a timeout in my config (1000, 1300, and 1500), and they do delay the switches from activating but the problem persists. I'm willing to try anything.

You could try and see how many ms/seconds does it take for your TV to respond to requests. That way we will be able to have an ideea of what is happening.

https://github.com/tavicu/homebridge-samsung-tizen/issues/324#issuecomment-804746398

fillmoreracer commented 2 years ago

I'd like to go a different direction with this. In my SmartThings app there is a power button (see attached screenshots) that controls art mode. Is it possible to use the coding for this button to integrate an art mode button or switch in your plug-in?image image

tavicu commented 2 years ago

I'd like to go a different direction with this. In my SmartThings app there is a power button (see attached screenshots) that controls art mode. Is it possible to use the coding for this button to integrate an art mode button or switch in your plug-in?!

By default the plugin creates two switches for Frame TVs. One to control the power and one for Art Mode. https://github.com/tavicu/homebridge-samsung-tizen/issues/318#issuecomment-817323066