In doing to messing around with this, it looks like if you press the Web Socket Open button first, commands start to work.
@moshsom This is great! Are the numbers the "Push #" found here? HubitatActive/SamsungTvRemote/Docs/Commands.pdf at master ยท DaveGut/HubitatActive ยท GitHub
@djgutheinz
Hi Dave - FYI: the release notes link on your Github page for this driver is not working. It goes to a page with a message "404 not found."
In response to my own post #740, and a similar issue in post #779 by @SoundersDude, and #790 by @pg70 I've messed around enough to discover a few things..
Regarding the preferences section of this driver, on these instructions:
@djgutheinz posted next to the description for TVStartupDisplay: "When turned on via this driver, the startup display to initiate. Only works if the device is turned on via the Hubitat Device instance." However, like @SoundersDude, if I set this preference to ArtMode, and turn the TV on via the Samsung remote control, about 30 second after the TV is turned on, the TV switches to ArtMode. That is not well received in my house, so I set this preference back to "none."
That leaves the problem of how to trigger the TV turning on and going into Art Mode from this app, because like @pg70 the ArtMode button does not work.
I noticed the following in Current States/State Variables.
-
artModeStatus almost always = on, even if Art Mode is not on. Also, artModeWs almost always = true, even if Art Mode is not on, and configured = true. When Art Mode is turned on via the Samsung remote, and then the TV is changed to regular TV via the Samsung remote, the artModeStatus remains on, no matter what, even through turning on and off the TV via the Samsung Remote.
-
At all times when Switch = off, wsStatus = closed; that seems expected.
-
At MOST times when Switch = on, wsStatus = closed; wsStatus seems to be = open for a few seconds when the TV is first turned on or off.
-
If wsStatus = closed, the Art Mode button does not work to change the TV to Art Mode
-
If artModeStatus = on, even if the TV is not actually in ArtMode, the HE Art Mode button does not work to change the TV to Art Mode, and the log shows: "artMode: [artModeStatus:on, artModeWs:true, status:artMode already set]"
-
Clicking the configure button when the tv is not really in ArtMode but artModeStatus = on, changes ArtModeStatus = off AND changes wsStatus = open. At that point the HE Art mode button will work.
HOWEVER, not sure how to get Hubitat to click Configure because the commands at this list:
don't have a button to push for Configure.
Almost any button in the device driver changes wsStatus = open, and it stays that way for a few seconds. But only Configure corrects the ArtMode status (and also makes wsStatus = open).
So, does anyone know how to cause HE to press "Configure" in an automation?
Even if there were a button number for "Configure" I could get that working.
Or, I could use rules similar to ones @moshsom uses in post 789 above, if there were a way to navigate to ArtMode with the onscreen controls, but on my 2021 Frame model, the only way to get to ArtMode is via the power button on the remote. Pressing the onscreen "Art" icon to the left of the "Home Icon" only gives me options to set up what particular art displays; no option to actually display that art.
ETA: I'm using a 2021 Frame TV, HE C7 with newest firmware, most updated version of this driver, but I do not use SmartThings or even have a SmartThings account. Also, my TV is connected locally via ethernet, but it is blocked from accessing the internet at the router.
If by button, you mean the pushable button command, you can ADD a button for configure manually to the driver. Then add tihs button to a dashboard using the button template.
Go to line 341 and add the following:
- case 27: configure(); break
using Rule Machine, I set up (in several minutes) such a rule on one of my Kasa switches. See screenshot below. Key is the type of action on the development page is "Set Variable, Mode or File, Run Custom Action" on the Create New Action page. From there, pretty standard.
THANK YOU!!!
THANK YOU. This is REALLY helpful.
So to break it down even more for others who might be as befuddled by this as I was, in Rule Machine, I have a rule that, upon a certain trigger, turns on the TV. Then I have a Wait for event elapsed time 5 seconds rule to allow the TV to actually turn on.
To get the automation to then press Configure, I added a new action, as follows:
- Per @djgutheinz above, you select the "Set Variable...." option
- Select "Run Custom Action"
- At "Select capability of action device" you select "Button"
- Select your TV device from the dropdown of "Select Button devices to act on"
- At "Select custom command" you will see a drop down of what seems to be all the buttons on the Samsung TV device page!!!!! I selected "Configure"
- It also has a "Parameter Type" which I left blank.
The above enabled me to have an Action in a RM rule just like @djgutheinz posted above!!
I entered a 1 second delay as the next action, then "Push Button 6" (Art Mode button) as the final action.
IT WORKS PERFECT!!!
This is awesome. Could you post a screenshot of your rule?
Sure -
You need to add a trigger, then this is the balance of the RM rule. You get these per my instructions above.
Thank you! Just updated my rule to look like this, won't be able to test it out for a few days though.
I'm using delays on the actions themselves. Not sure if that is different or not from setting up discrete delays/waits like you have.
@djgutheinz Thanks! I was wondering if there is any way to incorporate more of the SmartThings app Frame TV features? Specifically the button to rotate (vertical mount) and the brightness slider for the Art Mode.
Technically feasible; however, I do not have the personal bandwidth right now. Maybe in the fall.
It will take a cooperative development with a user with the art mode tv since I do not have an art-mode TV.
One solution would be to do what @moshsom did above in post 789
- you write a rule to mimic the button presses that get you to that menu item..
- and write a rule that gets you to the button slider
@djgutheinz Wonderful! All efforts are greatly appreciated once you're available. I have two Frame TVs, and I can provide any testing you may need.
@calinatl Thanks. Yes, this is what I am doing for the moment. In the bigger picture, I currently have Meural Digital Frames that I have tied to a lux sensor for automatic dialed in adjustments to keep them looking a much like a photo/art as possible. I'm hoping to eventually be able to do something similar with my Frame TVs, making this brightness adjustment as discretely as possible when the TVs are in Art mode. The automatic adjustment settings on both of these devices tend to run too bright for my environment. I recently found that this brightness adjustment is available in the SmartThings app with no on-screen indicators, which would suit my use case perfectly.
I am trying to select my input source to HDMI 4 which is xfiniti. I have tried the selection of input source and HDMI. Not sure if I am putting the parameters incorrectly or something else. Suggestions?
I'm sure I'm probably missing something silly but I have the driver installed, I have a 2019 Q60R. The Virtual Device has been created and updated the IP address for the TV I am testing with but I can't seem to get app to do anything. It does see the TV is on and reads some data from it, when I use the scan for codes it populated 45 buttons, but when I press most of the buttons I get the Code 1005 is reserved error, if I press the app buttons like Prime Video or Hulu I get an error saying not found in appData, but the apps most certainly are installed on the TV. I've never received the prompt from the TV asking to allow the app to work but some of the message details tells me it should be working.
Hey Dave, when the user selects the off from the driver commands the state of the switch attribute does not change from on to off. Is this by design?
@garyjmilne - on mine it sometimes takes 30-60 seconds for the on/off state to update, but it is very reliable in updating within 60 seconds. If you watch yours does it update within about 60 seconds?
It does but it's flaky in this respect.
Using the driver interface.
I turn the TV on and the attribute says on right away.
I turn the TV off and the attribute says off right away and then a few seconds later the attribute changes back to on. It remains that way for another 60 seconds later it changes back to off.
But really my main issue is that because the switch state is flaky I can't do a reliable toggle from an app I'm building.
When I use the TV on/off state as a trigger, I use to need to add another option to RM for it staying off. For example, trigger is TV state = off and remains off for >60 seconds, then do x,y,z. I had similar issues as you are reporting - see above posts #404 & #427 and the developers responses.
However, I believe this was because the TV was connected via wifi, and it would somehow lose the wifi signal, and when there is no connection (NC), the TV reports the switch as off. I had a static IP and everything. So I did a project to bring a wired ethernet connection to the TV and upgraded my router. I'm not sure which one helped, but the combo solved ALOT of my issues. As you can see from post 672, it would report as NC then within a fraction of a second report itself back on again...see also my post 677 and the developers reply on 678 & 686. Part of this is a Samsung issue and has nothing to do with this integration.
Thanks for the detailed response. I'm the author of the Tasmota drivers so I know a little bit about LAN communication. There are two ways to write it.
-
When user presses ON for example send the command to the device and wait for the response from the device and use that response to change the device state. Most accurate but slowest.
-
When the user presses ON, change the device state immediately and send the command to the device. If the response does not come back or contradicts the the setting then change it back. Most responsive but may be temporarily.
Both can be wrong for short periods of time but for LAN communication which is generally very reliable solution #2 makes more sense IMO.