When I send the API to control the TVChannel of simulator TV ( created by vEdge Creator 2.5), The channel does not change.
Here is the request and response of changing tvChannel API.
Hi, @Do_Thanh
As I understand the driver “vEdge Creator 2.5” allows you to create virtual devices. But, are you trying to control an actual TV?
If so, have you created a Routine to specify the behavior in the “real” TV device when the channel of the virtual TV changes?
By default those devices don’t work together, that needs to be specified in an Automation (Routine, Rule, etc.)
The logs show the driver seeming successfully creating an event but with the value "nil" instead of the actual command argument (as you have seen) and then an error appears from the dispatcher quoting a hex string (e.g. something like 0x1bd1123 - that is NOT an actual example) as being invalid for the tvChannel.tvChannel attribute.
@TAustin might perhaps have encountered this before.
aah, that’s right, I didn’t see the nil value (thanks, @orangebucket!). So, in this case, the error must be in the capability event handler. You can check if it’s throwing an error (and see other info) by enabling the driver’s logs.
To do so, you need to set up the SmartThings CLI and use this command:
Where you need to replace x.x.x.x with the actual Hub’s IP address. Which you can find in the IDE or your router’s configuration page.
The CLI will ask you to select a driver of the list to see only its logs, but you can also use the flag --all
I got the log error while using CLI command to log the error " [string “st/capabilities/init.lua”]:226: Value table: 0x9f9178 is invalid for tvchannel.tvchannel" .
Before I control the channel through API, the channel value = 1 is valid. After That when I changed the channel by using API the value = 1 is invalid.
As far as I know, the tvChannel capability is broken. You’ll notice it has no ability to automate, and my.smartthings.com does not have any way to control it.
The only thing I could get working in the virtual device was to get an event when the +/- buttons are pressed and then use that to increment or decrement a separate custom field for the channel number.