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

@vanackej/risco-mqtt-local

v0.4.2

Published

Node Risco Mqtt using local panel API

Downloads

69

Readme

license badge Package Version Docker Pulls Node Version Maintenance badge

Add to Home Assistant

Risco MQTT Local integration

Provide Risco alarm panels integration to Home Assistant using Local TCP communication with Panel (no cloud access required)

This project is a fork of risco-mqtt-home-assistant by Alessandro Mancini, using local APIs instead of RiscoCloud APIs. Local APIs are based on TJForc local RISCO communication library

Requirements

  • Node.js (currently tested with >=ver. 10.x)
  • Mqtt Server - e.g. Mosquitto, HiveMQ, etc.
  • Home Assistant

Features

  • Interaction with RISCO alarm control panel using local APIs.
  • Interaction with MQTT Alarm Control Panel integration in Home Assistant.
  • Interaction with MQTT Binary Sensor integration in Home Assistant.
  • Home Assistant MQTT Auto Discovery.
  • RISCO multipartitions.
  • Bypass zones in Home Assistant (additional switch created for each zone)

Installation

npm install @vanackej/risco-mqtt-local

Configuration

Create a file config.json in your project directory.

{
  "log": "info", // Optional, default to "info"
  "panel": {
    "panelIp": "192.168.1.150",
    "panelPort": 1000,
    "panelPassword": "1234",
    "panelId": 1,
    "watchDogInterval": 10000
  },
  "ha_discovery_prefix_topic": "homeassistant" //Optional
  "mqtt": {
    "url": "mqtt://192.168.1.10:1883",
    "username": "MQTT_USERNAME",
    "password": "MQTT_PASSWORD"
  },
  "zones": {
    "default": { // Default zones configuration
      "off_delay": 30, // Optional auto off configuration for detectors. 0 to disable (default value: disabled)
      "name_prefix": "Sensor - " // A common prefix, added before all zone name
    },
    "GARAGE": { // Override config for an individual zone (based on zone label)
      "off_delay": 0, // Disable off_delay for this zone.
      "device_class": "garage_door", // override device class for binary sensor. default to "motion". see HA documentation for available values
      "name": "Garage Door", // Override default name for this zone. Default to zone label
      "name_prefix": "" // Force zone name prefix to empty for this zone
    }
  }
}

The panel full configuration options are described here : https://github.com/vanackej/risco-lan-bridge#configuration

NB Ensure that zone description matches label stored in panel exactly (including case) to ensure that config is correctly represented.

Subscribe Topics

risco-mqtt-local subscribes at startup one topic for every partition in your risco alarm panel configuration.

Topics format is riscopanel/alarm/<partition_id>/set where partition_id is the id of the partition

Payload could be : disarmed if risco panel is in disarmed mode,armed_home if risco panel is in armed at home mode and armed_away if risco panel is in armed away mode.

Publish Topics

risco-mqtt-local publishes one topic for every partition and for every zones in your risco alarm panel configuration.

Partitions topics format is riscopanel/alarm/<partition_id>/status where partition_id is the id of the partition

Payload could be : disarmed if risco panel is in disarmed mode,armed_home if risco panel is in armed at home mode and armed_away if risco panel is in armed away mode.

Zones topics format is riscopanel/alarm/<partition_id>/sensor/<zone_id>/status where partition_id is the id of the partition and zone_id is the id of the zone.

Payload could be : triggered if zone is curently triggered, and idle if zone is currently idle.

In addition to every zones, risco-mqtt-local publishes a topic for every zone with all the info of the zone in the paylaod in json format. Topics format is riscopanel/alarm/<partition_id>/sensor/<zone_id> where partition_id is the id of the partition and zone_id is the id of the zone.

Home Assistant Auto Discovery

risco-mqtt-local supports mqtt auto discovery feature.

Default <discovery_prefix> is homeassistant. You can change it by overwriting the value within home-assistant-discovery-prefix config.

Home assistant auto discovery republished on Home Assistant restart.

Usage

First, create the config.json file.

Using Node

To start risco-mqtt-local you can simply type:

npx @vanackej/risco-mqtt-local

Using Docker image

docker run -v $(pwd)/config.json:/data/config.json vanackej/risco-mqtt-local

Credits

Thanks to TJForc for the local communication library and Alessandro Mancini for his initial work