npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

phantom-remote-control

v1.2.2

Published

HTTP Adapter to control Devialet Phantom Speakers (Play, Pause, Volume etc.)

Downloads

3

Readme

NAC-depend-none NODEJS NPM GitHub version NAC-license

Devialet phantom-remote-control

HTTP Adapter to remote control Devialet Phantom Speakers

This code allows you to control your devialet phantom using a very simple API, or even from your web browser. It automatically detects your Devialet Phantom speakers on your local network.

💡 Features

Control the musical playback of your Devialet speakers

| Devialet | 🔊 Phantom Dialog | 🔉 Phantom Premier |🔈 Phantom Reactor| | -------------------------------------------- | :----------------: | :----------------: | :----------------:| | Play mp3 file | ✔️ | ✔️ | ✔️ | | Pause and Resume | ✔️ | ✔️ | ✔️ | | Stop | ✔️ | ✔️ | ✔️ | | Change volume | ✔️ | ✔️ | ✔️ | | Get current volume | ✔️ | ✔️ | ✔️ | | Increase or decrease volume | ✔️ | ✔️ | ✔️ | | Recover the playback position | ✔️ | ✔️ | ✔️ | | Recover the playback duration | ✔️ | ✔️ | ✔️ | | Move playback to a specific time of the music| ✔️ | ✔️ | ✔️ | | Control several speakers at the same time | ✔️ | ❌ | ✔️ |

🔧 Installation

git clone https://github.com/VanVan/phantom-remote-control.git
cd phantom-remote-control
npm install
node index.js

You need NodeJS and NPM

▶️ Usage

| URL | Description | | -------------------------------- | ------------------------------------------- | | ?play=http://site.com/music.mp3| Play mp3 file | | ?setVolume=30 | Set volume to a specific value | | ?setVolume=Up | Increase volume | | ?setVolume=Down | Decrease volume | | ?pause=1 | Pause | | ?play=1 | Resume | | ?stop=1 | Stop | | ?getPosition=1 | Get current position | | ?getDuration=1 | Get music duration | | ?seek=30 |Move playback to a specific time of the music|

🔗 Example:

http://127.0.0.1:8090/?setVolume=Up

⏩ These requests can be made by web browser or used as an API to serve as a keyboard shortcut for example.

🧰 Configuration

No configuration is needed, it works out of the box, however, you can edit config.json if you need to.

{
"http_local_port":                  8090,
"devialet_ipaddress":               "autodetect",
"devialet_port":                    "autodetect",
"devialet_device_description_xml":  "autodetect",
"ssdp_detection_interval":          10000,
"volume_step":                      10,
"debug":                            false
}

Each variable in the config can have these options:

  • http_local_port: Local port to use to listen HTTP request.
  • devialet_ipaddress and devialet_port: Can be used together to force this program to use a specific or undetected sound system.
  • devialet_device_description_xml: Can be used to force a specific device.
  • ssdp_detection_interval: Interval to make SSDP request to find a device.
  • volume_step: Up and Down volume step to use.
  • debug: Let you use a .env file to specify environnement variable.

⌨ Using this program as a service

If you use it every day with your speakers, it would be better to configure it as a service on a Linux server or on your personal computer. By doing it, the program will always be running.

Linux with systemd

You can simply install the service on Linux by entering the command

sudo node install_service.js

It will create a file /etc/systemd/system/devialet.service

You can then start the service by doing sudo systemctl start devialet

Windows

You can simply install the service on Windows by entering the command

node install_service.js

To check if it works, just open http://127.0.0.1:8090 on your browser

✏️ Contributing

  • Add new control features
  • Add a control panel to use in the browser

🎓 Copyright and license

Code released under the GNU General Public License v3.0.