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-homeduino-dst-dev

v0.8.40-beta-3.1

Published

pimatic plugin to use various 433mhz devices, sensors and more with an arduino.

Downloads

6

Readme

pimatic-homeduino

Plugin for using various 433mhz devices and sensors with a connected arduino with homeduino sketch or directly with capable hardware like the Raspberry Pi.

This plugins supports all 433mhz devices with rfcontroljs protocol implementations.

Drivers

The plugin can be used with two differend hardware combinations:

  • A. Computer with connected arduino (with homeduino sketch) and 433mhz transmitter and receiver (recommended)
  • B. Raspberry Pi (or Banana Pi or Hummingboard) with 433mhz transmitter and receiver

A.Connected arduino (recommended)

Hardware


You can load the plugin by editing your config.json to include:

{
  "plugin": "homeduino",
  "driver": "serialport",
  "driverOptions": {
    "serialDevice": "/dev/ttyUSB0",
    "baudrate": 115200
  },
  "receiverPin": 0,
  "transmitterPin": 4
}

in the plugins section. For all configuration options see homeduino-config-schema

The pin numbers are arduino pin numbers. The receiverPin must be either 0 (INT0) or 1 (INT1). The transmitterPin can must bq a digitial pin between 2 (D2) and 13 (D13) .

nano-pins

B. Raspberry Pi with ATTiny45 / 85 Prefilter

You can load the plugin by editing your config.json to include:

{
  "plugin": "homeduino",
  "driver": "gpio",
  "driverOptions": {},
  "receiverPin": 0,
  "transmitterPin": 4
}

in the plugins section. For all configuration options see homeduino-config-schema

The pin numbers are wiringPi pin numbers.

Devices

Devices must be added manually to the device section of your pimatic config.

A list with all supported protocols and protocol-options can be found here.

weather-station sensor example:

This is the basic sensor with only temperature and humidity

{
  "id": "rftemperature",
  "name": "Temperature",
  "class": "HomeduinoRFTemperature",
  "protocols": [{
    "name": "weather2",
    "options": {
      "id": 42,
      "channel": 1
    }
  }]
}

For weather stations like the Alecto WS-4500 you should use the weatherstation device

{
  "id": "weatherstation",
  "name": "Weather Data",
  "class": "HomeduinoRFWeatherStation",
  "protocols": [
    {
      "name": "weather5",
      "options": {
        "id": 120
      }
    }
  ],
  "values": [
    "rain",
    "temperature",
    "humidity"
  ]
},

It supports different values to display rain, temperature, humidity, windGust, windDirection and avgAirspeed The order of the listed values define the order of the displayed values.

For protocol options see:

switch example:

{
  "id": "rfswitch",
  "name": "RFSwitch",
  "class": "HomeduinoRFSwitch",
  "protocols": [{
    "name": "switch1",
    "options": {
      "id": 42,
      "unit": 0
    }
  }]
}

A switch (and other devcies) can be controled or send to outlets with multiple protocols. Just add more protocols to the protocols array. You can also set if a protocols is used for sending or receiving. Default is true for both.

Multi protocol switch example:

    {
      "id": "switchmp",
      "name": "Multi Switch",
      "class": "HomeduinoRFSwitch",
      "protocols": [
        {
          "name": "switch1",
          "options": {
            "id": 9509718,
            "unit": 0
          },
          "send": true,
          "receive": true
        },
        {
          "name": "switch1",
          "options": {
            "id": 9509718,
            "unit": 1
          },
          "send": false,
          "receive": true
        }
      ]
    }

DHT11/22 sensor example:

{
  "id": "homeduino-temperature",
  "name": "DHT",
  "class": "HomeduinoDHTSensor",
  "type": 22,
  "pin": 13
}

DST Dallas DS18B20 sensor example:

{
  "id": "homeduino-temperature-dst",
  "name": "DST",
  "class": "HomeduinoDSTSensor"
}

PIR sensor example:

{
  "id": "homeduino-pir",
  "name": "PIR",
  "class": "HomeduinoRFPir",
  "protocols": [{
    "name": "pir1",
    "options": {
      "unit": 0,
      "id": 17
    }
  }],
  "resetTime": 6000
}

Contact sensor example:

{
  "id": "homeduino-contact",
  "name": "Contact",
  "class": "HomeduinoRFContactSensor",
  "protocols": [{
    "name": "contact1",
    "options": {
      "unit": 0,
      "id": 42
    }
  }]
}

Some contact only emit an event on open, For this you can set autorReset to true:

{
  "id": "door-contact",
  "name": "door-Contact",
  "class": "HomeduinoRFContactSensor",
  "protocols": [
    {
      "name": "contact2",
      "options": {
        "id": 43690
      }
    }
  ],
  "autoReset": true,
  "resetTime": 3000
}

Shutter sensor example:

Can use switch protocols.

{
  "id": "homeduino-contact",
  "name": "Shutter Controller",
  "class": "HomeduinoRFShutter",
  "protocols": [{
    "name": "switch1",
    "options": {
      "unit": 0,
      "id": 42
    }
  }]
}

Generic RF Sensor with arduino sender

{
  "id": "homeduino-generic-sensor",
  "name": "RFGenericSensor",
  "class": "HomeduinoRFGenericSensor",
  "protocols": [{
    "name": "generic",
    "options": {
      "id": 42
    }
  }],
  "attributes": [
    {
      "name": "temperature",
      "type": 3,
      "decimals": 2,
      "baseValue": 0,
      "unit": "°C",
      "label": "Temperature"
    }
  ]
}

Buttons Device example:

{
  "id": "homeduino-buttons",
  "name": "Buttons",
  "class": "HomeduinoRFButtonsDevice",
  "buttons": [
    {
      "id": "test-button",
      "text": "test",
      "protocols": [{
        "name": "switch1",
        "options": {
          "unit": 0,
          "id": 42,
          "state": true
        }
      }]
    }
  ]
}

Dimmer device example:

{
  "id": "dimmer",
  "name": "Dimmer",
  "class": "HomeduinoRFDimmer",
  "protocols": [
    {
      "name": "dimmer1",
      "options": {
        "id": 7654321,
        "unit": 0
      },
      "send": true,
      "receive": true
    }
  ]
},

pin switch example:

Only works with an arduino. pin: 13 = digital pin 13 (LED on arduino nano).

{
  "id": "pin-switch",
  "name": "Pin Switch",
  "class": "HomeduinoSwitch",
  "inverted": false,
  "pin": 13
}

AnalogSensor example:

A AnalogSensor can read analog pins of the arduino and display there value. An optional preprocessing can be applied. Pin numbering starts at 14 (A0) for the first analog pin.

{
  "id": "homeduino-analog-sensor",
  "name": "AnalogSensor",
  "class": "HomeduinoAnalogSensor",
  "attributes": [
    {
      "name": "voltage",
      "unit": "V",
      "label": "Voltage",
      "pin": 14,
      "interval": 5000,
      "processing": "($value / 1023) * 5"
    }
  ]
}

The analog value is between 0 and 1023 and can be preprocessed by an expression. In this example the value is scale to a value between 0 and 5.