Code Monkey home page Code Monkey logo

amplipi's Issues

Feature Request: Add Mopidy and USB storage

Mopidy is an open source music player that can play local files as well as some online sources and has a full API.

This combined with USB storage would enable the AmpliPi to play completely offline music on the system without the need for Internet or a second device (other than a USB Storage plugged into one of the USB ports).

Streaming scripts are not executable

I checked the padnora error and output files. Looks like this needs to be added to update_config.bash to configure some of the scripts to be executable:

# make scripts executable
chmod +x eventcmd.sh shairport_metadata.bash 

Add basic DLNA support

Add an option to install Roon Bridge?

Roon is a widely used music player software which streams locally from a "core" on the LAN to audio devices that support network access. It can be supported on audio equipment, include Pi-based devices like AmpliPi, by downloading and installing the Linux version of Roon Bridge. It would be great if the AmpliPi web page had a button which would cause it to download and install Roon Bridge.

Make the real dynamic webapp

  • Architect static page elements and generate with jinja template
  • Plumb source input selection
  • Plumb volume control request response update sequence
  • Add mute toggle and change color of volume slider based on muted (changing volume should unmute)
  • Plumb add zone/group
  • Plumb Play/Pause/Next
  • Plumb pandora status

Feature Request: PA

The "Monoprice 6 Zone Home Audio Multizone Controller and Amplifier Kit" has a cool feature which is a 3.5mm input jack for a Public Address system. It mutes the input audio and plays whatever comes in on the line and then resumes the channels back to where they were.

I think something similar, if not the same, would be really useful. It doesn't even need to be a hardware input jack for my use case.

Example use case: An automation in Home Assistant triggered on the doorbell that announces over the entire house that there is a visitor at the front door. If this could be done via API command that simply plays a specific audio file over all the speakers and then restores those speakers back to whatever they were playing before would be excellent.

Optionally if it could be done via ducking and not a complete cut out of the playing audio, just a lowering of the volume by some percent and the audio file played over top. If "ducking" vs "mute" could be controlled via the API command that would be even better.

Kickstarter

  • Research other projects and kickstarters mentioned amplipi chat
  • Start Kickstarter on micronova account
  • Add Jason's Story
  • Add Product Marketing info
  • Add Early Devloper Access Section
  • Add Production specification
  • Add pretty pictures of units
  • Add pretty pictures of Jason's house
  • Take video of Jason using AmpliPi around the house
  • Document JSON API
    • create open api spec
    • host github api webpage with ReDoc
    • plumb api making sure it matches spec
  • Document Python code structure
  • Cleanup diagrams
  • Submit for review
  • Update website with kickstarter information
  • Go Live
  • Promote Kickstarter

Webapp Feedback

Jason:

  • Hard to tell whats playing
  • Slow when changing whole house volume
  • Can groups be subgrouped? This could be used to handle whole house
  • The 2 second refresh resets the source choices if you are currently in the process of picking a new one #254
  • Whole house maxed volume after change sometimes
  • #392

Lincoln:

Matthew:

  • #334
  • Zone 1 shouldn't be at bottom, it should be at TOP! Groups go below zone maybe?
    • Michael - maybe just remove all groups from the default config?
  • Rename shairport stream name to airplay in stream selection
  • Quick start should tell user how to configure Pandora before using it.
  • Remove most of the streams from the default config.
  • Can zones be removed from a source? #332

Ben

  • Consider a zone (and group) based view #211

Mark:

  • Fix horizontal scrolling bug on small iphone 6
  • Volume sliders are laggy

Ed:

  • Add Group or Zone should really be a multi-selector #228

Michael:

  • The web interface's source selector should include the type of stream (Spotify, Analog X, DLNA, etc.)
  • #331
  • Sources, groups, and zones should be shown in a diagram on the API page
  • In the API documentation, it would be helpful to have a "Get available {Source/Group/Zone} IDs"
  • #332
  • #568
  • To mirror the Pandora interface, change the heart to a thumbs up (just Michael's suggestion)
  • Add the ability to export/import config
  • Don't fail loading config when a stream doesn't exist (basically support best-effort config loading)
  • Give feedback when a config is loaded to show success or failure
  • For the configuration section:
    • Rename all the "Stream" wording to "Input" in the Inputs config section
    • Rename Management to Configuration
    • #362

Rick:

Olek:

  • Add offline indicator for when you can connect to AmpliPi but it cant connect to the internet #326

Make source based view in the android app

  • Add Source input configuration
  • Add mute and volume control for zones connected to a source
  • Add Mute and volume control for groups
  • Migrate app to latest version with streams so pandora and shairport can be selected as inputs to a source

Add Server Sent Events (SSE)

SSE will allow notification on change events to be sent when the system state is modified. The idea is that a client registers to receive types of change events and is alerted when they happen. This will be useful for enhancing our webapp and should be useful for many different types of home automation integration.

Reorganize Project

  • Figure out basic folder structure, separating webapp for the ampli peices
  • split api.py into controller.py, preamps.py and utils.py
  • add simple test structure that can be built upon
  • Update README and add link to kickstarter and github hosted api documentation
  • Add license

Document pi configuration

  • Add simple download image and flash pi guide
  • Add step by step installation from base raspbian image

Add OLED display support

  • Device selection
  • Hello World example
  • Determine information we want to display (e.g. IP address, CPU usage, zone status, etc)
  • Create module to display AmpliPi information
  • Integrate with main codebase

Feature Request: Add Alexa Skill

We would like to add full Alexa support for the following command structures

  • Support Volume up, volume down, mute controls to zones and groups of zones
  • Support Play ______ on (Pandora/Spotify/...) on (Group or Zone)

Some interesting links to investigate:
See: https://developer.amazon.com/en-US/docs/alexa/music-skills/steps-to-create-a-music-skill.html
Python audio support: https://github.com/alexa/skill-sample-python-audio-player/tree/master/MultiStream
Basic integration with Volumio: https://github.com/alior101/Alexa-Volumio-Plugin

Document Apis

  • Generate Python documentation
  • Generate REST API documentation
  • Add example automation scripts

Document System

  • Add pretty block diagrams of a multiunit system and each of the individual boards in a box
  • Add example house configuration / with blueprint like view and corresponding config file, and pretty pictures of in ceiling

Add spotify streaming

  • Try out librespot on linux
  • Fix space issues
    • install vollibrespot
  • Can multiple spotify's run at once? Any special config?
  • How much space does a single user account or librespot instance require? (<10% CPU, ~1% MEM)
  • Figure out --onevent for librespot (vollibrespot commands replace this)
  • Look at librespot github to potentially output more track information (outside of just title)
  • Make spotify config generator
  • Investigate and make song info parser
  • Investigate play/pause control
  • Investigate song selection (Seeking works, specific selection still requires Spotify app)

Add the concept of a Preset

The api should add the concept of a preset configuration.

The idea is to save specific setups and make them loadable. Here are a couple of instances I though of:

  1. Watching TV: Click the watching TV preset button and the 3 sets of speakers in your living room are connected and set to the normal TV volume levels
  2. Spotify Party: Click the Spotify Party preset and the whole house tunes to a started spotify instance with a party playlist loaded. Outdoor speakers are turned to a high volume, the rest of the house is set to a taking level volume.

This could be tied to the concept of a play event, where when a specific source starts playing a specific preset configuration could be loaded. This has the potential to minimizes the use of the webapp for common setups.

Once play events are added many additional presets could be added. For instance there could be a whole house shairport stream that when it was played started playing music and connected all of the zones in the house to the source.

Add preamp bootloading support

  • Test with stm32 python library
  • Fix BOOT0 and NRST pins values (pi config)
  • Add script and document its use for single preamp upgrade
  • Document expansion preamp programming

Feature: Upgrade AmpliPi's directory structure for debian releases

  • Update AmpliPi layout, from /home/pi expectations to more standard linux layouts /etc/amplipi.conf , /var/web/amplipi, /usr/local/lib/amplipi, /usr/local/bin/amplipi,
    • Decouple stream scripts from /home/pi (all other python is relative)
    • Add memory drive for /var/web/amplipi/generated (requires #76)
    • Make amplipi able to be used and developed on using the simpler base directory structure (you should be able to run the debug webserver (with real streams if you want) from a git checkout)
    • Add /etc/amplpi.conf config file that is checked when a local config file is not found

Layout:

config/house.json -> /etc/amplipi.conf # includes hints for this directory layout (stop saving this all the time)
streams -> /usr/loca/bin/amplipi/streams # streaming scripts
amplipi -> /usr/local/lib/amplipi
web -> /var/web/amplipi

We still need to figure out where to put documentation, and source code

PCB Files

Could you publish the PCB files, not in pdf schematics, but the actual files? I would like to build my own board for compute module 3.

Add TFT Display Support

  • Test and verify hardware interface works
  • Port OLED interface
  • Add the name of the selected stream for each source, as well as 'playing' status
  • Add volume bars for 6 zones
  • Add volume bars for 12 and 18 zones
  • Get touch events
  • Test out touch location capabilities
  • Add paged interface - there is only 1 page for now but the framework is there
  • If default AmpliPi API URL doesn't work, try the debug port 5000
  • Show errors on disconnect
  • Create service to launch at startup
  • Add to configure.py for setup
  • Add logging
  • Detect if not a Raspberry Pi or no display connected and quit
  • Add documentation, maybe a little tutorial on debuging

Tabled until later:

  • Does it work as a normal display?
  • Investigate flickering when backlight is set to less than full brightness
  • Create mock display for tests

Pandora stops playing after 30 minutes

  • Test with simple console pianobar without the streaming api, does it work for more than 30 minutes?
  • Add pianobar output to console to debug further if necessary
  • Fix issue discovered, does it need a retry/relogin? What is going on?

Feature: Plexamp for Raspberry Pi

  • Test Plexamp v1 with MPD and make any required changes
  • Created Plexamp stream class and config handler (server.json/mpd.conf)
  • Find out a better way to handle user information in server.json (potentially not required for a simple audio endpoint)
  • Song metadata? <- Handled atypically in Plex, and seemingly unavailable until a newer, headless version
  • Create documentation on how to use plexamp on AmpliPi
  • Implement install process
    • Packaging our changes with plexamp v1 for initial install
    • Adding reqs to configure script (uuid-runtime, node 9 install)
    • "Pin" nodejs at version 9.11.2
  • Implement Plex account connection in WebApp

I've put some work into adding Plexamp support for the AmpliPi system - this issue will detail my findings.

Thanks to odinb1's efforts (detailed here: https://github.com/odinb/bash-plexamp-installer) I was able to reach the current state. You can install plexamp on the Pi using their script, or you can follow the official install guide here: https://forums.plex.tv/t/plexamp-for-raspberry-pi-release-notes/368282

Be sure to include the workaround that OttoKerner linked in the post above. In either guide, you will have to edit the server settings @ /home/pi/.config/Plexamp/server.json. Odinb1 talks about this on their GitHub README.md - you'll have to get a working copy of server.json from an old desktop version of plexamp.

  • What's missing?
    Check out both of my forum posts (1 and 2) to get the bigger picture of where we're at. Currently, there doesn't seem to be a way to specify channels for plexamp. This is problematic, given the fact that every other source we provide has the ability to specify a channel (which is set in asound.conf). The de-obfuscated javascript for the RPi version of plexamp can be found here: https://gist.github.com/micronova-jb/c7bc03ae046ce6ce988d3062555ed6e3

Perhaps there's something hidden in there that we haven't been able to find - for now, plexamp plays on ch1, ch2, and ch3 when cast to. These are the channels associated with the USB sound card.

I will try to keep this issue up to date as more information comes out!

EDIT 3/30/21: Jason and I are both in an external channel of the Plexamp Slack. Elan recommended an earlier version of headless plexamp for Pi (ver. 1.x), so I'm trying that now. I don't see any differences so far.
https://files.plexapp.com/elan/plexamp-v1.0.5-pi.tar.gz

EDIT 4/19/21: The older version of Plexamp is working! We had to make some tweaks to the javascript (after de-obfuscating), but you are now able to select an audio device! We're still unable to get multiple running at the same time - it seems like this will take significant changes to the plexamp software.

EDIT 5/4/21: Gist of the file actually being used on the AmpliPi (difficult to read because it is fully obfuscated and on one line)
https://gist.github.com/micronova-jb/1156b1d04639284e5c6a354de4ec3002

De-obfuscated version:
https://gist.github.com/micronova-jb/e66e4a78ad3feaa655c292de64c189cd

Look for the specific changes around lines 25200 - 25205 in the de-obfuscated file. Basically, we have to tell it to use the MPD configuration, taking the device name. In mpd.conf, the audio device can be selected (e.g. ch2)

EDIT 5/12/21: Check out the new forum post - I detailed some more of the process here: https://forums.plex.tv/t/configuration-settings-for-playing-audio-on-a-specific-channel-of-a-usb-audio-device-connected-to-raspberry-pi/696974/11

Potential Feature: snapcast

Snapcast support

Snapcast is a multi-room client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio.

The idea is that the AmpliPi could be either a client or a server for snapcast. For larger locations you could have 2 AmpliPis in different locations powering lots of zones but minimizing wiring issues/distance. For some homes you could have the home on an AmpliPi+extenders, and portable speaker(s) or a pi+amp powering a backyard zone.

Use a RAM disk for volatile configuration

AmpliPi uses an mmc on board the Pi Cm3+. To reduce the wear on the mmc, we should configure any volatile writes to use a RAM disk. Almost all of the stream config should be moved to this.

  • RAM directory creation at startup
  • Add pertinent config and metadata files to RAM
  • Figure out how much space is needed for the partition (100 MB or smaller)

Add Streams to Api

  • Prototype pandora handling with pianobar
  • Prototype shairport handling
  • Add stream concept to api
  • Plumb shairport support through stream api
  • Plumb basic pandora support through api (no play/pause, no change station, no acct configuration)
  • Add shell of set_stream api method
  • Add play/pause commands
  • Add station selection ( need to make get_stations command)
  • Add current song info for Pandora
  • Add current song info for Shairport
  • Update eventcmd.sh for pianobar sources to provide a ping when a new song starts (and currentSong updates)

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.