Coder Social home page Coder Social logo

openhab-rules's People

Contributors

yfaway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openhab-rules's Issues

Add UI options to pause mindfulness bell

Use case: casting music to Google devices. When the periodic mindfulness bell is played, the casted music can't be resumed (but MP3 URI will be able to).

Add UI dropdown list containing options 15', 30', 1hr, 2hr, 3hr. The mindfulness bell will be paused for the associated amount of time.

Get rid of mqtt add-on warnings

2020-10-12 22:15:22.162 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'mqttConnections.things', using it anyway:
Provide a thing type ID and a thing ID in this format:

Provide a thing type ID and a thing ID in this format:

Provide a thing type ID and a thing ID in this format:

Provide a thing type ID and a thing ID in this format:

Provide a thing type ID and a thing ID in this format:

Monitor WiFi devices similar to battery-powered devices

The current WiFi devices (garage opener and smart plugs) use 2.4 GHz band, which isn't very stable on the current router. They could go offline without being noticed. When that happens, the solution is to restart the router.

Scope: monitor these devices similar to battery-powered devices, and send an email if they aren't active recently.

Use zigbee2mqtt attribute output to simplify json transformation in OH

This is an experimental features.

Optional: experimental options
experimental:
Optional: MQTT output type: json, attribute or json_and_attribute (default: shown below)
Examples when 'state' of a device is published
json: topic: 'zigbee2mqtt/my_bulb' payload '{"state": "ON"}'
attribute: topic 'zigbee2mqtt/my_bulb/state' payload 'ON"
json_and_attribute: both json and attribute (see above)
output: 'json'

See https://community.openhab.org/t/zigbee2mqtt-revisited-no-more-ugly-transformations/86362.

Put triggering events inside the action

Today, to add an action to a zone, one has to do something like this:
zone.addAction(action, [ZoneEvent.MOTION, ...]
However, an action already know which events it handles. As such the API can be simplified to:
zone.addAction(action).
Each action needs to expose a new method getEvents() : list.

Create an EventInfo to dispatch event meta to the zone actions

Current the zone's Action::onAction is invoked with between 3 and 4 parameters. As new requirement is introduced, more params are added. But that causes change in the method signature and require update to many actions.

Scope: move these params into a wrapper object EventInfo. That will allow adding more info to an event without having to change all existing actions.

Beef up the handling of critical alert

Critical alert is currently handled by playing a loud TTS (event at sleep time) and sending an email.

Need to enhance this further to repeat the TTS couple of times, and to turn on all lights if it is evening time.

Update the github readme.md file to outline 3 separate areas

Have 3 sections:

  1. Smart home concept/examples with no specific mentioning to hardware.
  2. Hardware to back-up 1 above.
  3. Software implementation.

People might not be interested in the implementation, but they might be interested in operation concepts/examples.

Add virtual zone device to hold the user and admin email addresses

Since the AlertManager already relies on the ZoneManager to determine the ActivityTimes (to adjust the audio alert volume), it makes sense to hold the alert user/admin email address in a virtual device. A rule can create the virtual device by reading the email addresses from config file and inject it into one of the zone.

Alert: add sending alert to system admin

Instead of sending email alert to everyone in a household. Certain events only make sense to send to the admin of the house. This helps to reduce noises to regular user.

Add method AlertManager::processAdminAlert(alert)

Simulate owner presence during day time

Purpose: avoid breaking in during day time when thief thinks no one at home
Require: motion sensor at porch area, presence sensor (or security system), and audio device inside the house.
Play loud music when exterior motion sensor is triggered and if the house is armed.

Push the occupancy state down to the devices

Currently the zone exposes isOccupied() method, and the implementation is done by looking at a few known devices to determine the last usage time. This is not scalable and requiring hardcoding the device types.

A better approach is to add an abstract method Device::isOccupied() or Device::indicateOccupancy(). The Zone class can then just loop through the devices without the need to know their types.

Make alert_manager non-singleton and add it to script context

The original implementation of alert_manager has to be a singleton with a bunch of static methods due to the inability to make an instance available in the script context.
This is now possible. Scope:

  • Make AlertManager a non-singleton.
  • Add it to the script context under the var alertManager.
  • Update existing references.

Unit tests: Skip the asynchronous scope.events dispatcher and change the item state directly

In production code the scope.events is used to deliver command to an item (that is backed by an actual binding). This is an asynchronous action. In the unit testing, to test if the state has been changed correctly, an artificial delay has to be inserted to wait for the event to be processed by the binding. This increases the duration of the test, and is also not reliable. Depends on the load of the system, it might takes longer to process the event.

Scope:

  • Add getEventDispatcher in the unittest super class. When it receives sendCommand, attempt to change the item state directly.
  • Change test code to remove all time.sleep().

Scare the thief when alarm system is triggered

Can do the followings:

  1. Turn on all lights if it is light-on time.
  2. Play loud TTS on the main floor audio sink. E.g. playing this sequence "Communicating with the alarm monitoring company.", , then continue to repeat "Police has been dispatched" ...

Add audio device

Will be backed by the Chromcast binding. List of functions:

  1. playTts()
  2. playStream()
  3. playFile()
  4. isPlaying()

Extend switch timer when turned on immediately after turned off

If the user turns on a switch immediately after it was turned off, that indicates that the user would like to keep the switch on a bit longer. Also the zone doesn't have any other device that would extend the switch's timer.

As such, the switch needs to set the timer to a longer period than usual. Say 2.x times.

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.