Logitech Media Server

Sure, multiroom sound systems are a great addition to your home. The ability to play the same music or podcast in every room is a great feature. Take a look at the big names, ebay and thrift stores are littered with the ghosts of unsupported first gen systems from the big players. They are expensive investments and often fall foul of being abandoned by the manufacturer after they are no longer able to make any money on them.

Enter Logitech Media Server and options for playing the streams in software or hardware (squeezebox) Its been around forever, has a ton of open source community support. Logitech have discontinued there cloud based service, however this can still be used to stream local music, tunein, bandcamp and more.

Once you have downloaded and installed LMS from the link above, confirm the necessary ports have been allowed through your server firewall if required.

TCP 3483 squeezebox stream
TCP 9000 Server web interface
TCP 9090 CLI e.g Squeezer

Open a web browser window and enter the address of your LMS e.g http://10.0.0.2:9000

(If using windows you can find this in the information tab of LMS)

You should see a page similar to the following in your browser:

Main parts of the interface

Player: This is the output device that will actually play the audio. It is a drop down list and if nothing is present, you dont have any audio players connected and won’t be able to play anything.

Volume: The volume level of the currently selected player.

Transport: The Play, Pause, Next Track, Prev Track, Loop, Etc… Transport controls of the currently selected player

Source: The source audio that you wish to play, can be local MP3, Internet radio or other souces depending on plugins installed

Settings: (bottom right) Allows you to add and remove plugins, scan for local music and various other house keeping tasks.

Squeezebox players

You will need a player to output the audio stream from the Logitech Music Server. I have listed a few we have had direct experience with, there are many others.

A dedicated squeezebox player from somewhere like ebay or facebook marketplace, search for squeezebox

Squeezelite-X available from the microsoft store.

PiCorePlayer for the raspberry pi , Tested with Pi Zero and Model 3 , both work fine.

Squeezelite-esp32 for the esp32. We build these players and have a few for sale.

SB Player by angry goat for Android and chromebooks in the playstore (small one time fee)

Controllers

You will need some way of controlling the playback, volume and audio source of a player. This can be achived in a multiple of ways. A couple are mentioned here.

via LMS webpage on port 9000 (in our example that would be http://10.0.0.2:9000)

Android google play search for app named squeezer.

Squeezer Configuration page on an Android device

Proxmox notes

This section contains notes for installing LMS on proxmox, may be outdated or incorrect

Create a new LXC container on Proxmox, left all as defaults apart from unsetting the ‘unprivileged container’ checkbox.

Get things up to date

apt update
apt upgrade

Install required dependencies

apt install perl libssl-dev

Download the package

Downloaded latest stable Squeezebox server image from https://lms-community.github.io/lms-server-repository/

or

wget http://downloads.slimdevices.com/LogitechMediaServer_v8.5.0/logitechmediaserver_8.5.0_amd64.deb

Install the package

dpkg -i logitechmediaserver_8.5.0_amd64.deb

(at this point ran into error as I’d missed the perl installation, so installed perl and ran apt --fix-broken install as prompted, the installation was then complete)

make sure to ceate directory for playlists and make writeable for example

mkdir /var/lib/squeezeboxserver/playlists

cd /var/lib/squeezeboxserver/playlists

chown squeezeboxserver playlists

chgrp nogroup playlists

update settings in logitech media server

Control From Home Assistant

    #--------------------------------------------------------------------
    #  Start playing playlist named classical on squeezebox with 
    #  IP address 10.0.0.39
    #-------------------------------------------------------------------- 
   
    - id: 'TurnOnRadioStation1'
      alias: TurnOnRadioStation_1
      trigger:
      
      - platform: event
        event_type: "MY_CUSTOM_EVENT"
 
      condition: []
      action:

      - service: rest_command.lms_command
        data:
           p0: "playlist"
           p1: "play"
           p2: "classical"
           player: "10.0.0.39"

A better way to automate a light switch in HA

Using a delay is ok for a quick and dirty method to time how long a light switch should stay on when triggered by a motion sensor. It does not take into account retriggers or flexible enough to incorporate multiple sensors or trigger methods. Here is an example of a more flexible implementation.

Standard way with delay

#  
#--------------------------------------------------------------------
#  Turn on front door light if motion detected on external 
# sensor and not already on
#--------------------------------------------------------------------
#
    - id: 'TurnOnLaundryLightsIfMotion'
      alias: TurnOn_LaundryLightsIfMotion
      trigger:
      - entity_id: binary_sensor.motionlaundry_occupancy
        platform: state
        to: 'on'
      condition:
      - condition: state
        entity_id: switch.lightlaundry
        state: 'off'
      action:
      - entity_id: switch.lightlaundry
        service: switch.turn_on
      - delay:
          hours: 0
          minutes: 5
          seconds: 0
          milliseconds: 0
      - entity_id: switch.lightlaundry
        service: switch.turn_off
      mode: single

     
     

Better way with re-trigger

#  
#--------------------------------------------------------------------
#  Turn On laundry Lights if Motion
#-------------------------------------------------------------------- 
#
- id: 'TurnOnLaundryLightsIfMotion'
  alias: TurnOn_LaundryLightsIfMotion
  trigger:
  - platform: state
    entity_id: binary_sensor.motionlaundry_occupancy
    to: 'on'
  condition:
  - condition: state
    entity_id: switch.lightlaundry
    state: 'off'
  action:
  - service: switch.turn_on
    data:
      entity_id: switch.lightlaundry
  - service: automation.turn_on
    entity_id: automation.TurnOff_LaundryLightsIfMotion


#  
#---------------------------------------------------------------------
#  Turn off laundry Lights if Motion
#---------------------------------------------------------------------
#
- id: 'TurnOffLaundryLightsIfMotion'
  alias: TurnOff_LaundryLightsIfMotion
  trigger:
  - platform: state
    entity_id: binary_sensor.motionlaundry_occupancy
    to: 'off'
    for:
        minutes: 5
  condition:
  - condition: state
    entity_id: switch.lightlaundry
    state: 'on'
  action:
  - service: switch.turn_off
    data:
      entity_id: switch.lightlaundry
  - service: automation.turn_off
    entity_id: automation.TurnOff_LaundryLightsIfMotion

Sonoff Zigbee 3.0 USB Dongle

If using zigbee2mqtt with these sonoff dongles note when ordering there are 2 versions. Version P based on CC2652. Version E based on EFR32MG21. The E version seems to work, flashing is slightly different if you are changing from coordinator to router or vice versa. It is listed as experimental on zigbee2mqtt site .

For the time being it seems that purchasing and using the P version is a better choice. We are testing the E version and will publish any specific info here.

Home Assistant

Are you interested in using home automation but worry about privacy. The image above shows an android tablet displaying various information panels in a house in Marietta GA. The panel is able to control lighting, audio, HVAC as well as showing various CCTV camera feeds. All control is within the house and does not leak to Amazon, Google or other service

We offer consulting and installation services to implement the hardware, software and devices

East Cobb IT

We provide hardware and software support.

Hardware: Intel based Windows and Linux , Network switches, Routers, Infrastructure. Pci card installtion such as graphics cards, add on boards , serial parallel etc. Home Server setup and installation using Proxmox

Software: Web sites, API’s , SQL databases, Networking

Home Automation: Installation of Sensors, Switches and Sockets. Home assistant setup and installation

IOT: Custom IOT development using Arduino or espressif ESP microcontrollers.

Android: App developement

video surveillance security system with AI, tied to Home Automation System

Serving the Marietta, Alpharetta, Roswell, Johns Creek, Woodstock area. Give us a call to find out how we can help at 404 547 5074