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

pimatic-mesh

v0.2.3

Published

Pimatic Plugin to connect devices of remote Pimatic systems

Downloads

25

Readme

pimatic-mesh

A plugin for interconnecting Pimatic systems. This plugin is based on pimatic-remote from mwittig and is extended with devices and a multi-remote capability.

The pimatic-mesh plugin connects one or more remote Pimatic systems to the Pimatic system of this plugin. In the plugin the most common devices are supported. There are two typical use cases for this plugin.

  1. When you want to migrate from a node v4 system to a node v8/v10 system, sometimes one or more plugins are not supporting node v8/v10 and these plugin are blocking the upgrade. With this plugin you can leave the devices, of those node v4 only plugins, on the old system and use pimatic-mesh to connect them to the new system. There's a tradeoff. Because you create new device types for the (remote) devices, you need to update the device config with the new mesh device classes. The mesh device ID and Name can stay the same, so rules do not have to change.

  2. Create a distributed Pimatic system. The plugin can be installed on more than 1 system and so you can configure backup, distribute complexity and get flexibility for future migration. Mesh devices can be link to each other system, but be careful not to create loops.

The Pimatic remote systems can be configured in the plugin config. Per remote you need to configure the following parameters.

{
  "id": name for the remote system that is used in the mesh device setup
  "url": the url of the remote system
  "username": the Pimatic username for the remote system
  "password": the Pimatic password for the remote system
}

Per mesh device you can choose which remote Pimatic system will be used (via the 'id'). After adding, changing or removing remote Pimatic systems in the plugin config, you need to restart Pimatic.

The supported mesh devices are switch, contact, dimmer, presence, temperature and variable. The remote switch and dimmer can be controlled from the switch and dimmer mesh device. From all devices you get data like state, level, etc, depending on the device type. Variables from remote devices can be obtained via the mesh variables device.

An example. You configured the plugin for the remote Pimatic and 'id' it as 'pimatic1'. You want the data of a Luftdaten device from that remote system. The device id is 'airquality-outside-home' and the attributes you want are 'PM10' and 'PM25'. You create a mesh variables device with the following config.

{
  "id": "air-quality",
  "name": "air quality",
  "class": "PimaticRemoteVariables"
  "remotePimatic": "pimatic1",
  "variables": [
    {
      "name": "pm10",
      "remoteDeviceId": "airquality-outside-home",
      "remoteAttributeId": "PM10",
      "type": "number"
    }
    {
      "name": "pm25",
      "remoteDeviceId": "airquality-outside-home",
      "remoteAttributeId": "PM25",
      "type": "number"
    }
  ],
  "xAttributeOptions": []
}

Now you created a mesh device with the id "air-quality" and the attributes "pm10" and "pm25". The pm10 and pm25 data will come from the remote system and will become visible as soon as the remote systems values change.

The Discover Devices function is available for the devices Switch, Dimmer and Buttons Devices and Contact and Presence Sensors. Also all variables will be discovered. Per remote device a MeshVariablesDevice is presented with the all the attributes of that remote device.

There can be overlap in getting remote values. For example if you want the temperature/humidity of a remote sensor you can use the MeshTemperatureDevice or the MeshVariablesDevice. But for sensors values the MeshVariablesDevice is the most flexible and should be used. And with the Discovery function is should be easy to add.


The plugin is Node v10 compatible and in development.

You could backup Pimatic before you are using this plugin!