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 🙏

© 2024 – Pkg Stats / Ryan Hefner

signalk-empirbusnxt-plugin

v1.1.4

Published

Signal K server plugin to monitor and control an EmpirBus NXT via application specific PGN

Downloads

55

Readme

Signal K EmpirBus NXT Plugin

Monitor and control an EmpirBus NXT via EmpirBus application specific PGN 65280 using EmpirBus NXT API component for 3rd party communication

This plugin relies on the "Data Model 2" to read and write the status of 2x dimmers with EmpirBus values 0..1000 and 8x switches 0|1 per instance of an EmpirBus Application Specific PGN component. The first two switches represent the state of the two dimmers.

The values of the two dimmers are expected in the 2x uword values of Data Model 2, while the status of the eight switches is expected in the 8x bit values. Find in the docs folder the EmpirBus NXT documentation for details on how to process data model in EmpirBus NXT programming.

The EmpirBus implementation has to use these instances in the EmpirBus Application Specific PGN component:
“Receive from network”: X (e.g. 0, 2, 4, 6, ...)
“Transmit to network”: X + 1 (e.g. 1, 3, 5, 7, ...)

EmpirBus API PGN component connectors are numbered Word 1..2 + Bit 1..8. To avoid confusion Signal K device names are numbered accordingly starting from 1, not from 0.

The dimmer values and switch states are stored in the following Rest API keys:

electrical/switches/<identifier>
electrical/switches/<identifier>/state (true|false)
electrical/switches/<identifier>/dimmingLevel (0..1)
electrical/switches/<identifier>/type (switch | dimmer)
electrical/switches/<identifier>/name (System name of control. In EmpirBus devices are numbered 1..8, so device names numbered accordingly 1..8, e.g. Switch 0.8)

electrical/switches/<identifier>/meta/displayName (Display name of control)

electrical/switches/<identifier>/meta/associatedDevice/instance (Technical device address: Instance in EmpirBus API)
electrical/switches/<identifier>/meta/associatedDevice/device (Technical device address: Device in instance in EmpirBus API e.g. "switch 1" or "dimmer 1)
electrical/switches/<identifier>/meta/source (Information what plugin needs to take care of device)
electrical/switches/<identifier>/meta/dataModel (Bus Data Model used in the EmpirBus programming, currently only Data Model 2 is supported)

electrical/switches/<identifier>/meta/manufacturer/name ("EmpirBus")
electrical/switches/<identifier>/meta/manufacturer/model ("NXT DCM")

<identifier> is the device identifier, concattenated from the name of digital switching system and a system plugin proprietary device address (systemname-deviceaddress), e.g. for EmpirBus NXT devices this is empirBusNxt-instance-dimmer|switch<#>
<instance> is the instance of the respective “Receive from network” EmpirBus NXT API component for 3rd party communication 0..49
<#> is the ID of the dimmer (1..2) or switch (1..8)
state is state of switch or dimmer 'on' or 'off'
dimmingLevel the dimming value of dimmer as a ratio from 0 to 1, where 1 = 100%
associatedDevice is the address of device proprietary to the plugin and digital switching system, e.g. for EmpirBus NXT {"instance":0,"switch":0} or {"instance":0,"dimmer":0}

Values to send to device are expected via PUT method at: electrical/switches/<identifier>/state|dimmingLevel with body: JSON.stringify({value: value}) e.g. electrical/switches/empirBusNxt-instance0-dimmer0/dimmingLevel, body: {value:0.75}