
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
slimp3-server
Advanced tools
slimp3-server implements the SliMP3 Client Protocol in NodeJS. The package was designed to reflect the structure of the standard tcp socket server.

This server only supprots the orinigal SliMP3 Client Protocol, meaning it only supports a limited number of devices. It has only been tested with the device pictured above.
This section will show you how to install, and provide basic usage for slimp3-server
npm install slimp3-server
const slimp3 = require('slimp3-server')
// create an instance of the server class
var server = new slimp3.Server()
// setup listening event
server.on('listening', function(){
console.log(`listening on ${server.address().address}:${server.address().port}`)
})
// setup error event
server.on('error', function(err){
console.error(err)
})
// event for new clients
// the callback for this event should accept an instance of the Client class
server.on('connection', async function(client){
console.log('new connection')
client.send('hi!')
})
// start listening on the server
server.bind() // Server.bind() accepts a port and address to listen on, if none is give it will default to 3483
client.get_ir() returns a promise fufilled by the next IR Code
client.setIrRepeatRate(<rate in ms>) sets the number of milliseconds that must pass between button presses
eg:
/// ... create a server ...
server.on('connection', async function(client){
// this sets the number of milliseconds that must pass since the last button was pressed
client.setIrRepeatRate(250) // (this is defualt value)
// this function will return a promise that will be fulfilled when the next IR Code is recived
// in practice you would probably want to wrap this in a try-catch statement
console.log('Recived IR Code', await client.get_ir())
})
Client.mapper allows you to map ir codes to key strings.
The remote included with slimp3 is a sony universal remote, slimp3 uses the JVC mode that can be set by pressing:
SDVD0 0 7ENTDVDBy default clients will map ir codes for the included remote.server.on('connection', async function(client){
// this function will return a promise that will be fulfilled when the next IR Code is recived
var code = await client.get_ir()
// if the code is unknown this will return 'unmapped'
var key = client.mapper.map(code)
// test if the key is in a group
var bool = client.mapper.group('enter', key)
})
Non-Standard Remote
Create a mapper:
const mapper = new slimp3.Mapper({
// key mapping
<ir_code>: '<key string>',
}, {
// key groups
yes: ['<key_string>'],
no: ['<key_string>'],
enter: ['<key_string>'],
// ect...
})
Attach a mapper to a client:
server.on('connection', async function(client){
client.mapper = mapper
})
You can also recive ir codes via callback:
server.on('connection', async function(client){
client.irCallback = function(code){
// if the function returns false, the code will be ignored, and will not fufill the ir promise
// this can be usefull for catching specific ir codes like `power` and `sleep`
return true
}
server.on('connection', async function(client){
// pauses on any mapped key
await client.pauseAny()
// pauses on a key in a group
await client.pauseGroup('yes')
})
server.on('connection', async function(client){
const digit = client.readDigit()
client.send('you pressed: ', digit)
})
const menu = ['Item1', 'Item2', 'Item 3', 'Fourth Item']
server.on('connection', async function(client){
const index = await client.menu(menu, 'Choose an item')
const item = menu[index]
client.send('you chose: ' + item)
})

FAQs
implements the slimp3 client protocol in nodejs
The npm package slimp3-server receives a total of 2 weekly downloads. As such, slimp3-server popularity was classified as not popular.
We found that slimp3-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.