Updated external content (Jenkins build 413)

pull/1569/head
openHAB Build Server 2021-04-30 18:55:51 +00:00
parent de02b56a39
commit adc093d680
8 changed files with 357 additions and 2 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

@ -0,0 +1,153 @@
---
id: ahawastecollection
label: aha Waste Collection
title: aha Waste Collection - Bindings
type: binding
description: "This binding provides information about the upcoming waste collection dates for places, that are served by aha, the waste collection company for the region of Hannover. The values are retrieved from the online aha waste collection schedule available at: [aha Abfuhrkalender](https://www.aha-region.de/abholtermine/abfuhrkalender)."
since: 3x
install: manual
---
<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->
{% include base.html %}
# aha Waste Collection Binding
This binding provides information about the upcoming waste collection dates for places, that are served by aha, the waste collection company for the region of Hannover. The values are retrieved from the online aha waste collection schedule available at: [aha Abfuhrkalender](https://www.aha-region.de/abholtermine/abfuhrkalender).
## Supported Things
- **collectionSchedule:** Represents the connection to the **aha Waste Collection Schedule** with four channels for the different waste types.
## Discovery
Discovery is not possible, due some form input values from the website above are required.
## Thing Configuration
For configuration of the **collectionSchedule** thing, you need the form inputs from the aha collections schedule web page. Follow the steps below to get the required configuration parameters from the form input values.
1. Open [aha Abfuhrkalender](https://www.aha-region.de/abholtermine/abfuhrkalender) in your favorite brower with developer-console.
2. Open the developer console and switch to network tab (for example press F12 in chrome / edge / firefox).
3. Fill in the form: Select your commune, Street and house number and hit "Suchen".
4. Select the first request to https://www.aha-region.de/abholtermine/abfuhrkalender (see first screenshot below)
5. Check the form data at the end of the request for the form values (see second screenshot below)
5. Fill in the values from the form input in thing configuration (see examples below)
![Chrome Developer Console Top](doc/images/ChromeDevconsoleTop.png "Chrome Developer Console showing request URL")
*Check if you've selected the correct request, that contains the form data*
![Chrome Developer Console Bottom](doc/images/ChromeDevconsoleBottom.png "Chrome Developer Console showing form inputs")
*Grab the values for the configuration parameters from the form data section at the end of the request*
**collectionSchedule** parameters:
| Property | Default | Required | Description |
|-|-|-|-|
| `commune` | | Yes | The selected commune, taken from the form field `gemeinde`. |
| `street` | | Yes | The selected street, taken from the form field `strasse`. This value must look like 67269@Rosmarinweg+/+Kirchhorst@Kirchhorst |
| `houseNumber` | | Yes | The selected house number, taken from the form field `hausnr`. |
| `houseNumberAddon` | | No | The selected house number addon, taken from the form field `hausnraddon`, may be empty. |
| `collectionPlace` | | Yes | Form value for the collection place, taken from the form field `ladeort`. This value must look like 67269-0010+ |
## Channels
The thing **aha Waste Collection Schedule** provides four channels for the upcoming day of waste collection for the different waste types.
| channel | type | description |
|----------|--------|------------------------------|
| generalWaste | DateTime | Next collection day for general waste |
| leightweightPackaging | DateTime | Next collection day for leightweight packaging |
| bioWaste | DateTime | Next collection day for bio waste |
| paper | DateTime | Next collection day for paper |
## Full Example
wasteCollection.things
```
Thing ahawastecollection:collectionSchedule:wasteCollectionSchedule "aha Abfuhrkalender" [ commune="Isernhagen", street="67269@Rosmarinweg+/+Kirchhorst@Kirchhorst", houseNumber="10", houseNumberAddon="", collectionPlace="67269-0010+" ]
```
wasteCollection.items
```
DateTime collectionDay_generalWaste "Next general waste collection" {channel="ahawastecollection:collectionSchedule:wasteCollectionSchedule:generalWaste"}
DateTime collectionDay_leightweightPackaging "Next lightweight packaging collection" {channel="ahawastecollection:collectionSchedule:wasteCollectionSchedule:leightweightPackaging"}
DateTime collectionDay_bioWaste "Next bio waste collection" {channel="ahawastecollection:collectionSchedule:wasteCollectionSchedule:bioWaste"}
DateTime collectionDay_paper "Next paper collection" {channel="ahawastecollection:collectionSchedule:wasteCollectionSchedule:paper"}
```
Example for rule that sends an notification with collected waste types on day before collection
```
triggers:
- id: "1"
configuration:
time: 18:00
type: timer.TimeOfDayTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/javascript
script: >-
// Determine next day with time 00:00:00
var today = items['LokaleZeit_DatumundZeit'];
var tomorrow = today
.getZonedDateTime()
.plusDays(1)
.withHour(0)
.withMinute(0)
.withSecond(0)
.withNano(0);
// Get next collection dates from items
var biomuellDate = items['collectionDay_bioWaste'].getZonedDateTime();
var leichtverpackungDate = items['collectionDay_leightweightPackaging'].getZonedDateTime();
var papierDate = items['collectionDay_paper'].getZonedDateTime();
var restmuellDate = items['collectionDay_generalWaste'].getZonedDateTime();
// Check which waste types are collected on the next day
var biomuellCollection = biomuellDate.equals(tomorrow);
var leichtverpackungCollection = leichtverpackungDate.equals(tomorrow);
var papierCollection = papierDate.equals(tomorrow);
var restmuellCollection = restmuellDate.equals(tomorrow);
// Transfer booleans to waste type names
var toBeCollected = [];
if (biomuellCollection) {
toBeCollected.push('bio waste');
}
if (leichtverpackungCollection) {
toBeCollected.push('leihtweight packaging');
}
if (papierCollection) {
toBeCollected.push('paper');
}
if (restmuellCollection) {
toBeCollected.push('general waste');
}
// Send message (or something else) if at least one waste type is collected
if (toBeCollected.length > 0) {
var message = "Tomorrow the following waste will be collected:\n" + toBeCollected.join(', ');
events.sendCommand('SignalSmartHome_Eingabewert', message);
}
type: script.ScriptAction
```

View File

@ -0,0 +1,60 @@
---
id: hccrubbishcollection
label: HCC Rubbish Collection
title: HCC Rubbish Collection - Bindings
type: binding
description: "A Hamilton City Council (NZ) _'Fight the Landfill'_ binding."
since: 3x
install: manual
---
<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->
{% include base.html %}
# HCC Rubbish Collection Binding
A Hamilton City Council (NZ) _"Fight the Landfill"_ binding.
This binding will keep track of your rubbish collection days and uses the [Fight the Landfill](https://www.fightthelandfill.co.nz/) website API to fetch the upcoming collection dates.
## Supported Things
A single supported thing called `collection`.
## Thing Configuration
The thing supports one setting labelled `address` which is your street number and name as it appears on Google.
*For Example:
1 Victoria Street*
> Note: The above address example is not valid as it is a business address.
*__If the address is not valid or rubbish collection service does not apply (for example, a business address) then a `CONFIGURATION_ERROR` will occur.__*
## Channels
| channel | type | description |
| ---------------- | ------ | -------------------------------------------------------------------- |
| day | Number | The upcoming rubbish collection day of the week (1=Monday, 7=Sunday) |
| general | Date | The next general household (red bin) collection day |
| recycling | Date | The next recycling (yellow bin, glass bin) colleciton day |
| collection-event | Event | Event trigger on the day of the rubbish |
### Collection Event
The collection event `collection-event` triggers on the day of rubbish collection.
#### Events
| event | description |
| --------- | ------------------------------- |
| GENERAL | General household rubbish event |
| RECYCLING | Recycling rubbish event |
#### Configuration
You can set an `offset` in minutes.
This can then trigger the collection event before or after the normal time of 12:00am on the day of the collection.
*For Example:
If you want the event to trigger at 7pm the day before, to remind you to take out the bins, then set the `offset` to `-300` (5 hours x 60 minutes).*

View File

@ -5,7 +5,6 @@ title: macOS Text-to-Speech - Voices
type: voice
description: "The macOS Text-to-Speech (TTS) service uses the macOS 'say' command for producing spoken text."
since: 3x
logo: images/addons/mactts.png
install: auto
---

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="ahawastecollection"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<thing-type id="collectionSchedule">
<label>aha Waste Collection Schedule</label>
<description>aha Waste Collection Schedule from http://www.aha-region.de/abholtermine/abfuhrkalender</description>
<channels>
<channel id="generalWaste" typeId="collectionDateGeneralWaste"/>
<channel id="leightweightPackaging" typeId="collectionDateLeightweightPackaging"/>
<channel id="bioWaste" typeId="collectionDateBioWaste"/>
<channel id="paper" typeId="collectionDatePaper"/>
</channels>
<config-description>
<parameter name="commune" type="text" required="true">
<label>Commune</label>
<description>The selected commune, taken from the form field 'gemeinde'. </description>
</parameter>
<parameter name="street" type="text" required="true">
<label>Street</label>
<description>The selected street, taken from the form field 'strasse'. This value must look like
67269@Rosmarinweg+/+Kirchhorst@Kirchhorst</description>
</parameter>
<parameter name="houseNumber" type="text" required="true">
<label>House Number</label>
<description>The selected house number, taken from the form field 'hausnr'.</description>
</parameter>
<parameter name="houseNumberAddon" type="text" required="false">
<label>House Number Addon</label>
<description>The selected house number addon, taken from the form field 'hausnraddon'.</description>
</parameter>
<parameter name="collectionPlace" type="text" required="true">
<label>Collection Place</label>
<description>Form value for the collection place, taken from the form field `ladeort`. This value must look like
67269-0010+</description>
</parameter>
</config-description>
</thing-type>
<!-- Channel type that represents the collection time of an waste type. -->
<channel-type id="collectionDateGeneralWaste">
<item-type>DateTime</item-type>
<label>General Waste</label>
<description>Next collection day for general waste</description>
<state readOnly="true" pattern="%1$tF"/>
</channel-type>
<channel-type id="collectionDateLeightweightPackaging">
<item-type>DateTime</item-type>
<label>Leightweight Packaging</label>
<description>Next collection day for leightweight packaging</description>
<state readOnly="true" pattern="%1$tF"/>
</channel-type>
<channel-type id="collectionDateBioWaste">
<item-type>DateTime</item-type>
<label>Bio Waste</label>
<description>Next collection day for bio waste</description>
<state readOnly="true" pattern="%1$tF"/>
</channel-type>
<channel-type id="collectionDatePaper">
<item-type>DateTime</item-type>
<label>Paper</label>
<description>Next collection day for paper</description>
<state readOnly="true" pattern="%1$tF"/>
</channel-type>
</thing:thing-descriptions>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="hccrubbishcollection"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<thing-type id="collection">
<label>HCC NZ Rubbish Collection</label>
<description>Rubbish collection days for Hamilton City Council (NZ).</description>
<channels>
<channel id="day" typeId="day"/>
<channel id="recycling" typeId="bin">
<label>Recycling Bin Collection Date</label>
<description>The next collection date of the recycling (yellow bin and green bin).</description>
</channel>
<channel id="general" typeId="bin">
<label>General Bin Collection Date</label>
<description>The next collection date of the general rubbish (red bin).</description>
</channel>
<channel id="collection-event" typeId="collection-event"/>
</channels>
<config-description>
<parameter name="address" type="text" required="true">
<label>Address</label>
<description>The street address to get rubbish collection dates for.</description>
</parameter>
</config-description>
</thing-type>
<channel-type id="day">
<item-type>Number</item-type>
<label>Collection Day</label>
<description>The rubbish collection Day of the Week</description>
<state readOnly="true">
<options>
<option value="1">Monday</option>
<option value="2">Tuesday</option>
<option value="3">Wednesday</option>
<option value="4">Thursday</option>
<option value="5">Friday</option>
<option value="6">Saturday</option>
<option value="7">Sunday</option>
</options>
</state>
</channel-type>
<channel-type id="bin">
<item-type>DateTime</item-type>
<label>Collection Date</label>
<state pattern="%1$tY-%1$tm-%1$td" readOnly="true"></state>
</channel-type>
<channel-type id="collection-event">
<kind>trigger</kind>
<label>Collection Event</label>
<description>Event for the day when collection occurs.</description>
<event>
<options>
<option value="RECYCLING">RECYCLING</option>
<option value="GENERAL">GENERAL</option>
</options>
</event>
<config-description>
<parameter name="offset" type="integer" min="-2880" max="2880" unit="min">
<label>Offset</label>
<description>Moves the event forward or backward (in minutes).</description>
<default>0</default>
</parameter>
</config-description>
</channel-type>
</thing:thing-descriptions>