
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.
Representational simulation of IoT devices.
This project creates simulated IoT devices and facilities. Realistic data is generated based on the type of device and time of day. IoT telemetry data can be handled by a custom user defined function.
/**
* Device
*
* @constructor
* @param {String} dsn - device serial number.
* @param {String} type - type of device.
* @param {String} connectionString - connection parameter for Azure IoT hub.
* @param {String} profile - device signature.
* @param {boolean} log - True=print fancy output console/False=no output
* @param {function} handler - User defined function to handle the telemetry data
*/
/**
* Facility
*
* Models the composition of IoT objects into a single IoT "Facility"
*
* @constructor
* @param {string} name - name of the facility.
* @param {array} devices - IoT devices in the facility.
* @param {array} geolocation - lat and lon of the facility.
* @param {number} frequency - milliseconds between messages.
*/
import {TankDevice, WindDevice, EnergyDevice, Facility} from "iot-sim"
// Facility 1
// Tank Monitoring Device
const tank_iot_01 = new TankDevice({
dsn: "tank_iot_01",
type: "tank",
profile: null,
log: false,
handler: console.log
});
// Wind Monitoring Device
const wind_iot_01 = new WindDevice({
dsn: "wind_iot_01",
type: "wind",
profile: "profile1",
log: false,
handler: console.log
});
// Energy Monitoring Device
const energy_iot_01 = new EnergyDevice({
dsn: "energy_iot_01",
type: "energy",
profile: "profile1",
log: false,
handler: console.log
});
const facility_01 = new Facility({
name: "facility_01",
devices: [energy_iot_01, wind_iot_01, tank_iot_01],
geolocation: {
lat: 51.0447,
lon: 114.0719
},
frequency: 10000,
});
facility_01.setupFacility();
facility_01.putOnline();
{
data: { watts: '171.189' },
timestamp: 1586550588454,
id: 'a855447a-b488-475b-bb2c-be80cabba8ca',
_id: 'a855447a-b488-475b-bb2c-be80cabba8ca',
dsn: 'energy_iot_01',
geolocation: { lat: 51.0447, lon: 114.0719 },
facility: 'facility_01',
type: 'energy'
}
{
data: { mph: '20.995', direction: 'S' },
timestamp: 1586550588459,
id: '6042d595-b93f-4ff8-884a-38d860fa73c4',
_id: '6042d595-b93f-4ff8-884a-38d860fa73c4',
dsn: 'wind_iot_01',
geolocation: { lat: 51.0447, lon: 114.0719 },
facility: 'facility_01',
type: 'wind'
}
{
data: { liters: '98.404', pH: '6.079' },
timestamp: 1586550588460,
id: 'd2befdfa-b2d9-4b9a-8970-523c486346b1',
_id: 'd2befdfa-b2d9-4b9a-8970-523c486346b1',
dsn: 'tank_iot_01',
geolocation: { lat: 51.0447, lon: 114.0719 },
facility: 'facility_01',
type: 'tank'
}
FAQs
Simulation of IoT devices
We found that iot-sim 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.