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

homebridge-divergence-meter

v1.0.4

Published

Control Sadudu's Steins;Gate Divergence Meter through Homebridge.

Downloads

3

Readme

Homebridge Steins;Gate Divergence Meter

Control Sadudu's Steins;Gate Divergence Meter through Homebridge.

Home View

Features

This plugin models the meter as a TV with input sources as display modes.

  • Soft power off
  • Clock modes with time synchronization
  • Gyroscope mode
  • Controlled random worldline
    • Result memorized
    • Customizable random range
  • Unlimited customized worldlines
  • Auto sleep

Getting Started

Prerequisites

This plugin uses Noble, a Node.js BLE library, to communicate with the meter. On Linux, the following dependencies should be installed:

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

For more details and descriptions for other platforms, please see the Noble documentation.

Installation

Install the plugin through the Homebridge UI, or through commandline:

npm install -g homebridge-divergence-meter

Add Accessories to Home

The meter is modeled as a TV. Due to the limitation of HomeKit, Television services can only be published as external accessories, which need to be added to Home manually.

Open the Home app - Add or Scan Accessory - More options... - Select the "Divergence Meter" TV - Enter the setup code shown in Homebridge log:

Please add [Divergence Meter XXXX] manually in Home app. Setup Code: XXX-XX-XXX

This plugin adds a Television with its input sources as display modes. Turning off the device is a soft power off, i.e. the nixie tubes are off but the device is still on.

This plugin also adds a switch for random worldline. Turn on the switch to start randomization. Turn off to settle.

NOTICE: Due to the lack of a read-back interface, this plugin can be out-of-sync with the actual device. It is not aware of external changes: turning on/off physically, pressing the physical buttons, or changes made by the mini program. In those cases, auto-off will not work, and the accessory status may be out-of-sync.

Controlled Random Worldline

The meter can generate random worldlines (by pressing the leftmost button for example). In this plugin, this function is achieved by the random worldline button (described above). The result is not stored.

In addition, this plugin introduces a controlled random mode. When in the "Saved Random" mode, the random worldline is generated by the plugin. The range is configurable (see below, even negative divergence is possible!) and the results are memorized.

Configuration

Configure the plugin through the Homebridge UI, or dd the following part to the "platforms" section of your Homebridge config:

{
    "name": "Divergence Meter",
    "use24H": true,
    "autoOff": true,
    "autoOffTime": 300,
    "randomSwitchName": "Random Worldline",
    "randomMin": 0,
    "randomMax": 0.999999,
    "worldlines": [
        "1.048569",
        "3.141592"
    ],
    "scanningRestartDelay": 10000,
    "platform": "DivergenceMeter"
}

| Key | Description | Default | |------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | name | TV Accessory name. | Divergence Meter | | use24H | Use 24-hour mode for time display. | true | | autoOff | If enabled, turn off the Divergence Meter after some time since the last operation (turning on, changing mode). Due to the lack of the read-back interface, this plugin is not aware of external changes to the meter: turning on/off physically, pressing the physical buttons, or changes made by the mini program. In those cases, auto-off will not work. | true | | autoOffTime | Time for auto-off in seconds. | 300 | | randomSwitchName | Name of the switch for random worldlines. | Random Worldline | | randomMin | Minimum value for controlled random worldline described above. Can be negative. | 0 | | randomMax | Maximum value for controlled random worldline described above. | 0.999999 | | worldlines | Customized worldlines. Must be 8-character long. Characters other than 0-9 and '.' turn off the nixie tube. When changing the number of customized worldlines, newly added input sources in Home may not be named correctly. Try removing and re-adding the accessory if it doesn't work. | | | scanningRestartDelay | Delay to restart BLE scanning if interrupted. When multiple plugins use BLE, they may interfere with each other. If that is the case, try increasing this number. | 10000 | | platform | Must be DivergenceMeter. | |

Compatibility with the Physical Buttons and the WeChat Mini Program

Due to the lack of a read-back interface, this plugin is not aware of external changes: turning on/off physically, pressing the physical buttons, or changes made by the WeChat mini program. In those cases, auto-off will not work, and the accessory status may be out-of-sync. So generally, this plugin is not expected to be used alone.

As both this plugin and the WeChat mini program use the same BLE protocol, only one of them can connect at the same time (as long as this plugin is enabled and started, even if the accessory is not added to Home). Disable this plugin first before using the mini program.

Internally, customized worldline 1 and 2 is mapped to the original customized worldline 1 and 2. Worldline 3 is the saved random. Worldline 4 is the software off. Physical worldline buttons on the meter are updated once the corresponding worldlines are set once (but remember that this plugin is not aware of physical actions).