Skip to content

ipeacocks/lametric-sonos-indicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lametric Sonos Indicator

 

This indicator shows current song which Sonos plays on Lametric Clock. Script should be launched externally on some 3rd system (maybe like Raspberry Pi) in your local network. Unfortunately official Lametric application is buggy and doesn't work correct at least for me.

Requirements

This panel is written on next libraries:

Traditional Installation

Clone code:

$ git clone git@github.com:ipeacocks/lametric-sonos-indicator.git

Simply create virtualenv:

$ cd lametric-sonos-indicator
$ python3 -m venv venv

Activate virtual env:

$ source venv/bin/activate

That's almost it. Use requirments.txt to setup all python dependencies:

$ pip install -r requirements.txt

Get and create env variables LAMETRIC_IP and LAMETRIC_API_KEY:

$ export LAMETRIC_API_KEY="e56b92_lametric_long_api_string_c2a0c4"
$ export LAMETRIC_IP="192.168.1.25"
$ export DELAY=30

DELAY is a time in seconds how often to send notification to Lametric Time.

And then lauch:

$ python3 main.py

Docker

Also it's possible to launch this indicator in docker, but you need to build this image by yourself:

# cd lametric-sonos-indicator # this clonned repository
# docker build -t lametric-sonos .

# docker run \
  -d \
  --name lametric-sonos \
  --net host \
  --env LAMETRIC_IP="192.168.1.25" \
  --env LAMETRIC_API_KEY="e56b92_lametric_long_api_string_c2a0c4" \
  --env DELAY=60 \
  --restart unless-stopped \
  lametric-sonos

That's it. Hope it would be useful for you.

Links:
https://lametric-documentation.readthedocs.io/en/latest/index.html
https://blog.aruehe.io/tag/lametric/
http://docs.python-soco.com/en/latest/

About

Current song indicator on Lametric Clock

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published