Giter VIP home page Giter VIP logo

pulse-adapter's Introduction

Pulse Adapter

This is basically an On/Off switch which turns itself off after some configured amount of time.

This can be useful when combined with real devices using the rules engine.

Configuration

name

Sets the name of the device. This must be unique

duration

The amount of time, in seconds, before the device will turn itself off.

invert

If checked, inverts the on/off behaviour. The device starts out on and turning it off will trigger timer, and it will turn itself back on after the timer expires.

pulse-adapter's People

Contributors

dhylands avatar freaktechnik avatar hobinjk avatar mozilla-github-standards avatar mrstegeman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pulse-adapter's Issues

Add configuration setting to modify what happens when source is re-triggering

I have PIR sensor connected to RPi via GPIO adapter, I set PIR sensor to turn off ASAP (goes off after ~2 sec). I did that because I want to control duration via Pulse adapter which allows me to modify duration of time lights are turned on from gateway settings.

I have pulse duration set to 30 sec, which is more than enough if someone is just passing trough hallway.

But if someone is in hallway dressing for, lets say 70 sec, and keeps triggering PIR sensor, lets say every 20 seconds. What happens now is, after 30sec it's turned off and after 10 sec when PIR sensor detects person is still in room turns light back on.

What I would prefer is, that Pulse adapter has boolean setting which allows me to say that every time input in Rules engine is turned on to re-start timer of 30 sec again.

Something to also consider, additional setting to turn on as soon as input turns on and start time after input state is turned off instead when it's turned on.

Expand description

The current description is a bit terse - it doesn't explain what the add-on does and why I would want it. At first I thought perhaps Pulse was a brand name.

Renaming in settings/addons invalidates device

Problem:
Altering the name in settings/add-ons causes the device in things to become invalid.

Expected behavior:
Altering the name in settings/add-ons propagates that name change to the thing (if they match), or at least doesn't invalidate the thing.

BTW, I've evaluated pretty much all of the FOSS Home IOT/Automation things out there, and for install and usage, you guys are pretty darn solid. Thanks for your work on this.

How to use

Configured, set time limit to 15 seconds. I assume I should create a rule, but this does not show up as a device. Rebooted several times.

Names can generate invalid IDs

Since the name is essentially used as the thing ID, the user can mess things up. For instance, if a / is used in the name, the UI will not work for that device, as the URL path will end up being wrong.

An easy way around this is to hash the name, which is what we do for the weather adapter. However, that will cause users to have to remove and re-add their devices.

Pulse things with space in name lose connectivity

WebThings Gateway 0.10

STR:

  • Install pulse adapter
  • Configure adapter
  • Add configuration with a space in the name field
  • Save
  • Add a pulse thing with a space in the name
  • Navigate to pulse thing page & reload

Expected:

  • Pulse works as expected

Actual:

  • Pulse thing is dimmed

Error message in WebSocket:
{"messageType":"error","data":{"code":400,"status":"400 Bad Request","message":"Thing pulse-bar%20baz not found","request":{"id":"pulse-bar%20baz","messageType":"addEventSubscription","data":{"turnedOn":{},"turnedOff":{}}}}}

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please reach out to [email protected].

(Message COC001)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.