VanVan / phantom-remote-control

HTTP Adapter to control Devialet Phantom Speakers (Play, Pause, Volume etc.)
GNU General Public License v3.0
15 stars 6 forks source link

README available in
English Français


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

Devialet

Devialet phantom-remote-control Donate

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.

Devialet Phantom

πŸ’‘ 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

If you are a developer

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

You need NodeJS and NPM

If you just want something easy to use

All you have to do is download the application, then run it.

Windows Windows mac Mac linux Linux
Download Download Download

▢️ 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:

autostart Autostart 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.

linux20-2 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 Windows

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

npm install node-windows
node install_service.js

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

✏️ Contributing

πŸŽ“ Copyright and license

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

πŸ’° Donation

If this project help you, you can give me a cup of coffee :)

paypal