
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.
bdsd.client
Advanced tools
Coming soon.
In terminal:
npm install --save bdsd.client
In js file:
const BdsdClient = require('bdsd.client');
// BdsdClient function accepts socket filename as an argument.
// If no argument provided then it will try to connect to following file:
// process.env['XDG_RUNTIME_DIR'] + '/bdsd.sock'. Usually it is /run/user/1000/bdsd.sock.
let myClient = BdsdClient();
// Register listener for broadcasted values
myClient.on('value', data => {
console.log('broadcasted value', data);
});
// Listener for connected event.
// Triggers when client connects and receive 'bus connected' notification
myClient.on('connect', _ => {
console.log('client connected');
// get list of all datapoints
myClient
.getDatapoints()
.then(console.log)
.catch(console.log);
// get description for one dp
myClient
.getDescription(1)
.then(console.log)
.catch(console.log);
// get datapoint value
myClient
.getValue(1)
.then(console.log)
.catch(console.log);
// send read request to bus
myClient
.readValue(1)
.then(console.log)
.catch(console.log);
// set datapoint value and send to bus
myClient
.setValue(1, true)
.then(console.log)
.catch(console.log);
// set programming mode to 1
myClient
.setProgrammingMode(1)
.then(console.log)
.catch(console.log);
// get stored value from bdsd.sock(avoid communication via serialport)
myClient
.getStoredValue(1)
.then(console.log)
.catch(console.log)
// read multiple values
myClient
.readValues([1, 2, 3])
.then(console.log)
.catch(console.log);
// set multiple values
myClient
.setValues([
{ id: 1, value: true},
{ id: 2, value: 1}
])
.then(console.log)
.catch(console.log);
});
// error handling
myClient.on('error', err => {
console.log(err.message);
});
All API is Promise-based. If request was successful then you will get payload as a parameter of callback function.
For getDatapoints method you should receive array of all datapoints:
[ { id: 1,
length: 2,
flags:
{ priority: 'low',
communication: true,
read: true,
write: true,
readOnInit: false,
transmit: true,
update: false },
dpt: 'dpt9' },
{ id: 2,
length: 1,
flags:
{ priority: 'low',
communication: true,
read: false,
write: true,
readOnInit: false,
transmit: true,
update: false },
dpt: 'dpt5' } ]
For getDescription you will receive description of specified datapoint
{ id: 1,
value:
{ id: 1,
dpt: 'dpt9',
flags:
{ priority: 'low',
communication: true,
read: true,
write: true,
readOnInit: false,
transmit: true,
update: false },
length: 2 } }
For getValue/getStoredValue you will receive object with fields id and value
{ id: 999,
value: 'Hello, friend',
raw:
{ type: 'Buffer',
data: [ 72, 101, 108, 108, 111, 44, 32, 102, 114, 105, 101, 110, 100, 0 ] } }
For setValue/readValue you will receive object with field id
{ id: 1}
setProgramming mode callback your function without data
readValues accepts array of datapoints. It will send only one request to BAOS module and BAOS will send multiple read requests to KNX bus.
setValues accepts array of objects: [{id: 1, value: true}, {id: 2, value: 23.5}]
FAQs
JS Client for bdsd.sock
The npm package bdsd.client receives a total of 0 weekly downloads. As such, bdsd.client popularity was classified as not popular.
We found that bdsd.client 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.