0.2.0 ā€¢ Published 5 years ago

devialet-phantom v0.2.0

Weekly downloads
3
License
GNU
Repository
github
Last release
5 years ago

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

npm install phantom-remote-control
node index.js

You need NodeJS and NPM

ā–¶ļø Usage

URLDescription
?play=http://site.com/music.mp3Play Mp3 file
?setVolume=30Set volume to a specific value
?setVolume=UpIncrease volume
?setVolume=DownDecrease volume
?pause=1Pause
?play=1Resume
?stop=1Stop
?getPosition=1Get current position
?getDuration=1Get music duration
?seek=30Move 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.

āœļø 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.