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-unipi-evok

v0.3.3

Published

Pimatic Plugin for UniPi boards and Neuron PLCs using Evok 2.0 - http://www.unipi.technology

Downloads

7

Readme

pimatic-unipi

Dependency Status npm version Build Status

Pimatic Plugin for the UniPi board based on the Evok UniPi API. The plugin has been tested with Evok 2.0 using a UniPi 1.1 board. It should also work UniPi Lite and Neuron boards. Note, Evok 1.0 is no longer supported.

Contributions

If you like this plugin, please consider ★ starring the project on github. Contributions to the project are welcome. You can simply fork the project and create a pull request with your contribution to start with.

Getting Started

To be able to use the plugin you need to install Evok 2.0 on the Raspberry Pi mounted on the UniPi board. Pimatic can either be installed on the same Raspberry Pi or on another host on the local network. Note, Evok 1.0 is also known to work, but will no longer be supported.

Plugin Configuration

You can load the plugin by editing your config.json to include the following in the plugins section. You need to provide the URL of the Evok Web Server.

{
   "plugin": "unipi-evok",
   "url": "http://unipi.fritz.box"
}

The plugin has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | url | - | String | URL of the Evok Web Server | | debug | false | Boolean | Provide additional debug output if true | | timeout | 10 | Number | Timeout in seconds for HTTP REST Requests |

Device Configuration

As of pimatic version 0.9, devices can be added easily using the discovery function of the pimatic frontend. However, if you wish to add devices directly to the config file instead, snippets are provided for all device types.

Relay Device

The Relay Device is based on the PowerSwitch device class. You need to provide the circuit id as shown by Evok.

{
      "id": "unipiRelay-1",
      "class": "UniPiRelay",
      "name": "Relay 1",
      "circuit": "1"
}

The Relay Device has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | circuit | "1" | String | Circuit id as shown by Evok |

The Relay Device exhibits the following attributes:

| Property | Unit | Type | Acronym | Description | |:--------------|:------|:--------|:--------|:---------------------------------------| | state | - | Boolean | - | Switch State, true is on, false is off |

The following predicates and actions are supported:

  • {device} is turned on|off
  • switch {device} on|off
  • toggle {device}

Digital Output Device (Neuron Boards)

The Digital Output Device is based on the PowerSwitch device class. You need to provide the circuit id as shown by Evok.

{
      "id": "unipiRelay-1",
      "class": "UniPiRelay",
      "name": "Relay 1",
      "circuit": "1"
}

The Digital Output Device has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | circuit | "1" | String | Circuit id as shown by Evok |

The Digital Output Device exhibits the following attributes:

| Property | Unit | Type | Acronym | Description | |:--------------|:------|:--------|:--------|:---------------------------------------| | state | - | Boolean | - | Switch State, true is on, false is off |

The following predicates and actions are supported:

  • {device} is turned on|off
  • switch {device} on|off
  • toggle {device}

Digital Input Device

The Digital Input Device is based on the ContactSensor device class. You need to provide the circuit id as shown by Evok.

{
      "id": "unipiDigitalInput-1",
      "class": "UniPiDigitalInput",
      "name": "Digital Input"
      "circuit": "1"
}

The Digital Input Device has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | circuit | "1" | String | Circuit id as shown by Evok |

The following predicates are supported:

  • {device} is opened|closed

Analog Input Device

The Analog Input Device is based on the Sensor Device device class. You need to provide the circuit id as shown by Evok.

{
      "id": "unipiAnalogInput-1",
      "class": "UniPiAnalogInput",
      "name": "Analog Input",
      "circuit": "2"
}

The Analog Input Device has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | circuit | "1" | String | Circuit id as shown by Evok |

The Analog Input Device exhibits the following attributes:

| Property | Unit | Type | Acronym | Description | |:--------------|:------|:--------|:--------|:---------------------------------| | inputVoltage | V | Number | U | Input Voltage |

The following predicates are supported:

  • inputVoltage of {device} is equal to | is less than | is greater than {value}, more comparison operators are supported

Analog Output Device

The Analog Output Device is based on the DimmerActuator device class.

{
      "id": "unipiAnalogOutput-1",
      "class": "UniPiAnalogOutput",
      "name": "Analog Output",
      "circuit": "1"
}

The Analog Output Device has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | circuit | "1" | String | Circuit id as shown by Evok |

The Analog Output Device exhibits the following attributes:

| Property | Unit | Type | Acronym | Description | |:--------------|:------|:--------|:--------|:---------------------------------| | outputVoltage | V | Number | U | Output Voltage | | dimlevel | - | Number | - | 0-100% (Output Voltage Control) |

The following predicates and actions are supported:

  • outputVoltage of {device} is equal to | is less than | is greater than {value}, more comparison operators are supported
  • dim {device} to {Value}, where {Value} is 0-100

Temperature Device

The Temperature Device is based on the TemperatureSensor device class.

{
  "id": "unipiTemperature-1",
  "class": "UniPiTemperature",
  "name": "Temperature",
  "circuit": "2832ECD906000025"
}

The Temperature Device has the following configuration properties:

| Property | Default | Type | Description | |:----------|:---------|:--------|:--------------------------------------------| | circuit | "1" | String | Circuit id as shown by Evok |

The Temperature Device exhibits the following attributes:

| Property | Unit | Type | Acronym | Description | |:--------------|:------|:--------|:--------|:---------------------------------| | temperature | °C | Number | T | Temperature |

The following predicates are supported:

  • temperature of {device} is equal to | is less than | is greater than {value}, more comparison operators are supported

Trouble Shooting

  • "Error: unable to get status for device circuit ... Internal Server Error (500)"

    If you get this error occasionally, it most likely occurs because you have setup a pimatic device with a circuit id which no longer exist in your Evok configuration, e.g. a 1wire sensor which has been unplugged from the the board.

  • "TypeError: Buffer.alloc is not a function" during installation

    Make sure, you have node version 4.5 or greater installed.

Acknowledgments

I would like to thank UniPi.technology for providing me with a UniPi 1.1 board for development. In particular, I would like to thank Tomáš Hora for his excellent support!

History

See Release History.

License

Copyright (c) 2015 - 2020, Marcus Wittig and contributors

All rights reserved.

MIT