Giter Club home page Giter Club logo

lametric-sonos-indicator's Introduction

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 [email protected]: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/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.