-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.js
More file actions
22 lines (19 loc) · 775 Bytes
/
Copy pathexample.js
File metadata and controls
22 lines (19 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//const Fsapi = require('node-frontier-silicon');
const Fsapi = require('./index.js');
const url = 'http://192.168.1.151:80/device'
const pin = 1234
const timeout = 1 // in seconds
const fs = new Fsapi(url, pin, timeout)
run()
async function run(){
await fs.init()
await fs.get_mode_list().then(e=>console.log(e))
await fs.get_mode().then(e=>console.log(e))
await fs.get_play_status().then(e=>console.log(e))
await fs.get_play_info_text().then(e=>console.log(e))
await fs.get_play_info_artist().then(e=>console.log(e))
await fs.get_play_info_album().then(e=>console.log(e))
await fs.get_play_info_graphics().then(e=>console.log(e))
await fs.get_volume_steps().then(e=>console.log(e))
await fs.disconnect().then(e=>console.log(e))
}