Updated external content (Jenkins build 549)
parent
e6573e9099
commit
77f58705cd
|
@ -59,6 +59,7 @@ If in the future, you add additional shades or scenes to your system, the bindin
|
|||
| host | The host name or IP address of the hub on your network. |
|
||||
| refresh | The number of milli-seconds between fetches of the PowerView hub's shade state (default 60'000 one minute). |
|
||||
| hardRefresh | The number of minutes between hard refreshes of the PowerView hub's shade state (default 180 three hours). See [Refreshing the PowerView Hub Cache](#Refreshing-the-PowerView-Hub-Cache). |
|
||||
| hardRefreshBatteryLevel | The number of hours between hard refreshes of battery levels from the PowerView Hub (or 0 to disable, defaulting to weekly). See [Refreshing the PowerView Hub Cache](#Refreshing-the-PowerView-Hub-Cache). |
|
||||
|
||||
### Thing Configuration for PowerView Shades
|
||||
|
||||
|
@ -150,6 +151,10 @@ The hub periodically does a _**"hard refresh"**_ in order to overcome this issue
|
|||
The time interval between hard refreshes is set in the `hardRefresh` configuration parameter.
|
||||
To disable periodic hard refreshes, set `hardRefresh` to zero.
|
||||
|
||||
Similarly, the battery level is transient and is only updated automatically by the hub once a week.
|
||||
To change this interval, set `hardRefreshBatteryLevel` to number of hours between refreshes.
|
||||
To use default hub behavior (weekly updates), set `hardRefreshBatteryLevel` to zero.
|
||||
|
||||
Note: You can also force the hub to refresh itself by sending a `REFRESH` command in a rule to an item that is connected to a channel in the hub as follows:
|
||||
|
||||
```
|
||||
|
|
|
@ -358,16 +358,17 @@ A virtual datapoint (String) to simulate a key press, available on all channels
|
|||
|
||||
Available values:
|
||||
|
||||
- `SHORT_PRESS`: triggered on a short key press
|
||||
- `LONG_PRESS`: triggered on a key press longer than `LONG_PRESS_TIME` (variable configuration per key, default is 0.4 s)
|
||||
- `DOUBLE_PRESS`: triggered on a short key press but only if the latest `SHORT_PRESS` or `DOUBLE_PRESS` event is not older than 2.0 s (not related to `DBL_PRESS_TIME` configuration, which is more like a key lock because if it is other than `0.0` single presses are not notified anymore)
|
||||
- `SHORT_PRESSED`: triggered on a short key press
|
||||
- `LONG_PRESSED`: triggered on a key press longer than `LONG_PRESS_TIME` (variable configuration per key, default is 0.4 s)
|
||||
- `LONG_REPEATED`: triggered on long key press repetition, that is, in `LONG_PRESS_TIME` intervals as long as key is held
|
||||
- `LONG_RELEASED`: triggered when a key is released after being long pressed
|
||||
|
||||
**Example:** to capture a short key press on the 19 button remote control in a rule
|
||||
|
||||
```javascript
|
||||
rule "example trigger rule"
|
||||
when
|
||||
Channel 'homematic:HM-RC-19-B:ccu:KEQ0012345:1#BUTTON' triggered SHORT_PRESS
|
||||
Channel 'homematic:HM-RC-19-B:ccu:KEQ0012345:1#BUTTON' triggered SHORT_PRESSED
|
||||
then
|
||||
...
|
||||
end
|
||||
|
|
|
@ -46,9 +46,8 @@ The supported thing types are:
|
|||
|
||||
## Discovery
|
||||
|
||||
Manually initiated Auto-discovery is supported if Kaleidescape components are accessible on the same IP subnet of the openHAB server.
|
||||
Since discovery involves scanning all IP addresses in the subnet range for an open socket, the discovery must be initiated by the user.
|
||||
In the Inbox, select Search For Things and then choose the Kaleidescape System Binding to initiate discovery.
|
||||
Manually initiated Auto-discovery will locate all suported Kaleidescape components if they are on the same IP subnet of the openHAB server.
|
||||
In the Inbox, select Search For Things and then choose the Kaleidescape System Binding to initiate a discovery scan.
|
||||
|
||||
## Binding Configuration
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ Please see the example below.
|
|||
| roller shutter, screen, venetian blind, garage door, awning, pergola, curtain | control | device controller which reacts to commands UP/DOWN/ON/OFF/OPEN/CLOSE/MY/STOP + closure 0-100 |
|
||||
| window | control | device controller which reacts to commands UP/DOWN/ON/OFF/OPEN/CLOSE/STOP + closure 0-100 |
|
||||
| silent roller shutter | silent_control | similar to control channel but in silent mode |
|
||||
| venetian blind, adjustable slats roller shutter, bioclimatic pergola | orientation | percentual orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS) |
|
||||
| venetian blind, adjustable slats roller shutter, bioclimatic pergola | orientation | percentual orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS) |
|
||||
| venetian blind, adjustable slats roller shutter | closure_orientation | percentual closure and orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS) |
|
||||
| adjustable slats roller shutter | rocker | used for setting the rocker position of the roller shutter, the only position allowing the slats control |
|
||||
| bioclimatic pergola | slats | slats state (open/closed) |
|
||||
|
@ -144,7 +144,7 @@ You can list all the scenarios IDs with the following console command: `somfytah
|
|||
|
||||
### Remarks
|
||||
|
||||
All things which have a RSSI (relative received signal) state, expose a channel "rssi".
|
||||
All things which have a RSSI (received signal strength indication) state, expose a channel "rssi".
|
||||
|
||||
When a roller shutter-like thing receives STOP command, there are two possible behaviours
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ Otherwise you will not be able to receive those messages.
|
|||
|
||||
**telegramBot** - A Telegram Bot that can send and receive messages.
|
||||
|
||||
The Telegram binding supports the following things which originate from the last message sent to the Telegram bot:
|
||||
The Telegram binding supports the following state channels which originate from the last message sent to the Telegram bot:
|
||||
|
||||
* message text or URL
|
||||
* message date
|
||||
|
@ -65,6 +65,8 @@ The Telegram binding supports the following things which originate from the last
|
|||
* chat id (used to identify the chat of the last message)
|
||||
* reply id (used to identify an answer from a user of a previously sent message by the binding)
|
||||
|
||||
There are also event channels that provide received messages or query callback responses as JSON payloads for easier handling in rules.
|
||||
|
||||
Please note that the binding channels cannot be used to send messages.
|
||||
In order to send a message, an action must be used instead.
|
||||
|
||||
|
@ -120,7 +122,7 @@ or HTTP proxy server
|
|||
Thing telegram:telegramBot:Telegram_Bot [ chatIds="ID", botToken="TOKEN", proxyHost="localhost", proxyPort="8123", proxyType="HTTP" ]
|
||||
```
|
||||
|
||||
## Channels
|
||||
## State Channels
|
||||
|
||||
| Channel Type ID | Item Type | Description |
|
||||
|--------------------------------------|-----------|-----------------------------------------------------------------|
|
||||
|
@ -137,6 +139,52 @@ Either `lastMessageText` or `lastMessageURL` are populated for a given message.
|
|||
If the message did contain text, the content is written to `lastMessageText`.
|
||||
If the message did contain an audio, photo, video or voice, the URL to retrieve that content can be found in `lastMessageURL`.
|
||||
|
||||
## Event Channels
|
||||
|
||||
### messageEvent
|
||||
|
||||
When a message is received this channel will be triggered with a simplified version of the message data as the `event`, payload encoded as a JSON string.
|
||||
The following table shows the possible fields, any `null` values will be missing from the JSON payload.
|
||||
|
||||
| Field | Type | Description |
|
||||
|------------------|--------|---------------------------------------|
|
||||
| `message_id` | Long | Unique message ID in this chat |
|
||||
| `from` | String | First and/or last name of sender |
|
||||
| `chat_id` | Long | Unique chat ID |
|
||||
| `text` | String | Message text |
|
||||
| `animation_url` | String | URL to download animation from |
|
||||
| `audio_url` | String | URL to download audio from |
|
||||
| `document_url` | String | URL to download file from |
|
||||
| `photo_url` | Array | Array of URLs to download photos from |
|
||||
| `sticker_url` | String | URL to download sticker from |
|
||||
| `video_url` | String | URL to download video from |
|
||||
| `video_note_url` | String | URL to download video note from |
|
||||
| `voice_url` | String | URL to download voice clip from |
|
||||
|
||||
### messageRawEvent
|
||||
|
||||
When a message is received this channel will be triggered with the raw message data as the `event` payload, encoded as a JSON string.
|
||||
See the [`Message` class for details](https://github.com/pengrad/java-telegram-bot-api/blob/4.9.0/library/src/main/java/com/pengrad/telegrambot/model/Message.java)
|
||||
|
||||
### callbackEvent
|
||||
|
||||
When a Callback Query response is received this channel will be triggered with a simplified version of the callback data as the `event`, payload encoded as a JSON string.
|
||||
The following table shows the possible fields, any `null` values will be missing from the JSON payload.
|
||||
|
||||
| Field | Type | Description |
|
||||
|---------------|--------|------------------------------------------------------------|
|
||||
| `message_id` | Long | Unique message ID of the original Query message |
|
||||
| `from` | String | First and/or last name of sender |
|
||||
| `chat_id` | Long | Unique chat ID |
|
||||
| `callback_id` | String | Unique callback ID to send receipt confirmation to |
|
||||
| `reply_id` | String | Plain text name of original Query |
|
||||
| `text` | String | Selected response text from options give in original Query |
|
||||
|
||||
### callbackRawEvent
|
||||
|
||||
When a Callback Query response is received this channel will be triggered with the raw callback data as the `event` payload, encoded as a JSON string.
|
||||
See the [`CallbackQuery` class for details](https://github.com/pengrad/java-telegram-bot-api/blob/4.9.0/library/src/main/java/com/pengrad/telegrambot/model/CallbackQuery.java)
|
||||
|
||||
## Rule Actions
|
||||
|
||||
This binding includes a number of rule actions, which allow the sending of Telegram messages from within rules.
|
||||
|
@ -187,6 +235,15 @@ Just put the chat id (must be a long value!) followed by an "L" as the first arg
|
|||
telegramAction.sendTelegram(1234567L, "Hello world!")
|
||||
```
|
||||
|
||||
### Advanced Callback Query Response
|
||||
|
||||
This binding stores the `callbackId` and recalls it using the `replyId`, but this information is lost if openHAB restarts.
|
||||
If you store the `callbackId`, `chatId`, and optionally `messageId` somewhere that will be persisted when openHAB shuts down, you can use the following overload of `sendTelegramAnswer` to respond to any Callback Query.
|
||||
|
||||
```
|
||||
telegramAction.sendTelegramAnswer(chatId, callbackId, messageId, message)
|
||||
```
|
||||
|
||||
## Full Example
|
||||
|
||||
### Send a text message to telegram chat
|
||||
|
|
|
@ -26,10 +26,17 @@
|
|||
<default>60000</default>
|
||||
</parameter>
|
||||
<parameter name="hardRefresh" type="integer" required="false">
|
||||
<label>Hard Refresh Interval</label>
|
||||
<description>The number of minutes between hard refreshes of the PowerView Hub (or 0 to disable)</description>
|
||||
<label>Hard Position Refresh Interval</label>
|
||||
<description>The number of minutes between hard refreshes of positions from the PowerView Hub (or 0 to disable)</description>
|
||||
<default>180</default>
|
||||
</parameter>
|
||||
<parameter name="hardRefreshBatteryLevel" type="integer" required="false">
|
||||
<label>Hard Battery Level Refresh Interval</label>
|
||||
<description>The number of hours between hard refreshes of battery levels from the PowerView Hub (or 0 to disable,
|
||||
default is weekly)</description>
|
||||
<advanced>true</advanced>
|
||||
<default>0</default>
|
||||
</parameter>
|
||||
</config-description>
|
||||
</bridge-type>
|
||||
|
||||
|
|
|
@ -416,4 +416,12 @@
|
|||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="rssi">
|
||||
<item-type>Number</item-type>
|
||||
<label>RSSI</label>
|
||||
<description>Relative received signal strength state</description>
|
||||
<state pattern="%.1f" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
<channel id="lastMessageUsername" typeId="lastMessageUsername"/>
|
||||
<channel id="chatId" typeId="chatId"/>
|
||||
<channel id="replyId" typeId="replyId"/>
|
||||
<channel id="messageEvent" typeId="messageEvent"/>
|
||||
<channel id="messageRawEvent" typeId="messageRawEvent"/>
|
||||
<channel id="callbackEvent" typeId="callbackEvent"/>
|
||||
<channel id="callbackRawEvent" typeId="callbackRawEvent"/>
|
||||
</channels>
|
||||
|
||||
<config-description>
|
||||
|
@ -114,4 +118,64 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="messageEvent" advanced="true">
|
||||
<kind>trigger</kind>
|
||||
<label>Message Received</label>
|
||||
<description>
|
||||
<![CDATA[
|
||||
Message encoded as JSON.<br />
|
||||
Event payload could contain the following, but `null` values will not be present:
|
||||
<ul>
|
||||
<li>Long `message_id` - Unique message ID in this chat</li>
|
||||
<li>String `from` - First and/or last name of sender</li>
|
||||
<li>Long `chat_id` - Unique chat ID</li>
|
||||
<li>String `text` - Message text</li>
|
||||
<li>String `animation_url` - URL to download animation from</li>
|
||||
<li>String `audio_url` - URL to download audio from</li>
|
||||
<li>String `document_url` - URL to download file from</li>
|
||||
<li>Array `photo_url` - Array of URLs to download photos from</li>
|
||||
<li>String `sticker_url` - URL to download sticker from</li>
|
||||
<li>String `video_url` - URL to download video from</li>
|
||||
<li>String `video_note_url` - URL to download video note from</li>
|
||||
<li>String `voice_url` - URL to download voice clip from</li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
<event></event>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="messageRawEvent" advanced="true">
|
||||
<kind>trigger</kind>
|
||||
<label>Raw Message Received</label>
|
||||
<description>Raw Message from the Telegram library as JSON.</description>
|
||||
<event></event>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="callbackEvent" advanced="true">
|
||||
<kind>trigger</kind>
|
||||
<label>Query Callback Received</label>
|
||||
<description>
|
||||
<![CDATA[
|
||||
Callback Query response encoded as JSON.<br />
|
||||
Event payload could contain the following, but `null` values will not be present:
|
||||
<ul>
|
||||
<li>Long `message_id` - Unique message ID of the original Query message</li>
|
||||
<li>String `from` - First and/or last name of sender</li>
|
||||
<li>Long `chat_id` - Unique chat ID</li>
|
||||
<li>String `callback_id` - Unique callback ID to send receipt confirmation to</li>
|
||||
<li>String `reply_id` - Plain text name of original Query</li>
|
||||
<li>String `text` - Selected response text from options give in original Query</li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
<event></event>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="callbackRawEvent" advanced="true">
|
||||
<kind>trigger</kind>
|
||||
<label>Raw Callback Query Received</label>
|
||||
<description>Raw Callback Query response from the Telegram library encoded as JSON.</description>
|
||||
<event></event>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
|
|
Loading…
Reference in New Issue