Open buddyfavors opened 7 years ago
Hello!
I have a similar situation here with my TV, but, when using volume or mute command, I've got an exception thrown. Smarthub and some other commands are working. But the most important thing for me would be status report from the TV. Is it possible to get status of mute, volume level, channel etc? I would like to use it in my home automation, but if I don't know if the TV has been muted, there is no use of muting it when my phone rings, for example.
Best regards, Davor
Actually I found out that the SmartView2 DLLs and basically everything in the Drivers folder came from the official Windows app by Samsung http://www.samsung.com/uk/support/smartview. I did a diff on the DLLs and did noticed there must have been a newer version, after updating everything compiled fine, but still no luck with the volume commands, even though it works in their official app. I'll keep digging into it.
I got it working on my TV. I monitored the requests with Fiddler and noticed the Samsung app uses SOAP to control the volume. Looks like it just calls plug in play actions, here is the spec: http://upnp.org/specs/av/UPnP-av-RenderingControl-v1-Service.pdf
@davorf So to answer your question it does look like there is a GetVolume method, not sure about channel status though.
I am looking into the issue with volume up/down and mute. Stay tuned.
Regarding the library files, yes these are unmodified directly form the Samsung smartview app. Thes e libraries were wrapped in c# from a lower level language. I think c++. The code is obfuscated and impossible to decompile. So we cannot get down to the protocol level to figure out how things are done. So we just utilize the drivers as is which is what I did with this app. I decompiled the SmartView app itself to figure out how to interact with these drivers.
@davorf and @buddyfavors Can you provide the exception detail you receive. It will help me to determine the root cause quickly.
Thanks.
@timelery I actually don't receive any exceptions, but he did say he got one.
Hello @timelery
I will provide exception details tonight, when I get home. I was wondering if the library returns any result regarding status of mute, channel etc? Mute status would be especially useful.
Best regards, Davor
Hello @timelery
Here is an exception I'm getting when I try to use Mute command:
C:\SamsungRemote>SmartTVRemoteControl.exe -c Mute
Discovery started...
Model 2014 Samsung TV found.
UPnP connection extablished with TV - uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DeviceConnected added TV: http://192.168.xx.xx:40972/
InitSPCContext stdout
pPWd : xxxx
CleintHello's Hash Value same
InitTargetDevice - started...
InitTargetDevice - Created Tv device.
Create MultiScreenController
InitTargetDevice - Set current device.
InitTargetDevice - Initialize Tv device.
[ERROR]Catch exception when initialize TV.
InitTargetDevice is complete
Previously paired TV found.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at SmartTVRemoteControl.Program.<goToRemoteControl>d__28.MoveNext() in C:\Users\Tim\Documents\SV-RemoteControl\SmartTVRemoteControl\SmartTVRemoteControl\Program.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.<>c__DisplayClassa.<Post>b__9()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Nito.AsyncEx.AsyncContext.Execute()
at Nito.AsyncEx.AsyncContext.Run(Action action)
at SmartTVRemoteControl.Program.Main(String[] args) in C:\Users\Tim\Documents\SV-RemoteControl\SmartTVRemoteControl\SmartTVRemoteControl\Program.cs:line 57
I've just masked some (in my opinion) sensitive information with x's. If you need any of these, I can send it to you via e-mail.
Do you have any information on the question from my previous post (regarding status of mute etc)?
Best regards, Davor
Hello!
Any news regarding the issue, or the question about status response?
Best regards, Davor
I noticed Volume Up/Down/Mute don't work for my TV.
I haven't tested every key but Menu, SmartHub, Power works fine.
I can't seem to find the repo for SmartView2, are you keeping that closed source? Was going to see why those keys don't work for me, no exceptions are being thrown.