npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nicolaudiegroup/dasnet

v1.2.2

Published

This package allows parsing and serializing DASNet requests/responses, to communicate with devices using the Nicolaudie Remote Protocol.

Downloads

274

Readme

DASNet

This package allows parsing and serializing DASNet requests/responses, to communicate with devices using the Nicolaudie Remote Protocol.

An implementation of the Nicolaudie Remote Protocol using DASNet is available at @nicolaudiegroup/nicolaudie-remote-protocol

Documentation

SDK references

For more information about DASNet, the Nicolaudie Remote Protocol, or to raise issues, please contact [email protected]

Getting started

Installation

First install the package


npm i @nicolaudiegroup/dasnet

Basic usage

The most basic way to use this package is to simply construct the Operation of your choice, and use it to parse a buffer or serialize to a buffer.

For more information about the available Operations, see the compatibility table below.

Serialization

Example:

import { Operations, Device } from '@nicolaudiegroup/dasnet'
import { send } from 'my-library'

// Instanciate
const request = new Operations.ZoneStatusRequest()

// Populate data (RECOMMENDED)
request.data = {
  deviceId: Device.DeviceId.Stick3A,
  zoneId: 2,
}
// OR
request.from({
  deviceId: Device.DeviceId.Stick3A,
  zoneId: 2,
}) // Serializes or parse depending on what's provided

// Serialize and use the serialized buffer
send(request.toBuffer())

The data object to serialize can also be passed directly to the constructor. The constructor of some operations might accept additional options.

An existing buffer can be provided to the toBuffer method, to avoid creating a new one.

Parsing

Example:

import { Operations } from '@nicolaudiegroup/dasnet'

// Instanciate
const response = new Operations.ZoneStatusResponse()

// Parse (RECOMMENDED)
response.read(buffer) // Returns a boolean indicating if the entire operation was read (based only on the buffer length)
// OR
response.fromBuffer(buffer) // Bypasses checks, data might be incomplete
// OR
request.from(buffer) // Serializes or parse depending on what's provided

// Use the parsed data
console.log(JSON.stringify(response.data))

The buffer to parse can also be passed directly to the constructor. The constructor of some operations might accept additional options.

Parsing a buffer containing an unknown operation

Often times, you'll receive a buffer but won't know in advance which Operation it is.

For this reason, there exists a special Operation called UnknownResponse that can be used to parse the header of the buffer, and thus determine which operation to use.

The simplest way to use UnknownResponse is using the static method infer, which automatically tries to read the provided buffer, and instantiate the correct Operation.

Example:

import { Operations } from '@nicolaudiegroup/dasnet'

// Try reading the response
const response = Operations.UnknownResponse.infer(buffer)

// If the infer method returns undefined, the buffer is not long enough to contain the required headers
if (!response) {

  throw new Error('Buffer is too short, unable to read operation headers')

}

// If the response is an instance of UnknownResponse and not a specific operation, it means it couldn't recognize the opCode
if (response instanceof UnknownResponse) {

  throw new Error(`Unsupported operation: ${response.opCode}`)

}

// After those checks, you can safely use the response and it's parsed data
console.log(JSON.stringify(response.data))

Other useful namespaces

import {
  Device, // Device related constants & utilities
  Op, // OpCodes constants & utilities
  Status, // Show/scene status constants & utilities
  Trigger, // Scene triggering constants & utilities
  Utils, // Miscellaneous utilities
} from '@nicolaudiegroup/dasnet'

Advanced usage & concepts

For more informations, check ADVANCED.md

Compatibility table

  • ✅ supported
  • 🧪 supported but untested
  • ⚠️ partial support or supported with caveats
  • 🚧 planned support
  • ❌ unsupported
  • – not compatible

| OpCode | Operation name | Dina 1A | Dina 2A | Siudi 11ASiudi 11BSiudi 11D | Stick 3A | Stick 5A | Siudi 10 | Stick KU1Stick KE1 | Notes | |--------|----------------------------|:--------------------:|:--------------------:|:--------------------------------------------------:|:--------------------:|:-------------:|:-------------:|:--------------------------------:|-----------------------------------------------------------------------------------------------------------------------| | | | Firmware v3.0 and up | Firmware v3.0 and up | | Firmware v2.0 and up | | | Ethernet variant only | | | 0x0000 | PollRequest | ✅ | 🧪 | 🧪 | ✅ | 🧪 | 🧪 | - | | | 0x00c9 | PollResponse | ✅ | 🧪 | 🧪 | ✅ | 🧪 | 🧪 | - | Form factor only available since firmware DINA/SIUDI11 >= 3.00 / SIUDI10A >= 1.00 / STICK5A >= 1.00 | | 0x001f | ReadFileRequest | ✅ | 🧪 | 🧪 | ✅ | - | - | - | | | 0x0020 | ReadFileResponse | ✅ | 🧪 | 🧪 | ✅ | - | - | - | | | 0x0025 | ZoneStatusRequest | - | - | - | ✅ | 🧪 | 🧪 | - | | | 0x0025 | ZoneStatusResponse | - | - | - | ✅ | 🧪 | 🧪 | - | | | 0x0023 | UiStatusResponse (Stick3) | - | - | - | ⚠️ | - | - | - | Datagram depends on device. Only supported as placeholder, data is not readable. Firmware v3.01 and up supported only | | 0x0023 | UiStatusResponse (Stick 5) | - | - | - | - | ⚠️ | - | - | Datagram depends on device. Only supported as placeholder, data is not readable. | | 0x0023 | UiStatusResponse (Dina) | ⚠️ | - | - | - | - | - | - | Datagram depends on device. Only supported as placeholder, data is not readable. | | 0x0009 | MasterVersionRequest | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | - | | | 0x0009 | MasterVersionResponse | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | - | | | 0x0047 | GetSaltRequest | ✅ | 🧪 | 🧪 | ✅ | 🧪 | 🧪 | - | | | 0x0047 | GetSaltResponse | ✅ | 🧪 | 🧪 | ✅ | 🧪 | 🧪 | - | | | 0x0048 | AuthenticateRequest | ✅ | 🧪 | 🧪 | ✅ | 🧪 | 🧪 | - | | | 0x0048 | AuthenticateResponse | ✅ | 🧪 | 🧪 | ✅ | 🧪 | 🧪 | - | | | 0x0065 | ButtonRequest | - | - | - | 🚧 | 🚧 | - | - | | | 0x0065 | ButtonResponse | - | - | - | 🚧 | 🚧 | - | - | | | 0x006d | SimplifiedTriggerRequest | - | - | - | ✅ | 🧪 | 🧪 | - | | | 0x006d | SimplifiedTriggerResponse | - | - | - | ✅ | 🧪 | 🧪 | - | | | 0x010a | TriggerRequest | ✅ | 🧪 | 🧪 | - | - | - | - | | | 0x010a | TriggerResponse | ✅ | 🧪 | 🧪 | - | - | - | - | | | 0x010b | SceneStatusRequest | ✅ | 🧪 | 🧪 | - | - | - | - | | | 0x010b | SceneStatusResponse | ✅ | 🧪 | 🧪 | - | - | - | - | Blackout state deprecated since firmware v4.0, use ShowStatus instead | | 0x0128 | ShowStatusRequest | ✅ | 🧪 | 🧪 | - | - | - | - | Since firmware 4.0.0 | | 0x0128 | ShowStatusResponse | ✅ | 🧪 | 🧪 | - | - | - | - | Since firmware 4.0.0 | | 0x0117 | GetScenesNamesRequest | - | - | - | - | 🚧 | 🚧 | - | Since firmware 1.0.0 | | 0x0117 | GetScenesNamesResponse | - | - | - | - | 🚧 | 🚧 | - | Since firmware 1.0.0 | | 0x0012 | KeepAliveRequest | ✅ | 🧪 | 🧪 | - | 🧪 | 🧪 | - | Not sure about compatibility on Stick3. Should be compatible with Stick5, Siudi10, Dina, Siudi11 | | 0x0012 | KeepAliveResponse | ✅ | 🧪 | 🧪 | - | 🧪 | 🧪 | - | Not sure about compatibility on Stick3. Should be compatible with Stick5, Siudi10, Dina, Siudi11 | | 0x0006 | LegacySceneTrigger | - | - | - | - | - | - | ❌ | | | 0x0000 | LegacyPollRequest | - | - | - | - | - | - | ❌ | | | 0x0001 | LegacyPollResponse | - | - | - | - | - | - | ❌ | | | 0x0065 | LegacyButton | - | - | - | - | - | - | ❌ | | | 0x0066 | LegacyPowerLedStatus | - | - | - | - | - | - | ❌ | | | 0x0067 | LegacySceneLedStatus | - | - | - | - | - | - | ❌ | | | 0x0068 | LegacyZoneLedStatus | - | - | - | - | - | - | ❌ | | | 0x0069 | LegacyModeLedStatus | - | - | - | - | - | - | ❌ | | | 0x006a | LegacySliderStatus | - | - | - | - | - | - | ❌ | | | 0x006b | LegacyAllLedsOff | - | - | - | - | - | - | ❌ | | | 0x006c | LegacyPollLedStatus | - | - | - | - | - | - | ❌ | | | 0x006c | LegacyPollLedStatusReply | - | - | - | - | - | - | ❌ | | | 0x006d | LegacySceneStatus | - | - | - | - | - | - | ❌ | |