[API] SamyGO web API

Here are software that related with Samsung H series TVs.
Please don't create any new topic here unless you have software to post/release.

gogo
SamyGO Project Donor
Posts: 185
Joined: Sat May 17, 2014 9:24 am
Location: Croatia

Re: [API] SamyGO web API

Post by gogo »

I don't understand this step:
CMD_ON:/mnt/scripts/onPowerOn.sh CMD_OFF:/mnt/scripts/onPowerOff.sh

Where can I download those scripts? :?
Samsung TV: UE46F6500
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: [API] SamyGO web API

Post by mad_ady »

The onPowerOn.sh/onPowerOff.sh scripts (among other functionality) should set a flag by creating a file called

Code: Select all

/dtv/tvIsSleeping

:

onPowerOn.sh: rm -f /dtv/tvIsSleeping
onPowerOff.sh: touch /dtv/tvIsSleeping

If you don't use libSoftPowerOff, the TV powers off and the web API is no longer accessible.
You should just create them, like this (minimum; you can run your own code in them as needed):
/mnt/scripts/onPowerOn.sh:

Code: Select all

#!/bin/sh
rm -f /dtv/tvIsSleeping
/mnt/scripts/onPowerOff.sh:

Code: Select all

#!/bin/sh
touch /dtv/tvIsSleeping
Make sure both scripts are executable:

Code: Select all

chmod a+x /mnt/scripts/onPower*.sh
H6400, firmware 2602.2 downgraded to 2130
WarLLe
SamyGO Project Donor
Posts: 10
Joined: Sat Oct 31, 2015 2:01 pm

Re: [API] SamyGO web API

Post by WarLLe »

Would it be possible to provide support for "libAlert"?
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: [API] SamyGO web API

Post by mad_ady »

Do you mean showing an alert on-screen injected via the API? Sure. Can you show me an example alert via the command line?
H6400, firmware 2602.2 downgraded to 2130
WarLLe
SamyGO Project Donor
Posts: 10
Joined: Sat Oct 31, 2015 2:01 pm

Re: [API] SamyGO web API

Post by WarLLe »

Yea exactly.

It's the App from here viewtopic.php?f=63&t=9099 .

And the command is something like:

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAlert.so BLINKS:3 DELAY:200 MSGBOX:"Blah!"
There are some arguments you can check them in the Topic.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: [API] SamyGO web API

Post by mad_ady »

I've added support for libRunWidget (viewtopic.php?f=63&t=9306) and updated the first post with examples. Sadly, it crashes my H6400 when I try to run a widget (even via the command line), but give it a try on other systems:

Code: Select all

[root@tv rwcommon]# /mnt/opt/privateer/usr/bin/samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libRunWidget.so ID:111299001922
samyGOso v1.2.5 (c) bugficks 2013-2014, sectroyer 2014-2015
Injecting '/mnt/opt/privateer/usr/libso/libRunWidget.so' resident: '0'
mprotect: 0x4227c020
dlopen: 0x424a0d80
dlclose: 0x424a0e14
dlsymaddr: 0x424a0e78
pc=42324eec lr=42324ed0 sp=be2a7de0 fp=302af40
r0=302af44 r1=80
r2=1 r3=0
stack: 0xbe288000-0xbe2a8000 length = 131072
executing injection code at 0xbe2a7c88
library injection completed!
Succeeded.
[root@tv rwcommon]# 
I will add libAlert next.
H6400, firmware 2602.2 downgraded to 2130
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [API] SamyGO web API

Post by zoelechat »

Inject -A, not -T :)
I do NOT receive any PM. Please use forum.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: [API] SamyGO web API

Post by mad_ady »

You're right zoelechat, now it works without crashing. Thanks.
I also added libAlert support and updated the first post.
Enjoy!
H6400, firmware 2602.2 downgraded to 2130
WarLLe
SamyGO Project Donor
Posts: 10
Joined: Sat Oct 31, 2015 2:01 pm

Re: [API] SamyGO web API

Post by WarLLe »

mad_ady wrote: Tue Jun 05, 2018 10:09 am You're right zoelechat, now it works without crashing. Thanks.
I also added libAlert support and updated the first post.
Enjoy!
Thanks for that fast delivery of the feature request.
I am in developement for an FHEM Module for your API.
Who is interested in that can find it here:
https://forum.fhem.de/index.php/topic,88116.0.html

I got not all features at the moment cause it's still dev build.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: [API] SamyGO web API

Post by mad_ady »

Nice. Good luck with it!
Try not to have many simultaneous calls to the API because it will either fail, or risk crashing the TV. This is because to extract data I have to inject some libraries into a running process and if there are many injections it can fail. There is a locking mechanism inside the API, but I haven't tested it extensively.
H6400, firmware 2602.2 downgraded to 2130

Post Reply

Return to “[H] Software”