When I change the picture mode on my TV from “Standard” to “Dynamic” or “Movie,” the API returns the following:
samsungvd.pictureMode:
pictureMode:
value: Standard
The “pictureMode” value in the response is not up to date.
However, when opening the SmartThings app, I see the currently set picture mode in the app and immediately afterward, without changing the picture mode again via app, the API also returns the correct picture mode. So, only by using the app the API is triggered to update the value. And no, it’s not a timing issue - even if I wait for a long time, the value doesn’t update; it only updates after using the app.
It appears that only the pictureMode is affected, as other values seem to be updated.
Would be great if this could be passed on to the developers for investigation.
Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.
The described behavior should be pretty easy to reproduce regardless of the specific device:
Query the “pictureMode” data field via the SmartThings API
Use the TV remote to change the “pictureMode” directly on the TV
Query the “pictureMode” field again via the API
I’m not a developer, I just want to be able to query the TV’s status with Home Assistant. In the Home Assistant integration I am using, a refresh command is now sent before querying data:
This now makes the pictureMode query work and I can no longer reproduce the problem at this time. On the one hand, this shows that my TV is providing the data correctly, which is why I can rule out any device-specific error. Additionally, other data can also be retrieved without any issues. On the other hand, the cause of the problem must therefore most likely be sought within the SmartThings API.
In principle, you already have half the solution now: when data is retrieved via API, it should always be up to date. Retrieving historical data would be a completely different and presumably much less significant use case. Accordingly, you would need to implement what the refresh command does internally within the API for every data retrieval, so that this is no longer explicitly necessary for API users.
Like you mentioned, most of the reported TV status won’t update unless you issue a “refresh” command, wait a second or two, and then read it. Unfortunately, that’s always been the case.