Repository navigation
WIP - sending images (static/animated) to SKY #22
Replies: 4 comments 1 reply
|
@helgek Should that be added to this integration? And if so, what would you suggest on how we integrate that? |
|
@ElectroAttacks it would be nice of course, maybe the LightElf integration could serve as an inspiration which has an svg upload + preview included to project images to lightelf protocol laser projectors. |
|
@helgek I switched my focus currently back to my Desktop application, we could add a lot there, ones I've finished the discovery and API... Technically I'm still searching for co- workers on that, but that's a .Net C# project |
|
@ElectroAttacks Thank you for the update. Unfortunately I'm only a lousy macro and ai programmer, I hope you will find supporters for the project. A desktop application would certainly allow for many more interesting feature than a ha integration. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This script works well for me to test various streaming examples, incl. images (static and animated) + text, also mixed. Next step would be to figure out how this can be maybe integrated also in HA in a useful way. But also without further integration into HA this allows for more interesting scenarios that can e.g. be used inside HA automations, or just as standalone script.
lmsp_send.zip
LaMetric SKY — Pixel streaming via Python (images, GIFs, text)
Stream static images, animated GIFs and text directly to a LaMetric SKY device
from the command line using
lmsp_send.py. No cloud required — communicatesdirectly over your local network using the LaMetric Streaming Protocol (LMSP).
Prerequisites
Python 3.8+ and Pillow:
Files
Download or copy
lmsp_send.pyinto a folder on your computer. The examplecommands below also use these bundled example files:
africa.jpgalarm.giffire.gifPlace all files in the same folder and run commands from that folder.
Your API key
Your device API key is shown in the LaMetric mobile app under
Device → Settings → Wi-Fi → API Key.
The app displays it as a hex-encoded string — pass it exactly as shown,
the script decodes it automatically.
Replace
YOUR_API_KEYand192.168.0.xthroughout with your values.Identifying tile positions
The SKY canvas is a pixel grid.
--region X Y W Htargets a rectangulararea using pixel coordinates — there are no named tiles in the API.
Use this technique to map your physical tiles to canvas coordinates.
Step 1 — Find your canvas size
Run any command. The script prints the canvas dimensions on startup:
Step 2 — Light up a probe block
Send the built-in rainbow demo to a small region and move it around until
you find each tile:
Step 3 — Fine-tune bounds
Once you find the top-left corner of a tile, increase W and H until
the lit area exactly covers it:
Step 4 — Record your tile map
Built-in demos (no image file needed)
Static image — africa.jpg (full canvas)
Animated GIF — alarm.gif (full canvas)
Animated GIF — fire.gif (full canvas)
Text (full canvas)
Single region (image, GIF or text in a sub-region, rest black)
Multiple regions simultaneously
Two animated GIFs side by side:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 alarm.gif ^ --region 25 0 20 22 fire.gif ^ --loops 5Static image + animated GIF:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 africa.jpg ^ --region 25 0 20 22 alarm.gif ^ --loops 5 python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 africa.jpg ^ --region 25 0 20 22 fire.gif ^ --loops 5Image + static text:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 africa.jpg ^ --region 25 0 20 22 "text:HELLO" --duration 30Image + scrolling text:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 africa.jpg ^ --region 25 0 20 22 "scroll:HELLO WORLD" --loops 5GIF + scrolling red text:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 alarm.gif ^ --region 25 0 20 22 "scroll:FIRE ALARM" ^ --text-color 255 0 0 --loops 5 python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 20 22 fire.gif ^ --region 25 0 20 22 "scroll:HOT" ^ --text-color 255 80 0 --loops 0Three regions: image + GIF + scrolling text:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 14 22 africa.jpg ^ --region 15 0 14 22 alarm.gif ^ --region 30 0 15 22 "scroll:ALERT" --loops 5Two GIFs + scrolling text:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 14 22 fire.gif ^ --region 15 0 14 22 alarm.gif ^ --region 30 0 15 22 "scroll:ALARM" ^ --text-color 255 0 0 --loops 0Two scrolling text regions:
python3 lmsp_send.py 192.168.0.x --api-key YOUR_API_KEY ^ --region 0 0 22 22 "scroll:HELLO WORLD" ^ --region 23 0 22 22 "scroll:FIRE ALARM" ^ --text-color 255 0 0 --loops 5HA-assisted mode
If Home Assistant has already started a stream, pass the session ID directly.
Get it from Developer Tools → States →
input_text.sky_session_id:python3 lmsp_send.py 192.168.0.x --session-id YOUR_SESSION_ID africa.jpg --duration 30 python3 lmsp_send.py 192.168.0.x --session-id YOUR_SESSION_ID alarm.gif --loops 5 python3 lmsp_send.py 192.168.0.x --session-id YOUR_SESSION_ID ^ --region 0 0 20 22 africa.jpg ^ --region 25 0 20 22 "scroll:HELLO" --loops 3Quick reference
--api-key KEY--session-id IDdemoanim--text TEXT--scroll--textas a marquee--font-size N--text-color R G B--bg-color R G B--scroll-speed N--scroll-delay-ms N--region X Y W H srcsrc= image path,text:…orscroll:…. Repeatable.--duration SEC--fps N--loops N--width N--height N--udp-port NAll reactions