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-athome

v0.9.1

Published

pimatic plugin to communicate with an arduino.

Downloads

4

Readme

pimatic-athome

This is a pimatic plugin which allows you to connect an Arduino compatible micro-controller over the serial port to the pimatic home automation framework.

In general you can use the plugin and micro-controller source code as a starting point for your specific needs. It shows you, how to setup the communication between PI/Pimatic and the controller board using a serial connection, a separate USB to serial converter or the build in serial port with boards like the Arduino nano.

The source code for the micro-controller is available here.

Installation

To enable the AtHome plugin add this section to your config.json file.

...
{
  "plugin": "athome",
  "serialDeviceName": "/dev/ttyUSB0",
  "demo": true,
}
...

You may need to change the name of the serial device. This depends on your configuration. On the Raspberry Pi it looks like '/dev/ttyUSB0'. On my MacBook it is something like '/dev/tty.usbserial-A401159R' for an FTDI based USB to serial converter.

Use

sudo ls /dev

to display the available devices.

This is an example for the devices section in the config.json file.

...
  "devices": [
    {
      "class": "AHSwitchFS20",
      "id": "socketF1",
      "name": "Socket FS20",
      "houseid": "1234",
      "deviceid": "A8"
    },
    {
      "class": "AHSwitchElro",
      "id": "socketE1",
      "name": "Socket Elro",
      "houseid": "11011",
      "deviceid": "10000"
    },
    {
      "class": "AHRCSwitchElro",
      "id": "remoteswitch1",
      "name": "Remote Switch D",
      "houseid": "11011",
      "deviceid": "00010"
    },
    {
      "class": "AHSensorValue",
      "id": "valueWater",
      "name": "Water",
      "sensorid": "2",
      "label": "Water volume",
      "unit": "l"
    },
    {
      "class": "AHSensorValue",
      "id": "valueTemperature",
      "name": "Temperature Living Room",
      "sensorid": "10",
      "label": "Temperature",
      "unit": "°C"
    },
    {
      "id": "keypad",
      "name": "Keypad",
      "class": "AHKeypad",
      "buttons": [
        { "id": "0", "text": "0" },
        { "id": "1", "text": "1" },
        { "id": "2", "text": "2" },
        { "id": "3", "text": "3" },
        { "id": "4", "text": "4" },
        { "id": "5", "text": "5" },
        { "id": "6", "text": "6" },
        { "id": "7", "text": "7" },
        { "id": "8", "text": "8" },
        { "id": "9", "text": "9" },
        { "id": "A", "text": "A" },
        { "id": "B", "text": "B" },
        { "id": "C", "text": "C" },
        { "id": "D", "text": "D" },
        { "id": "#", "text": "#" },
        { "id": "*", "text": "*" }
      ]
    }
  ],