Updated external content (Jenkins build 1237)
parent
3af0d69c5b
commit
bf01953497
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,125 @@
|
|||
# NibeGW Hardware and Compiling hints
|
||||
|
||||
|
||||
## RS-485 Modules
|
||||
|
||||
For settting up a NibeGW you need a RS485 module.
|
||||
While ProDiNo already have RS-485 support included, you need a separate module for Arduino Uno.
|
||||
Most cheap modules out there are compatible with 5V voltage and therefore compatible with Arduino based hardware.
|
||||
Mostly you will get one of two commonly used designs:
|
||||
|
||||
* Modules based on Max1348 chip, which has 2 pins on the Arduino side (RXD, TXD) + VCC + GND
|
||||
* Modules based on Max485 chip, which has 4 pins on the Arduino side (RO, RE, DE, DI) + VCC + GND
|
||||
|
||||
Both types of modules work fine with NibeGW.
|
||||
The difference between the two is, that the Max485 chip needs to be switched between RX mode and TX mode manually while the Max1348 chip do this automatically.
|
||||
That is why you need an extra "direction pin" on the Arduino to switch the module with Max485 chip between the two modes.
|
||||
|
||||
#### Wiring diagram for Max1348 based modules:
|
||||
|
||||
```
|
||||
TX RX 5V GND Arduino
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
RX TX VCC GND Max1348 based module
|
||||
```
|
||||
|
||||
#### Wiring diagram for Max485 (PIN2 is used as direction pin here):
|
||||
|
||||
```
|
||||
TX RX PIN2 5V GND Arduino
|
||||
| | | | |
|
||||
| | | | |
|
||||
| | |---| | |
|
||||
DI RO DE RE VCC GND Max485 bases module
|
||||
```
|
||||
|
||||
|
||||
## Ethernet Shield W5100
|
||||
|
||||
This Ethernet shield is based on Wiznet W5100 Ethernet Chip.
|
||||
It is supported by the Arduino Ehternet Library.
|
||||
No special configuration is needed, NibeGW supports this shield out of the box.
|
||||
|
||||
ProDiNo already have Ethernet included, so there's no need for a separate Ethernet Shield.
|
||||
Also the ProDiNo Ethernet is supported by NibeGW out of the box.
|
||||
|
||||
|
||||
## Arduino Uno
|
||||
|
||||
Arduino Uno has only one serial port which is shared with USB.
|
||||
So make sure to disconnect all hardware (ethernet shield, RS485 module, etc.) while uploading the compiled sketch to the Arduino.
|
||||
Furthermore do not use the USB port while Arduino is communicating with the Nibe heatpump.
|
||||
|
||||
For compiling NibeGW, you have to make the following changes to the code:
|
||||
|
||||
#### Config.h:
|
||||
|
||||
Comment out support for all special boards:
|
||||
|
||||
```
|
||||
//#define PRODINO_BOARD
|
||||
//#define PRODINO_BOARD_ESP32
|
||||
//#define TRANSPORT_ETH_ENC28J6A0
|
||||
//#define ENABLE_DYNAMIC_CONFIG
|
||||
```
|
||||
|
||||
Comment out debugging on the serial console:
|
||||
|
||||
```
|
||||
//#define ENABLE_SERIAL_DEBUG
|
||||
```
|
||||
|
||||
Adjust the settings for your ethernet connection, target ip and ports and modbus module to simulate.
|
||||
Leave the serial configuration untouched - it is fine for Arduino Uno.
|
||||
|
||||
#### NibeGW.h:
|
||||
|
||||
Enable support for HARDWARE_SERIAL:
|
||||
|
||||
```
|
||||
//#define HARDWARE_SERIAL_WITH_PINS
|
||||
#define HARDWARE_SERIAL
|
||||
```
|
||||
|
||||
## ProDiNo ESP32 Ethernet v1
|
||||
|
||||
Todo
|
||||
|
||||
|
||||
## ProDiNo Ethernet V2
|
||||
|
||||
Todo
|
||||
|
||||
|
||||
## Debugging
|
||||
|
||||
Debugging messages are available by connecting to port 23 to your NibeGW via telnet. Enable debugging in Config.h:
|
||||
|
||||
```
|
||||
#define ENABLE_DEBUG
|
||||
#define VERBOSE_LEVEL 5
|
||||
#define ENABLE_REMOTE_DEBUG // Remote debug is available in telnet port 23
|
||||
```
|
||||
|
||||
You can connect to NibeGW with any telnet client. You can also set some options via telnet. With 'h' you get a menue with all available options:
|
||||
|
||||
```
|
||||
Arduino NibeGW
|
||||
Commands:
|
||||
E -> exit
|
||||
i -> info
|
||||
1 -> set verbose level to 1
|
||||
2 -> set verbose level to 2
|
||||
3 -> set verbose level to 3
|
||||
4 -> set verbose level to 4
|
||||
5 -> set verbose level to 5
|
||||
```
|
||||
|
||||
On the target IP you can see the receiving udp messages with netcat (if you changed the default target port 9999, you also have to adjust it here):
|
||||
|
||||
```
|
||||
nc -lu 9999 | hexdump -C
|
||||
```
|
||||
|
|
@ -5,6 +5,7 @@ title: SMSModem - Bindings
|
|||
type: binding
|
||||
description: "This binding connects to a USB serial GSM modem (or a network exposed one, see ser2net) and allows openHAB to send and receive SMS through it."
|
||||
since: 3x
|
||||
logo: images/addons/smsmodem.png
|
||||
install: manual
|
||||
---
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ Thing tibber:tibberapi:7cfae492 [ homeid="xxx", token="xxxxxxx" ]
|
|||
```
|
||||
|
||||
### demo.items:
|
||||
.
|
||||
|
||||
```
|
||||
Number:Dimensionless TibberAPICurrentTotal "Current Total Price [%.2f NOK]" {channel="tibber:tibberapi:7cfae492:current_total"}
|
||||
DateTime TibberAPICurrentStartsAt "Timestamp - Current Price" {channel="tibber:tibberapi:7cfae492:current_startsAt"}
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
---
|
||||
id: webexteams
|
||||
label: WebexTeams
|
||||
title: WebexTeams - Bindings
|
||||
type: binding
|
||||
description: "The Webex Team binding allows to send messages to [Webex Teams](https://web.webex.com/) users and rooms through a number of actions."
|
||||
since: 3x
|
||||
logo: images/addons/webexteams.png
|
||||
install: manual
|
||||
---
|
||||
|
||||
<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->
|
||||
|
||||
{% include base.html %}
|
||||
|
||||
# WebexTeams Binding
|
||||
|
||||
The Webex Team binding allows to send messages to [Webex Teams](https://web.webex.com/) users and rooms through a number of actions.
|
||||
|
||||
Messages can use markdown syntax, and attachments are supported.
|
||||
|
||||
## Supported Things
|
||||
|
||||
- `account`: A Webex Teams account
|
||||
|
||||
## Discovery
|
||||
|
||||
No Things are being discovered by this binding.
|
||||
|
||||
|
||||
## Thing Configuration
|
||||
|
||||
Webex Teams supports two main types of app integration:
|
||||
|
||||
* Bot: a separate identity that can be used to communicate with people and rooms.
|
||||
* Person integration: OAuth integration that allows the binding to act on behalf of a persons.
|
||||
|
||||
Both of these accounts must be first configured on the [Webex Developers](https://developer.webex.com/my-apps) website.
|
||||
When creating a person integration, it's important you customize the redirect URL based on your OpenHab installation.
|
||||
For example if you run your openHAB server on `http://openhab:8080` you should add [http://openhab:8080/connectwebex](http://openhab:8080/connectwebex) to the redirect URIs.
|
||||
|
||||
To use a bot account, only configure the `token` (Authentication token).
|
||||
|
||||
To use a person integration, configure `clientId` and `clientSecret`.
|
||||
When the account is configured as a Thing in OpenHab, navigate to the redirect URL (as described above) and authorize your account.
|
||||
|
||||
You shouldn't configure both an authentication token (used for bots) AND clientId/clientSecret (used for person integrations). In that case the binding will use the authentication token.
|
||||
|
||||
A default room id is required for use with the `sendMessage` action.
|
||||
|
||||
### `account` Thing Configuration
|
||||
|
||||
| Name | Type | Description | Default | Required | Advanced |
|
||||
|-----------------|---------|---------------------------------------|---------|----------|----------|
|
||||
| token | text | (Bot) authentication token | N/A | no | no |
|
||||
| clientId | text | (Person) client id | N/A | no | no |
|
||||
| clientSecret | text | (Person) client secret | N/A | no | no |
|
||||
| refreshPeriod | integer | Refresh period for channels (seconds) | 300 | no | no |
|
||||
| roomId | text | ID of the default room | N/A | no | no |
|
||||
|
||||
## Channels
|
||||
|
||||
| Thing | channel | type | description |
|
||||
|--------------------|--------------|-----------|--------------------------------------------------------------|
|
||||
| WebexTeams Account | status | String | Account presence status: active, call, inactive, ... |
|
||||
| WebexTeams Account | lastactivity | DateTime | The date and time of the person's last activity within Webex |
|
||||
|
||||
Note: status and lastactivity are only updated for person integrations
|
||||
|
||||
## Full Example
|
||||
|
||||
|
||||
webexteams.things:
|
||||
|
||||
Configure a bot account:
|
||||
|
||||
```
|
||||
Thing webexteams:account:bot [ token="XXXXXX", roomId="YYYYYY" ]
|
||||
```
|
||||
|
||||
Configure a person integration account:
|
||||
|
||||
```
|
||||
Thing webexteams:account:person [ clientId="XXXXXX", clientSecret="YYYYYY", roomId="ZZZZZZ" ]
|
||||
```
|
||||
|
||||
## Rule Action
|
||||
|
||||
DSL rules use `getActions` to get a reference to the thing.
|
||||
|
||||
`val botActions = getActions("webexteams", "webexteams:account:bot")`
|
||||
|
||||
This binding includes these rule actions for sending messages:
|
||||
|
||||
* `var success = botActions.sendMessage(String markdown)` - Send a message to the default room.
|
||||
* `var success = botActions.sendMessage(String markdown, String attach)` - Send a message to the default room, with attachment.
|
||||
* `var success = botActions.sendRoomMessage(String roomId, String markdown)` - Send a message to a specific room.
|
||||
* `var success = botActions.sendRoomMessage(String roomId, String markdown, String attach)` - Send a message to a specific room, with attachment.
|
||||
* `var success = botActions.sendPersonMessage(String personEmail, String markdown)` - Send a direct message to a person.
|
||||
* `var success = botActions.sendPersonMessage(String personEmail, String markdown, String attach)` - Send a direct message to a person, with attachment.
|
||||
|
||||
Sending messages for bot or person accounts works exactly the same.
|
||||
Attachments must be URLs.
|
||||
Sending local files is not supported at this moment.
|
||||
|
||||
|
|
@ -20,6 +20,18 @@
|
|||
consumption
|
||||
(green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).</description>
|
||||
</channel>
|
||||
<channel id="inTwoDaysSignal" typeId="signal">
|
||||
<label>In Two Days Signal</label>
|
||||
<description>The signal relating to the forecast consumption level in two days. Values are 1 for normal
|
||||
consumption
|
||||
(green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).</description>
|
||||
</channel>
|
||||
<channel id="inThreeDaysSignal" typeId="signal">
|
||||
<label>In Three Days Signal</label>
|
||||
<description>The signal relating to the forecast consumption level in three days. Values are 1 for normal
|
||||
consumption
|
||||
(green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).</description>
|
||||
</channel>
|
||||
<channel id="currentHourSignal" typeId="signal">
|
||||
<label>Current Hour Signal</label>
|
||||
<description>The signal relating to the forecast consumption level for the current hour. Values are 1 for normal
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<thing:thing-descriptions bindingId="webexteams"
|
||||
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">
|
||||
|
||||
<!-- Account Thing Type -->
|
||||
<thing-type id="account">
|
||||
<label>WebexTeams Account</label>
|
||||
<description>WebexTeams account used to send messages.</description>
|
||||
|
||||
<channels>
|
||||
<channel id="status" typeId="status"/>
|
||||
<channel id="lastactivity" typeId="lastactivity"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="type"></property>
|
||||
<property name="name"></property>
|
||||
</properties>
|
||||
|
||||
<config-description>
|
||||
<parameter name="token" type="text" required="false">
|
||||
<context>password</context>
|
||||
<label>Authorization Token</label>
|
||||
<description>Authorization token. Only use with a bot account.</description>
|
||||
</parameter>
|
||||
<parameter name="clientId" type="text" required="false">
|
||||
<label>Client Id</label>
|
||||
<description>Client Id. Only use with a person integration.</description>
|
||||
</parameter>
|
||||
<parameter name="clientSecret" type="text" required="false">
|
||||
<context>password</context>
|
||||
<label>Client Secret</label>
|
||||
<description>Client Secret. Only use with a person integration.</description>
|
||||
</parameter>
|
||||
<parameter name="refreshPeriod" type="integer" required="false">
|
||||
<label>Refresh Period (seconds)</label>
|
||||
<default>300</default>
|
||||
<description>Refresh period for channels. Low numbers increase accuracy, but could hit API rate limits. Defaults to
|
||||
300 secs.</description>
|
||||
</parameter>
|
||||
<parameter name="roomId" type="text" required="false">
|
||||
<label>Default Room Id</label>
|
||||
<description>Id of the default room to send messages</description>
|
||||
</parameter>
|
||||
</config-description>
|
||||
</thing-type>
|
||||
|
||||
<!-- Botname Channel Type -->
|
||||
<channel-type id="status">
|
||||
<item-type>String</item-type>
|
||||
<label>Status</label>
|
||||
<description>The current presence status of the person</description>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
<channel-type id="lastactivity">
|
||||
<item-type>DateTime</item-type>
|
||||
<label>Last Activity</label>
|
||||
<description>The date and time of the person's last activity within Webex</description>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
Loading…
Reference in New Issue