New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-frontier-silicon

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-frontier-silicon

Api connector to control Frontier Silicon radios in local network

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

node-frontier-silicon

JS implementation of the Frontier Silicon API

  • This project is is a direct port of zhelev/python-fsapi (https://github.com/zhelev/python-fsapi) using metapensiero/metapensiero.pj (https://github.com/metapensiero/metapensiero.pj)

Required node libs:

npm install node-fetch xml-js --save

Usage

const Fsapi = require('node-frontier-silicon');

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))
}

This results in:

# node example.js

[ 'Internet radio',
  'TIDAL',
  'Napster',
  'Deezer',
  'Qobuz',
  'Spotify',
  'DMR',
  'Music player',
  'AUX in' ]
Deezer
playing
Search and Destroy (Iggy Pop Mix)
Iggy & the Stooges
Raw Power
http://assets.airable.io/600x600/jpeg:80/aHR0cHM6Ly9jZG5zLWltYWdlcy5kemNkbi5uZXQvaW1hZ2VzL2NvdmVyLzRhMTQyMmRhOGIyYWM3MjYzNzNmZjRlNWYxZDUwMTE1LzUwMHg1MDAtMDAwMDAwLTgwLTAtMC5qcGc/
21
true

Keywords

frontier

FAQs

Package last updated on 02 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts