Page 1 of 3
Samsung TV control in Domoticz
Posted: Saturday 11 February 2017 11:36
by mlamie
I have seen that it is possible to created some switches in Domoticz with multiple buttons like in this topic.
viewtopic.php?t=10177
Like:
TV
Off, Nexus, PS3, etc...
Volume:
Slider
I tried to achieve the same in combination with the Samsung script
https://github.com/Tristan79/iSamsungTV
I installed the iSamsungTV script as follows:
I know how to create a dummy switch, but i'm not able to see more text buttons...
I would like to create a switch which can send multiple commands like?
iSamsungTV F 192.168.1.106 -KEY KEY_HDMI1
iSamsungTV F 192.168.1.106 -KEY KEY_HDMI2
iSamsungTV F 192.168.1.106 -KEY KEY_HDMI3
etc..
Or use a volume slider if that is even possible with the commands?
iSamsungTV F 192.168.1.106 -KEY KEY_VOLDOWN
iSamsungTV F 192.168.1.106 -KEY KEY_VOLUP
P.s maybe someone can also help me with the below issue:
Putty (works) with: iSamsungTV F 192.168.1.106 -KEY KEY_MUTE
Domoticz (doesnt work) with:
script://iSamsungTV F 192.168.1.106 -KEY KEY_MUTE
or
script://usr/local/bin/iSamsungTV F 192.168.1.106 -KEY KEY_MUTE
As soon the outcome is clear I will update the Samsung TV wiki page as well. So it will help others as well.
https://www.domoticz.com/wiki/Samsung_TV
Re: Samsung TV control in Domoticz
Posted: Saturday 11 February 2017 11:39
by Derik
try to use 3 x /
So: script:///
Re: Samsung TV control in Domoticz
Posted: Saturday 11 February 2017 11:59
by mlamie
Ha, that did the trick and I did found the right command:
Code: Select all
script:///usr/local/bin/iSamsungTV F 192.168.1.106 -KEY KEY_MUTE
Now some explanation how to create a dummy switch with more buttons as shown in the other topic.
Re: Samsung TV control in Domoticz
Posted: Saturday 11 February 2017 13:28
by Derik
make some new hardware
Dummy with a name you like
Then create a new device in the devices area
use for new device the dummy hardware you make.
Put the script in the on and off section
That's all..
Re: Samsung TV control in Domoticz
Posted: Saturday 11 February 2017 14:52
by mlamie
I have a simple dummy device like a switch (on/off command), what I would like to know is how you create a switches like the below example
This sreenshot is from nayr, not my system
I would like to create a switch which can send multiple commands like?
iSamsungTV F 192.168.1.106 -KEY KEY_HDMI1
iSamsungTV F 192.168.1.106 -KEY KEY_HDMI2
iSamsungTV F 192.168.1.106 -KEY KEY_HDMI3
etc..
Or use a volume slider if that is even possible with the commands?
iSamsungTV F 192.168.1.106 -KEY KEY_VOLDOWN
iSamsungTV F 192.168.1.106 -KEY KEY_VOLUP
Probably some scripting is needed to perform a slider...
P.s. if I add the Panasonic TV hardware is see the following interface, which would be nice if that could be added to Domoticz and works in combination with a Samsung TV.
Re: Samsung TV control in Domoticz
Posted: Monday 20 February 2017 15:35
by perwei
Just a comment regarding newer Samsung TVs like model K. Seems iSamsungTV isn't working on those models.
On the other hand, Wake-on-LAN does work and brings the TV from sleeping and un-pingable to live and pingable.
Cheers,
Per
Re: Samsung TV control in Domoticz
Posted: Monday 20 February 2017 16:01
by perwei
There is a wakeonlan command avaliable for Raspbian. Written in Perl.
Code: Select all
sudo apt install wakeonlan
wakeonlan -i 10.0.0.255 e4:7d:bd::96::8e:cd
where 10.0.0.255 is broadcast address for my local LAN where the Samsung TV is located and e4:7d:bd::96::8e:cd is MAC address for my Samsung TV.
Cheers
Per
Re: Samsung TV control in Domoticz
Posted: Monday 20 February 2017 21:31
by mlamie
perwei wrote:There is a wakeonlan command avaliable for Raspbian. Written in Perl.
Code: Select all
sudo apt install wakeonlan
wakeonlan -i 10.0.0.255 e4:7d:bd::96::8e:cd
where 10.0.0.255 is broadcast address for my local LAN where the Samsung TV is located and e4:7d:bd::96::8e:cd is MAC address for my Samsung TV.
Cheers
Per
I tried to use the WOL on my Samsung F series, but it didn't work. I probably will take a look at the CEC option.
Re: Samsung TV control in Domoticz
Posted: Monday 20 February 2017 21:35
by mlamie
I tested every key command of the iSamsungTV script (key commands are not fully in line
). I made the following dummy selector switch
I'm happy with it.
Re: Samsung TV control in Domoticz
Posted: Monday 20 February 2017 23:12
by jumbotroll
Hi
I have build iSamsungTV for all synology models using DSM 6.x if you guys want to test
Edit: Packages deleted!
Re: Samsung TV control in Domoticz
Posted: Wednesday 15 March 2017 2:44
by bueno79
Hi,
just grab the pack for synology ds214Play. it is a D model for the TV. so i have
Code: Select all
script:///usr/local/iSamsungTV/bin/iSamsungTV D 192.168.10.71 -KEY KEY_POWERON
In log I have this :
Error: Error executing script command (/usr/local/iSamsungTV/bin/iSamsungTV). returned: 32256
If I try this in SSH :
Code: Select all
/usr/local/iSamsungTV/bin/iSamsungTV D 192.168.10.71 -KEY KEY_POWERON
I have this error :
-sh: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file: Exec format error
Can you help me ?
Re: Samsung TV control in Domoticz
Posted: Wednesday 15 March 2017 11:45
by bueno79
ok I've compile the module. So it should work now. if some one need this module for DS214play, send me a message.
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 0:11
by Rodio
Hi,
on my 213+ same error as bueno79.
On the prompt:
root@HA:~# /usr/local/iSamsungTV/bin/iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
-ash: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file: Exec format error.
Regards
edit: DSM 6.1-15047 Update 1
Domoticz V3.6749
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 8:56
by jumbotroll
Rodio wrote:Hi,
on my 213+ same error as bueno79.
On the prompt:
root@HA:~# /usr/local/iSamsungTV/bin/iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
-ash: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file: Exec format error.
Regards
edit: DSM 6.1-15047 Update 1
Domoticz V3.6749
Did you try with sudo ?
/usr/local/iSamsungTV/bin/ sudo iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 11:32
by ptijo
Hi,
I have the Same probleme :
DS212+ : DSM 6.0.2-8451 Update 7
V3 .6944
script:///usr/local/iSamsungTV/bin/iSamsungTV C xxx.xxx.xxx.xxx -KEY KEY_MUTE
/usr/local/iSamsungTV/bin/iSamsungTV). returned: 32256
thanks
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 12:51
by jumbotroll
ptijo wrote:Hi,
I have the Same probleme :
DS212+ : DSM 6.0.2-8451 Update 7
V3 .6944
script:///usr/local/iSamsungTV/bin/iSamsungTV C xxx.xxx.xxx.xxx -KEY KEY_MUTE
/usr/local/iSamsungTV/bin/iSamsungTV). returned: 32256
thanks
Try with ./ if you are in the /usr/local/iSamsungTV/bin/ folder.
Like this: NAS:/usr/local/iSamsungTV/bin$ ./iSamsungTV C 192.168.0.xxx -KEY KEY_MUTE
or
from root:
@DS212+:/$ /usr/local/iSamsungTV/bin/iSamsungTV C 192.168.0.xxx -KEY KEY_MUTE
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 18:20
by Rodio
jumbotroll wrote:
Did you try with sudo ?
/usr/local/iSamsungTV/bin/ sudo iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
root@HA:~# /usr/local/iSamsungTV/bin/sudo iSamsungTV E 192.168.1.36 -KEY KEY_POWEROF
-ash: /usr/local/iSamsungTV/bin/sudo: No such file or directory
Same problem
And I checked, its the right path
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 18:30
by Rodio
If I use the syntax without the sudo I get this:
root@HA:~# /usr/local/iSamsungTV/bin/iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
-ash: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file: Exec format error
So if was thinking, is the model (E) the right one? I've got a UE32ES6710
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 19:09
by tontze
Rodio wrote:If I use the syntax without the sudo I get this:
root@HA:~# /usr/local/iSamsungTV/bin/iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
-ash: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file: Exec format error
So if was thinking, is the model (E) the right one? I've got a UE32ES6710
Correct sudo usage :
Code: Select all
sudo /usr/local/iSamsungTV/bin/iSamsungTV E 192.168.1.36 -KEY KEY_POWEROFF
Re: Samsung TV control in Domoticz
Posted: Saturday 18 March 2017 20:39
by clubeddie
Same issue here.
I have a Samsung UE32D6500, installed Jadahls package on a Synology DS213j.
When i start the script in domoticz
Code: Select all
script:///usr/local/iSamsungTV/bin/iSamsungTV D 192.168.2.19 -KEY KEY_POWEROFF
I get:
Error: Error executing script command (/usr/local/iSamsungTV/bin/iSamsungTV). returned: 32256
Tried it in a Terminal, get:
@DiskStation:~$ sudo /usr/local/iSamsungTV/bin/iSamsungTV D 192.168.2.19 -KEY KEY_POWEROFF
/usr/local/iSamsungTV/bin/iSamsungTV: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file
or:
@DiskStation:~$ /usr/local/iSamsungTV/bin/iSamsungTV D 192.168.2.19 -KEY KEY_MUTE/usr/local/iSamsungTV/bin/iSamsungTV D 192.168.2.19 -KEY KEY_MUTE
-sh: /usr/local/iSamsungTV/bin/iSamsungTV: cannot execute binary file: Exec format error
or:
@DiskStation:/usr/local/iSamsungTV/bin$ ./iSamsungTV D 192.168.2.19 -KEY KEY_POWEROFF
-sh: ./iSamsungTV: cannot execute binary file: Exec format error