What you'll need

  1. A Lightpack Ambilight
  2. Prismatik software
  3. A telnet client

Setting up Prismatik

Open up Prismatik and in the profiles tab enable Expert mode, you should now have another option called Experimental to choose from. Click this option and enable Server API via sockets and Listen only on local interface (127.0.0.1), the port should default set to 3636.

Telnet client

You can either use the Microsoft Telnet Client which is packaged with windows or third party software readily available, see PuTTYtel section below. If you wish to use Microsofts Telnet Client, open up a cmd prompt window and type telnet.


Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>

If the above doesn't show, you may not have the telnet client installed but don't worry you can enable it, open up the Programs and Features from Control Panel > All Control Panel Items and click Turn Windows features on or off from the left hand menu. A window should open listing features and a checkbox for each, scroll down to find the Telnet Client option and enable it, click okay and wait for it to install. You should now be able to do the cmd prompt and telnet steps above.

If you'd prefer not to use the Microsoft Telnet Client there are alternatives, one such is a piece of software called PuTTYtel a lightweight free telnet client.

Connecting

The connection steps are marginally different between the Microsoft Telnet Client and PuTTYtel.

Microsoft Telnet Client

Once your at the telnet screen from above, simply type o localhost 3636 and after a few seconds you should be greeted with:


Lightpack API v1.4 (type "help" for more info)

That's it, you're connected.

PuTTYtel

Open PuTTYtel.exe, make sure Connection type: is set to Telnet, at the Host Name (or IP address) box, type in localhost, in the port box, type in 3636 and then click open, after a second you should also be greeted with:


Lightpack API v1.4 (type "help" for more info)

That's it for PuTTYtel as well, you're now connected to your Lightpack over telnet.

What can we do now

All of the available commands I have listed at the bottom of this page, you can also just type help once you're connected to view them. There are two main types of commands available here, GET and SET, GET commands such as getcolors will return with a list of your LEDs and RGB values of the current colour, see below.


getcolors
colors:0-168,128,0;1-168,128,0;2-168,128,0;3-168,128,0;4-168,128,0;5-168,128,0;6
-168,128,0;7-168,128,0;8-168,128,0;9-168,128,0;

If you'd like to start setting colours manually and changing settings you'll need to use the SET commands but first you will have to authorize yourself, head back to Prismatik and open up the experimental tab. You should see an option to generate a key. Click this and you will be given a value which looks something like this {4b50a4c1-d70f-49a9-9280-328b275e8988}, this is your Key and you'll need this to be able to do any SET commands.

Copy your key and return to the telnet window and type setapi:{YOUR_KEY_HERE}, if this has worked correctly an ok should be appear. You can start manually setting your LEDs to colours, an example of this is below.

The majority of SET commands will want you to lock the software first, simply type in lock at the telnet window and unlock to revert it. (See the API commands at the bottom of this page for more information)

Once you've finished playing around and issuing commands, don't forget to "unlock" the Lightpack.


Set colors on several LEDs. Format: "N-R,G,B;", where N - number of led , R, G, B - red, green and blue color components. Works only on locking time (see lock).
         Examples:
                 "setcolor:1-255,255,30;"
                 "setcolor:1-255,255,30;2-12,12,12;3-1,2,3;"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"

That's all for now, sometime in the future I'll show you how to change the LED's/colours to react to events.

API documentation below


Lightpack 5.11.1. API Server 1.4

................................................................................
apikey:
         Command for enter an authorization key (see key in GUI)
         Examples:
                 "apikey:{4b50a4c1-d70f-49a9-9280-328b275e8988}"
                 "apikey:IDDQD"
         Results:
                 "ok"
                 "fail"
................................................................................
lock
         Opens access to set-commands, If success - suspends capture and blockin
g access for other clients to set-commands.
         Results:
                 "lock:success"
                 "lock:busy"
................................................................................
unlock
         Closes access to set-commands. Restores device settings from the curren
t profile, and continues the normal execution of the application.
         Results:
                 "unlock:success"
                 "unlock:not locked"
................................................................................
getstatus
         Get status of the backlight
         Results:
                 "status:on"
                 "status:off"
                 "status:device error"
                 "status:unknown"
................................................................................
getstatusapi
         Get status of the lightpack API
         Results:
                 "statusapi:busy"
                 "statusapi:idle"
................................................................................
getprofile
         Get the name of the current profile
         Results:
                 "profile:SampleProfileName"
................................................................................
getprofiles
         Get names of the all available profiles
         Results:
                 "profiles:Lightpack;New profile 1;New profile 2;"
................................................................................
getcountleds
         Get count leds of the current profile
         Results:
                 "countleds:10"
................................................................................
getleds
         Get curent rect areas. Format: "N-X,Y,W,H;", where N - number of area,
X,Y - position, H,W-size.
         Results:
                 "leds:1-0,0,100,100;2-0,200,100,100;"
................................................................................
getcolors
         Get curent color leds. Format: "N-R,G,B;", where N - number of led, R,
G, B - red, green and blue color components.
         Results:
                 "colors:1-0,120,200;2-0,234,23;"
................................................................................
getfps
         Get FPS grabing
         Results:
                 "fps:25.57"
................................................................................
getscreensize
         Get size screen
         Results:
                 "screensize:0,0,1024,768"
................................................................................
getmode
         Get mode of the current profile
         Results:
                 "mode:ambilight"
                 "mode:moodlamp"
................................................................................
setcolor:
         Set colors on several LEDs. Format: "N-R,G,B;", where N - number of led
, R, G, B - red, green and blue color components. Works only on locking time (se
e lock).
         Examples:
                 "setcolor:1-255,255,30;"
                 "setcolor:1-255,255,30;2-12,12,12;3-1,2,3;"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setleds:
         Set areas on several LEDs. Format: "N-X,Y,W,H;", where N - number of le
d, X,Y - position, H,W-size. Works only on locking time (see lock).
         Examples:
                 "setleds:1-0,0,100,100;"
                 "setleds:1-0,0,100,100;2-0,100,100,100;3-100,0,100,100;"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setgamma:
         Set device gamma correction value [0.01 - 10]. Works only on locking ti
me (see lock).
         Examples:
                 "setgamma:2.5"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setbrightness:
         Set device brightness value [0 - 100]. Works only on locking time (see
lock).
         Examples:
                 "setbrightness:0"
                 "setbrightness:93"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setsmooth:
         Set device smooth value [0 - 255]. Works only on locking time (see lock
).
         Examples:
                 "setsmooth:10"
                 "setsmooth:128"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setprofile:
         Set current profile. Works only on locking time (see lock).
         Examples:
                 "setprofile:Lightpack"
                 "setprofile:16x9"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
newprofile:
         Create new profile. Works only on locking time (see lock).
         Results:
                 "newprofile:16x9"
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
deleteprofile:
         Delete profile. Works only on locking time (see lock).
         Results:
                 "deleteprofile:16x9"
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setstatus:
         Set backlight status. Works only on locking time (see lock).
         Examples:
                 "setstatus:on"
                 "setstatus:off"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
setmode:
         Set backlight mode. Works only on locking time (see lock).
         Examples:
                 "setmode:ambilight"
                 "setmode:moodlamp"
         Results:
                 "ok"
                 "error"
                 "busy"
                 "not locked"
................................................................................
?
         Short version of this help
................................................................................
exit
         Closes connection