Samsung TV control in Domoticz

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Samsung TV control in Domoticz

Post 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:
Image

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
Image
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
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Samsung TV control in Domoticz

Post by Derik »

try to use 3 x /
So: script:///
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: Samsung TV control in Domoticz

Post 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.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Samsung TV control in Domoticz

Post 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..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: Samsung TV control in Domoticz

Post 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 ;-)
Image

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.
Image
Image
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
User avatar
perwei
Posts: 16
Joined: Monday 13 February 2017 13:22
Target OS: Linux
Domoticz version: 2020.2
Location: Hønefoss, Norway
Contact:

Re: Samsung TV control in Domoticz

Post 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
Raspberry Pi 3/Raspbian GNU/Linux
Z-Wave.Me Razberry2 Z-Wave controller
3 x Aeotec ZW100 Multisensor 6
1 x Aeotec Smart Dimmer 6
2 x FIBARO System FGWPE Wall Plug
2 x FIBARO Dimmer 2 FGD-212
1 x FIBARO System FGK10x Door Sensor
1 x Popp Wall Controller
User avatar
perwei
Posts: 16
Joined: Monday 13 February 2017 13:22
Target OS: Linux
Domoticz version: 2020.2
Location: Hønefoss, Norway
Contact:

Re: Samsung TV control in Domoticz

Post 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
Raspberry Pi 3/Raspbian GNU/Linux
Z-Wave.Me Razberry2 Z-Wave controller
3 x Aeotec ZW100 Multisensor 6
1 x Aeotec Smart Dimmer 6
2 x FIBARO System FGWPE Wall Plug
2 x FIBARO Dimmer 2 FGD-212
1 x FIBARO System FGK10x Door Sensor
1 x Popp Wall Controller
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: Samsung TV control in Domoticz

Post 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.
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: Samsung TV control in Domoticz

Post by mlamie »

I tested every key command of the iSamsungTV script (key commands are not fully in line :roll: ). I made the following dummy selector switch :D

I'm happy with it.

Image

Image
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: Samsung TV control in Domoticz

Post by jumbotroll »

Hi
I have build iSamsungTV for all synology models using DSM 6.x if you guys want to test :-)
Edit: Packages deleted!
Last edited by jumbotroll on Sunday 19 March 2017 0:53, edited 1 time in total.
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
User avatar
bueno79
Posts: 83
Joined: Wednesday 08 March 2017 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: France
Contact:

Re: Samsung TV control in Domoticz

Post 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 ?
User avatar
bueno79
Posts: 83
Joined: Wednesday 08 March 2017 10:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: France
Contact:

Re: Samsung TV control in Domoticz

Post 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.
Rodio
Posts: 39
Joined: Thursday 16 April 2015 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Samsung TV control in Domoticz

Post 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
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: Samsung TV control in Domoticz

Post 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
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
ptijo
Posts: 4
Joined: Saturday 18 March 2017 11:24
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Samsung TV control in Domoticz

Post 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
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: Samsung TV control in Domoticz

Post 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
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
Rodio
Posts: 39
Joined: Thursday 16 April 2015 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Samsung TV control in Domoticz

Post 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
Rodio
Posts: 39
Joined: Thursday 16 April 2015 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Samsung TV control in Domoticz

Post 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
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Samsung TV control in Domoticz

Post 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
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
clubeddie
Posts: 80
Joined: Saturday 19 March 2016 21:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Samsung TV control in Domoticz

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests