diff --git a/_addons_bindings/ftpupload/readme.md b/_addons_bindings/ftpupload/readme.md new file mode 100644 index 000000000..12a3c289e --- /dev/null +++ b/_addons_bindings/ftpupload/readme.md @@ -0,0 +1,188 @@ +--- +id: ftpupload +label: FTP Upload +title: FTP Upload - Bindings +type: binding +description: "This binding can be used to receive image files from FTP clients." +since: 2x +install: auto +--- + + + +{% include base.html %} + +# FTP Upload Binding + +This binding can be used to receive image files from FTP clients. +The binding acts as a FTP server. +Images stored on the FTP server are not saved to the file system, therefore the binding shouldn't cause any problems on flash based openHAB installations. + +## Supported Things + +This binding supports Things of type ```ftpupload```. +Every Thing is identified by FTP user name. +Therefore, every thing should use unique user name to login FTP server. + +## Discovery + +Automatic discovery is not supported. + +## Binding Configuration + +The binding has the following configuration options: + +| Parameter | Name | Description | Required | Default value | +|-------------|--------------|------------------------------------------------------------------------------------------------------------------------|----------|---------------| +| port | TCP Port | TCP port of the FTP server | no | 2121 | +| idleTimeout | Idle timeout | The number of seconds before an inactive client is disconnected. If this value is set to 0, the idle time is disabled. | no | 60 | + +## Channels + +This binding currently supports the following channels: + +| Channel Type ID | Item Type | Description | +|-----------------|--------------|----------------------------------------------------------------------------------------| +| image | Image | Image file received via FTP. | + +When an image file is uploaded to FTP server, the binding tries to find the channel whose filename matches the uploaded image filename. +If no match is found, no channel is updated. +The filename parameter supports regular expression patterns. +See more details in the Things example. + +Image channel supports following options: + +| Parameter | Name | Description | Required | Default value | +|-------------|--------------|--------------------------------------------------------------------------|----------|---------------| +| filename | Filename | Filename to match received files. Supports regular expression patterns. | yes | .* | + + +### Trigger Channels + +| Channel Type ID | Options | Description | +|-----------------|------------------------|-----------------------------------------------------| +| image-received | IMAGE_RECEIVED | Triggered when image file received from FTP client. | + +When an image file is uploaded to FTP server, the binding tries to find the trigger channel whose filename matches the upload image filename. +If no match is found, no channel is updated. +The filename parameter supports regular expression patterns. +See more details in the Things example. + +Trigger channels supports following options: + +| Parameter | Name | Description | Required | Default value | +|-------------|--------------|--------------------------------------------------------------------------|----------|---------------| +| filename | Filename | Filename to match received files. Supports regular expression patterns. | yes | .* | + +## Full Example + +Things: + +``` +Thing ftpupload:imagereceiver:images1 [ userName="test1", password="12345" ] { + +Thing ftpupload:imagereceiver:images2 [ userName="test2", password="12345" ] { + Channels: + Type image-channel : my_image1 "My Image channel 1" [ + filename="test12[0-9]{2}.png" // match to filename test12xx.png, where xx can be numbers between 00-99 + ] + Type image-channel : my_image2 "My Image channel 2" [ + filename="test.jpg" + ] + Trigger String : my_image_trigger1 [ + filename="test12[0-9]{2}.png" + ] + Trigger String : my_image_trigger2 [ + filename="test.jpg" + ] +} +``` + +Items: + +``` +Image Image1 { channel="ftpupload:imagereceiver:images1:image" } +Image Image2 { channel="ftpupload:imagereceiver:images2:my_image1" } +``` + +Rules: + +``` +rule "example trigger rule 1" +when + Channel 'ftpupload:imagereceiver:images1:image-received' triggered IMAGE_RECEIVED +then + logInfo("Test","Image received") +end + +rule "example trigger rule 2" +when + Channel 'ftpupload:imagereceiver:images2:my_image_trigger1' triggered IMAGE_RECEIVED +then + logInfo("Test","Image received") +end + +``` + +Sitemap: + +``` +Frame label="FTP images" { + Image item=Image1 + Image item=Image2 +} +``` + +## Use case example + +The binding can be used to receive images from network cameras that send images to a FTP server when motion or sound is detected. + +Things: + +``` +Thing ftpupload:imagereceiver:garagecamera [ userName="garage", password="12345" ] +``` + +Items: + +``` +Image Garage_NetworkCamera_Motion_Image { channel="ftpupload:imagereceiver:garagecamera:image" } +``` + +Rules: + +``` +rule "example trigger rule" +when + Channel 'ftpupload:imagereceiver:garagecamera:image-received' triggered IMAGE_RECEIVED +then + logInfo("Test","Garage motion detected") +end +``` + +Sitemap: + +``` +Frame label="Garage network camera" icon="camera" { + Image item=Garage_NetworkCamera_Motion_Image +} +``` + +## Logging and Problem Solving + +For problem solving, if binding logging is not enough, Apache FTP server logging can also be enabled by the following command in the karaf console: + +``` +log:set DEBUG org.apache.ftpserver +``` + +and set back to default level: + +``` +log:set DEFAULT org.apache.ftpserver +``` + +If you meet any problems to receive images from the network cameras, you could test connection to binding with any FTP client. +You can send image files via FTP client and thing channels should be updated accordingly. + + \ No newline at end of file diff --git a/_addons_bindings/homematic/readme.md b/_addons_bindings/homematic/readme.md index bcb397644..97c3846fc 100644 --- a/_addons_bindings/homematic/readme.md +++ b/_addons_bindings/homematic/readme.md @@ -155,6 +155,9 @@ The port number of the CUxD daemon (default = 8701) - **installModeDuration** Time in seconds that the controller will be in install mode when a device discovery is initiated (default = 60) +- **unpairOnDeletion** +If true, devices are automatically unpaired from a gateway when the corresponding thing is deleted (default = false) + The syntax for a bridge is: ```java diff --git a/_addons_bindings/logreader/readme.md b/_addons_bindings/logreader/readme.md new file mode 100644 index 000000000..dcf74a622 --- /dev/null +++ b/_addons_bindings/logreader/readme.md @@ -0,0 +1,123 @@ +--- +id: logreader +label: Log Reader +title: Log Reader - Bindings +type: binding +description: "This binding reads and analyzes log files. Search patterns are fully configurable, therefore different kind of log files should be possible to monitor by this binding." +since: 2x +install: auto +--- + + + +{% include base.html %} + +# Log Reader Binding + +This binding reads and analyzes log files. Search patterns are fully configurable, therefore different kind of log files should be possible to monitor by this binding. +When certain log events is recognized, openHAB rules can be used to send notification about the event e.g by email for further analysis. + +## Supported Things + +This binding supports one ThingType: `reader`. +A reader supports 3 separate channels; One for errors, one for warnings and one custom channel for other purposes. + +## Thing Configuration + +The `reader` Thing has the following configuration parameters: + +| Parameter | Type | Required | Default if omitted | Description | +| ------------------------------| ------- | -------- | -------------------------------- |-----------------------------------------------------------------------------------------| +| `filePath` | String | yes | `${OPENHAB_LOGDIR}/openhab.log` | Path to log file. ${OPENHAB_LOGDIR} is automatically replaced by the correct directory. | +| `refreshRate` | integer | no | `1000` | Time in milliseconds between individual log reads. | +| `errorPatterns` | String | no | `ERROR+` | Search patterns separated by \| character for warning events. | +| `errorBlacklistingPatterns` | String | no | | Search patterns for blacklisting unwanted error events separated by \| character. | +| `warningPatterns` | String | no | `WARN+` | Search patterns separated by \| character for error events. | +| `warningBlacklistingPatterns` | String | no | | Search patterns for blacklisting unwanted warning events separated by \| character. | +| `customPatterns` | String | no | | Search patterns separated by \| character for custom events. | +| `customBlacklistingPatterns` | String | no | | Search patterns for blacklisting unwanted custom events separated by \| character. | + +Search patterns follows Java regular expression syntax. See https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html. + +## Channels + +List of channels + +| Channel Type ID | Item Type | Description | +| ------------------ | ------------ | -------------------------------------------------------------- | +| `lastErrorEvent` | `String` | Displays contents of last [ERROR] event | +| `lastWarningEvent` | `String` | Displays contents of last [WARN] event | +| `lastCustomEvent` | `String` | Displays contents of last custom event | +| `errorEvents` | `Number` | Displays number of [ERROR] lines matched to search pattern | +| `warningEvents` | `Number` | Displays number of [WARN] lines matched to search pattern | +| `customEvents` | `Number` | Displays number of custom lines matched to search pattern | +| `logRotated` | `DateTime` | Last time when log rotated recognized | +| `newErrorEvent` | - | Trigger channel for last [ERROR] line | +| `newWarningEvent` | - | Trigger channel for last [ERROR] line | +| `newCustomEvent` | - | Trigger channel for last [ERROR] line | + +## Examples + +### example.things + +```xtend + +logreader:reader:openhablog[ refreshRate=1000, errorPatterns="ERROR+", errorBlacklistingPatterns="annoying error which should ignored|Another annoying error which should ignored" ] + +``` + +### example.items + +```xtend + +String logreaderLastError "Last error [%s]" { channel="logreader:reader:openhablog:lastErrorEvent" } +String logreaderLastWarning "Last warning [%s]" { channel="logreader:reader:openhablog:lastWarningEvent" } +Number logreaderErrors "Error events matched [%d]" { channel="logreader:reader:openhablog:errorEvents" } +Number logreaderWarnings "Warning events matched [%d]" { channel="logreader:reader:openhablog:warningEvents" } +DateTime logreaderLogRotated "Last Log Rotation [%1$tY.%1$tm.%1$te %1$tR]" { channel="logreader:reader:openhablog:logRotated" } + +``` + +### example.sitemap + +```xtend + +sitemap logreader_example label="Example" { + Frame label="LogReader" { + Text item=logreaderLastError + Text item=logreaderLastWarning + Text item=logreaderErrors + Text item=logreaderWarnings + Text item=logreaderLogRotated + } +} + +``` + +### example.rules + +```xtend +rule "LogReader" + when + Channel "logreader:reader:openhablog:newErrorEvent" triggered + then + // do something + end +``` + +Be careful when sending e.g. email notifications. +You could easily send thousand of *spam* emails in short period if e.g. one binding is in error loop. + +### Thing status + +Check thing status for errors. + +### Verbose logging + +Enable DEBUG logging in karaf console to see more precise error messages: + +`log:set DEBUG org.openhab.binding.logreader` + +See [openHAB2 logging docs](http://docs.openhab.org/administration/logging.html#defining-what-to-log) for more help. + + diff --git a/_addons_bindings/nest/readme.md b/_addons_bindings/nest/readme.md index 1c4c6b844..052b7a91e 100644 --- a/_addons_bindings/nest/readme.md +++ b/_addons_bindings/nest/readme.md @@ -72,6 +72,10 @@ The account Thing Type does not have any channels. ### Camera Channels +**Camera group channels** + +Information about the camera. + | Channel Type ID | Item Type | Description | Read Write | |-----------------------|-----------|---------------------------------------------------|:----------:| | app_url | String | The app URL to see the camera | R | @@ -84,6 +88,24 @@ The account Thing Type does not have any channels. | video_history_enabled | Switch | If the video history is currently enabled | R | | web_url | String | The web URL to see the camera | R | +**Last event group channels** + +Information about the last camera event (requires Nest Aware subscription). + +| Channel Type ID | Item Type | Description | Read Write | +|--------------------|-----------|------------------------------------------------------------------------------------|:----------:| +| activity_zones | String | Identifiers for activity zones that detected the event (comma separated) | R | +| animated_image_url | String | The URL showing an animated image for the camera event | R | +| app_url | String | The app URL for the camera event, allows you to see the camera event in an app | R | +| end_time | DateTime | Timestamp when the camera event ended | R | +| has_motion | Switch | If motion was detected in the camera event | R | +| has_person | Switch | If a person was detected in the camera event | R | +| has_sound | Switch | If sound was detected in the camera event | R | +| image_url | String | The URL showing an image for the camera event | R | +| start_time | DateTime | Timestamp when the camera event started | R | +| urls_expire_time | DateTime | Timestamp when the camera event URLs expire | R | +| web_url | String | The web URL for the camera event, allows you to see the camera event in a web page | R | + ### Smoke Detector Channels | Channel Type ID | Item Type | Description | Read Write | @@ -108,36 +130,39 @@ The account Thing Type does not have any channels. | peak_period_start_time | DateTime | Peak period start for the Rush Hour Rewards program | R | | postal_code | String | Postal code of the structure | R | | rush_hour_rewards_enrollment | Switch | If rush hour rewards system is enabled or not | R | +| security_state | String | Security state of the structure (OK, DETER) | R | | smoke_alarm_state | String | Smoke alarm state (OK, EMERGENCY, WARNING) | R | | time_zone | String | The time zone for the structure ([IANA time zone format](http://www.iana.org/time-zones)) | R | ### Thermostat Channels -| Channel Type ID | Item Type | Description | Read Write | -|-----------------------------|--------------------|---------------------------------------------------------------------------------------------|:----------:| -| can_cool | Switch | If the thermostat can actually turn on cooling | R | -| can_heat | Switch | If the thermostat can actually turn on heating | R | -| fan_timer_active | Switch | If the fan timer is engaged | R/W | -| fan_timer_duration | Number | Length of time (in minutes) that the fan is set to run (15, 30, 45, 60, 120, 240, 480, 960) | R/W | -| fan_timer_timeout | DateTime | Timestamp when the fan stops running | R | -| has_fan | Switch | If the thermostat can control the fan | R | -| has_leaf | Switch | If the thermostat is currently in a leaf mode | R | -| humidity | Number | Indicates the current relative humidity | R | -| last_connection | DateTime | Timestamp of the last successful interaction with Nest | R | -| locked | Switch | If the thermostat has the temperature locked to only be within a set range | R | -| locked_max_set_point | Number:Temperature | The locked range max set point temperature | R/W | -| locked_min_set_point | Number:Temperature | The locked range min set point temperature | R/W | -| max_set_point | Number:Temperature | The max set point temperature | R/W | -| min_set_point | Number:Temperature | The min set point temperature | R/W | -| mode | String | Current mode of the Nest thermostat (HEAT, COOL, HEAT_COOL, ECO, OFF) | R/W | -| previous_mode | String | The previous mode of the Nest thermostat (HEAT, COOL, HEAT_COOL, ECO, OFF) | R | -| state | String | The active state of the Nest thermostat (HEATING, COOLING, OFF) | R | -| temperature | Number:Temperature | Current temperature | R | -| time_to_target_mins | Number | Time left to the target temperature (mins) approximately | R | -| set_point | Number:Temperature | The set point temperature | R/W | -| sunlight_correction_active | Switch | If sunlight correction is active | R | -| sunlight_correction_enabled | Switch | If sunlight correction is enabled | R | -| using_emergency_heat | Switch | If the system is currently using emergency heat | R | +| Channel Type ID | Item Type | Description | Read Write | +|-----------------------------|----------------------|----------------------------------------------------------------------------------------|:----------:| +| can_cool | Switch | If the thermostat can actually turn on cooling | R | +| can_heat | Switch | If the thermostat can actually turn on heating | R | +| eco_max_set_point | Number:Temperature | The eco range max set point temperature | R | +| eco_min_set_point | Number:Temperature | The eco range min set point temperature | R | +| fan_timer_active | Switch | If the fan timer is engaged | R/W | +| fan_timer_duration | Number:Time | Length of time that the fan is set to run (15, 30, 45, 60, 120, 240, 480, 960 minutes) | R/W | +| fan_timer_timeout | DateTime | Timestamp when the fan stops running | R | +| has_fan | Switch | If the thermostat can control the fan | R | +| has_leaf | Switch | If the thermostat is currently in a leaf mode | R | +| humidity | Number:Dimensionless | Indicates the current relative humidity | R | +| last_connection | DateTime | Timestamp of the last successful interaction with Nest | R | +| locked | Switch | If the thermostat has the temperature locked to only be within a set range | R | +| locked_max_set_point | Number:Temperature | The locked range max set point temperature | R | +| locked_min_set_point | Number:Temperature | The locked range min set point temperature | R | +| max_set_point | Number:Temperature | The max set point temperature | R/W | +| min_set_point | Number:Temperature | The min set point temperature | R/W | +| mode | String | Current mode of the Nest thermostat (HEAT, COOL, HEAT_COOL, ECO, OFF) | R/W | +| previous_mode | String | The previous mode of the Nest thermostat (HEAT, COOL, HEAT_COOL, ECO, OFF) | R | +| state | String | The active state of the Nest thermostat (HEATING, COOLING, OFF) | R | +| temperature | Number:Temperature | Current temperature | R | +| time_to_target | Number:Time | Time left to the target temperature approximately | R | +| set_point | Number:Temperature | The set point temperature | R/W | +| sunlight_correction_active | Switch | If sunlight correction is active | R | +| sunlight_correction_enabled | Switch | If sunlight correction is enabled | R | +| using_emergency_heat | Switch | If the system is currently using emergency heat | R | Note that the Nest API rounds Thermostat values so they will differ from what shows up in the Nest App. The Nest API applies the following rounding: @@ -169,15 +194,26 @@ Bridge nest:account:demo_account [ productId="8fdf9885-ca07-4252-1aa3-f3d5ca9589 ``` /* Camera */ -String Cam_App_URL "App URL [%s]" { channel="nest:camera:demo_account:fish_cam:app_url" } -Switch Cam_Audio_Input_Enabled "Audio Input Enabled" { channel="nest:camera:demo_account:fish_cam:audio_input_enabled" } -DateTime Cam_Last_Online_Change "Last Online Change [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:camera:demo_account:fish_cam:last_online_change" } -String Cam_Snapshot_URL "Snapshot URL [%s]" { channel="nest:camera:demo_account:fish_cam:snapshot_url" } -Switch Cam_Streaming "Streaming" { channel="nest:camera:demo_account:fish_cam:streaming" } -Switch Cam_Public_Share_Enabled "Public Share Enabled" { channel="nest:camera:demo_account:fish_cam:public_share_enabled" } -String Cam_Public_Share_URL "Public Share URL [%s]" { channel="nest:camera:demo_account:fish_cam:public_share_url" } -Switch Cam_Video_History_Enabled "Video History Enabled" { channel="nest:camera:demo_account:fish_cam:video_history_enabled" } -String Cam_Web_URL "Web URL [%s]" { channel="nest:camera:demo_account:fish_cam:web_url" } +String Cam_App_URL "App URL [%s]" { channel="nest:camera:demo_account:fish_cam:camera#app_url" } +Switch Cam_Audio_Input_Enabled "Audio Input Enabled" { channel="nest:camera:demo_account:fish_cam:camera#audio_input_enabled" } +DateTime Cam_Last_Online_Change "Last Online Change [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:camera:demo_account:fish_cam:camera#last_online_change" } +String Cam_Snapshot_URL "Snapshot URL [%s]" { channel="nest:camera:demo_account:fish_cam:camera#snapshot_url" } +Switch Cam_Streaming "Streaming" { channel="nest:camera:demo_account:fish_cam:camera#streaming" } +Switch Cam_Public_Share_Enabled "Public Share Enabled" { channel="nest:camera:demo_account:fish_cam:camera#public_share_enabled" } +String Cam_Public_Share_URL "Public Share URL [%s]" { channel="nest:camera:demo_account:fish_cam:camera#public_share_url" } +Switch Cam_Video_History_Enabled "Video History Enabled" { channel="nest:camera:demo_account:fish_cam:camera#video_history_enabled" } +String Cam_Web_URL "Web URL [%s]" { channel="nest:camera:demo_account:fish_cam:camera#web_url" } +String Cam_LE_Activity_Zones "Last Event Activity Zones [%s]" { channel="nest:camera:demo_account:fish_cam:last_event#activity_zones" } +String Cam_LE_Animated_Image_URL "Last Event Animated Image URL [%s]" { channel="nest:camera:demo_account:fish_cam:last_event#animated_image_url" } +String Cam_LE_App_URL "Last Event App URL [%s]" { channel="nest:camera:demo_account:fish_cam:last_event#app_url" } +DateTime Cam_LE_End_Time "Last Event End Time [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:camera:demo_account:fish_cam:last_event#end_time" } +Switch Cam_LE_Has_Motion "Last Event Has Motion" { channel="nest:camera:demo_account:fish_cam:last_event#has_motion" } +Switch Cam_LE_Has_Person "Last Event Has Person" { channel="nest:camera:demo_account:fish_cam:last_event#has_person" } +Switch Cam_LE_Has_Sound "Last Event Has Sound" { channel="nest:camera:demo_account:fish_cam:last_event#has_sound" } +String Cam_LE_Image_URL "Last Event Image URL [%s]" { channel="nest:camera:demo_account:fish_cam:last_event#image_url" } +DateTime Cam_LE_Start_Time "Last Event Start Time [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:camera:demo_account:fish_cam:last_event#start_time" } +DateTime Cam_LE_URLs_Expire_Time "Last Event URLs Expire Time [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:camera:demo_account:fish_cam:last_event#urls_expire_time" } +String Cam_LE_Web_URL "Last Event Web URL [%s]" { channel="nest:camera:demo_account:fish_cam:last_event#web_url" } /* Smoke Detector */ String Smoke_CO_Alarm "CO Alarm [%s]" { channel="nest:smoke_detector:demo_account:hallway_smoke:co_alarm_state" } @@ -191,12 +227,14 @@ String Smoke_UI_Color "UI Color [%s]" /* Thermostat */ Switch Thermostat_Can_Cool "Can Cool" { channel="nest:thermostat:demo_account:living_thermostat:can_cool" } Switch Thermostat_Can_Heat "Can Heat" { channel="nest:thermostat:demo_account:living_thermostat:can_heat" } +Number:Temperature Therm_EMaxSP "Eco Max Set Point [%.1f %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:eco_max_set_point" } +Number:Temperature Therm_EMinSP "Eco Min Set Point [%.1f %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:eco_min_set_point" } Switch Thermostat_FT_Active "Fan Timer Active" { channel="nest:thermostat:demo_account:living_thermostat:fan_timer_active" } -Number Thermostat_FT_Duration "Fan Timer Duration" { channel="nest:thermostat:demo_account:living_thermostat:fan_timer_duration" } +Number:Time Thermostat_FT_Duration "Fan Timer Duration [%d %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:fan_timer_duration" } DateTime Thermostat_FT_Timeout "Fan Timer Timeout [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:thermostat:demo_account:living_thermostat:fan_timer_timeout" } Switch Thermostat_Has_Fan "Has Fan" { channel="nest:thermostat:demo_account:living_thermostat:has_fan" } Switch Thermostat_Has_Leaf "Has Leaf" { channel="nest:thermostat:demo_account:living_thermostat:has_leaf" } -Number Thermostat_Humidity "Humidity [%.1f %%]" { channel="nest:thermostat:demo_account:living_thermostat:humidity" } +Number:Dimensionless Therm_Hum "Humidity [%.1f %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:humidity" } DateTime Thermostat_Last_Conn "Last Connection [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:thermostat:demo_account:living_thermostat:last_connection" } Switch Thermostat_Locked "Locked" { channel="nest:thermostat:demo_account:living_thermostat:locked" } Number:Temperature Therm_LMaxSP "Locked Max Set Point [%.1f %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:locked_max_set_point" } @@ -210,7 +248,7 @@ Number:Temperature Thermostat_SP "Set Point [%.1f %unit%]" Switch Thermostat_Sunlight_CA "Sunlight Correction Active" { channel="nest:thermostat:demo_account:living_thermostat:sunlight_correction_active" } Switch Thermostat_Sunlight_CE "Sunlight Correction Enabled" { channel="nest:thermostat:demo_account:living_thermostat:sunlight_correction_enabled" } Number:Temperature Therm_Temp "Temperature [%.1f %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:temperature" } -Number Thermostat_Time_To_Target "Time To Target [%s]" { channel="nest:thermostat:demo_account:living_thermostat:time_to_target_mins" } +Number:Time Therm_Time_To_Target "Time To Target [%d %unit%]" { channel="nest:thermostat:demo_account:living_thermostat:time_to_target" } Switch Thermostat_Using_Em_Heat "Using Emergency Heat" { channel="nest:thermostat:demo_account:living_thermostat:using_emergency_heat" } /* Structure */ @@ -222,6 +260,7 @@ DateTime Home_PP_End_Time "PP End Time [%1$tY-%1$tm-%1$td %1$tH:%1$tM:% DateTime Home_PP_Start_Time "PP Start Time [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]" { channel="nest:structure:demo_account:home:peak_period_start_time" } String Home_Postal_Code "Postal Code [%s]" { channel="nest:structure:demo_account:home:postal_code" } Switch Home_Rush_Hour_Rewards "Rush Hour Rewards" { channel="nest:structure:demo_account:home:rush_hour_rewards_enrollment" } +String Home_Security_State "Security State [%s]" { channel="nest:structure:demo_account:home:security_state" } String Home_Smoke_Alarm_State "Smoke Alarm State [%s]" { channel="nest:structure:demo_account:home:smoke_alarm_state" } String Home_Time_Zone "Time Zone [%s]" { channel="nest:structure:demo_account:home:time_zone" } ``` diff --git a/_addons_bindings/nest1/readme.md b/_addons_bindings/nest1/readme.md index e475229b8..05873f4b9 100644 --- a/_addons_bindings/nest1/readme.md +++ b/_addons_bindings/nest1/readme.md @@ -100,6 +100,7 @@ String NestHome_time_zone "Time Zone [%s]" {nest="<[structures(Home). String NestHome_away "Away [%s]" {nest="=[structures(Home).away]"} String NestHome_structure_id "Structure Id [%s]" {nest="<[structures(Home).structure_id]"} Switch NestHome_rhr_enrollment "Rush Hour Rewards Enrollment [%s]" {nest="<[structures(Home).rhr_enrollment]"} // as of 1.9 +String NestHome_wwn_security_state "Structure security state [%s]" {nest="<[structures(Home).wwn_security_state]"} // "ok" or "deter" String NestHome_co_alarm_state "Home CO [%s]" {nest="<[structures(Home).co_alarm_state]"} // as of 1.9 String NestHome_smoke_alarm_state "Home Smoke [%s]" {nest="<[structures(Home).smoke_alarm_state]"} // as of 1.9 diff --git a/_addons_bindings/solarlog/readme.md b/_addons_bindings/solarlog/readme.md new file mode 100644 index 000000000..f729799e9 --- /dev/null +++ b/_addons_bindings/solarlog/readme.md @@ -0,0 +1,64 @@ +--- +id: solarlog +label: Solar-Log +title: Solar-Log - Bindings +type: binding +description: "The [Solar-Log Family](http://www.solar-log.com/en/home.html) of monitoring devices for PV installations provide a MODBUS (TCP) and JSON-based API to access a number of internal data related to power generation and consumption. This binding implements access to the data via the JSON API." +since: 2x +install: auto +--- + + + +{% include base.html %} + +# Solar-Log Binding + +The [Solar-Log Family](http://www.solar-log.com/en/home.html) of monitoring devices for PV installations provide a MODBUS (TCP) and JSON-based API to access a number of internal data related to power generation and consumption. This binding implements access to the data via the JSON API. + +## Use of the binding + +The Solar-Log is exposed as one thing with a number of channels that can be used to read the values for different aspects of your Solar-Log installation. + +## Setup of the binding + +You can either configure the Thing via the openHAB UI or via a `*.things` file, according to the following example: + +`Thing solarlog:meter:pv "Solar-Log 300" @ "Utility Room" [ url="http://solar-log" refreshInterval=15]` + +The parameters to be used are simple: + +* `url` denotes the URL of your Solar-Log. If you have not changed anything, this defaults to `http://solar-log`. +* `refreshInterval` is the interval to fetch new data. Solar-Log updates its data every 15 - 60 seconds. `15` is the default value. Values lower than this will return the result from the last 15 seconds period. No value lower than this can be set in the UI. + +Currently, the binding does not support authenticated access to the Solar-Log JSON API (which was introduced with newer firmwares). If must set the API access to `Open` in the Solar-Log configuration in order for the binding to work. + +## Available channels + +The following table is taken from the official manual and contains all available channels. If you want to manually define Items, this can for example be done as follows: + +`Number solarlog_meter_pv_yieldday "Yield Day [% W]" (gSolarLog, gUtilityRoom) { channel="solarlog:meter:pv:yieldday" }` + +Data point | Unit | Index Description +------------------- | --------------------- | ----------------- +lastupdate | Time in the format dd.mm.yy; hh.minmin, secsec | 100 Time +pac | W | 101 Total output PAC from all of the inverters and meters in inverter mode +pdc | W | 102 Total output PAC from all of the inverters +uac | V | 103 Average voltage UAC from the inverter +udc | V | 104 Average voltage UDC from the inverter +yieldday | Wh | 105 Total yield for the day from all of the inverters +yieldyesterday | Wh | 106 Total yield for the previous day from all of the inverters +yieldmonth | Wh | 107 Total yield for the month from all of the inverters +yieldyear | Wh | 108 Total yield for the year from all of the inverters +yieldtotal | Wh | 109 Total yield from all of the inverters +conspac | W | 110 Current total consumption PAC from all of the consumption meters +consyieldday | Wh | 111 Total consumption from all of the consumption meters +consyieldyesterday | Wh | 112 Total consumption for the previous day; all of the consumption meters +consyieldmonth | Wh | 113 Total consumption for the month; all of the consumption meters +consyieldyear | Wh | 114 Total consumption for the year; all of the consumption meters +consyieldtotal | Wh | 115 Accumulated total consumption, all Consumption meter +totalPower | Wp | 116 Installed generator power + +## More information + +More information about the Solar-Log Data interfaces and the exact meaning of the various channels and the documentation of the JSON API can be found in the [Manual](https://www.solar-log.com/manuals/manuals/en_GB/SolarLog_Manual_3x_EN.pdf). diff --git a/_addons_transformations/xpath/readme.md b/_addons_transformations/xpath/readme.md index 844f425c4..07f17b03d 100644 --- a/_addons_transformations/xpath/readme.md +++ b/_addons_transformations/xpath/readme.md @@ -27,18 +27,18 @@ Given a retrieved XML ```xml - - 0 - 450 - 10 - + + 0 + 450 + 10 + ``` The XPath `/PTZStatus/AbsoluteHigh/azimuth/text()` returns the document ``` -450 +450 ``` ## Advanced Example @@ -50,11 +50,11 @@ Given a retrieved XML (e.g. from an HIK Vision device with the namespace `xmlns= ```xml - - 0 - 450 - 10 - + + 0 + 450 + 10 + ``` @@ -79,7 +79,7 @@ returns **.items** ```csv -String Temperature_xml "Temperature [JSONPATH([name()='PTZStatus']/*[name()='AbsoluteHigh']/*[name()='azimuth']/):%s °C]" {...} +String Temperature_xml "Temperature [XPATH(/*[name()='PTZStatus']/*[name()='AbsoluteHigh']/*[name()='azimuth']/):%s °C]" {...} Number Temperature "Temperature [%.1f °C]" ``` @@ -89,24 +89,24 @@ Number Temperature "Temperature [%.1f °C]" rule "Convert XML to Item Type Number" when Item Temperature_xml changed - then + then // use the transformation service to retrieve the value - // Simple - val mytest = transform("XPATH", "/*[name()='PTZStatus'] - /*[name()='AbsoluteHigh'] - /*[name()='azimuth'] - /text()", - Temperature_xml.state.toString ) - // Fully qualified - val mytest = transform("XPATH", "/*[local-name()='PTZStatus' and namespace-uri()='http://www.hikvision.com/ver20/XMLSchema'] - /*[local-name()='AbsoluteHigh' and namespace-uri()='http://www.hikvision.com/ver20/XMLSchema'] - /*[local-name()='azimuth' and namespace-uri()='http://www.hikvision.com/ver20/XMLSchema'] - /text()", - Temperature_xml.state.toString ) - + // Simple + val mytest = transform("XPATH", "/*[name()='PTZStatus'] + /*[name()='AbsoluteHigh'] + /*[name()='azimuth'] + /text()", + Temperature_xml.state.toString ) + // Fully qualified + val mytest = transform("XPATH", "/*[local-name()='PTZStatus' and namespace-uri()='http://www.hikvision.com/ver20/XMLSchema'] + /*[local-name()='AbsoluteHigh' and namespace-uri()='http://www.hikvision.com/ver20/XMLSchema'] + /*[local-name()='azimuth' and namespace-uri()='http://www.hikvision.com/ver20/XMLSchema'] + /text()", + Temperature_xml.state.toString ) + // post the new value to the Number Item Temperature.postUpdate( newValue ) - end +end ``` Now the resulting Number can also be used in the label to [change the color](https://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors) or in a rule as value for comparison. diff --git a/_data/categories_thing.csv b/_data/categories_thing.csv index cd94b694f..b23d7315b 100644 --- a/_data/categories_thing.csv +++ b/_data/categories_thing.csv @@ -11,20 +11,21 @@ HVAC,"Air condition devices, Fans", Inverter,"Power inverter, such as solar inverters etc.", LawnMower,"Lawn mowing robots, etc.",lawnmower.png Lightbulb,"Devices that illuminate something, such as bulbs, etc.",lightbulb.png -Lock,"Devices whose primary pupose is locking something",lock.png +Lock,"Devices whose primary purpose is locking something",lock.png MotionDetector,"Motion sensors/detectors", NetworkAppliance,"Bridges/Gateway need to access other devices like used by Philips Hue for example, Routers, Switches", PowerOutlet,"Small devices to be plugged into a power socket in a wall which stick there",poweroutlet.png Projector,"Devices that project a picture somewhere",projector.png RadiatorControl,"Controls on radiators used to heat up rooms", -Receiver,"Audio/Video receivers, i.e. radio receivers, satelite or cable receivers, recorders, etc.",receiver.png +Receiver,"Audio/Video receivers, i.e. radio receivers, satellite or cable receivers, recorders, etc.",receiver.png RemoteControl,"Any portable or hand-held device that controls the status of something, e.g. remote control, keyfob etc." Screen,"Devices that are able to show a picture",screen.png Sensor,"Device used to measure something", Siren,"Siren used by Alarm systems",siren.png SmokeDetector,"Smoke detectors", Speaker,"Devices that are able to play sounds", -WallSwitch,"Any device attached to the wall that controls the status of something, for ex. a light switch, dimmer",wallswitch.png +Valve,"Valves used to control water or gas. e.g. a flow stop valve.", +WallSwitch,"Any device attached to the wall that controls the status of something, e.g. a light switch, dimmer",wallswitch.png WebService,"Account with credentials for a website", Window,"Window",window.png WhiteGood,"Devices that look like Waschingmachines, Dishwashers, Dryers, Fridges, Ovens, etc.",whitegood.png diff --git a/addons/uis/apps/images/main-menu.png b/addons/uis/apps/images/main-menu.png index f595199bb..ba9ebd332 100644 Binary files a/addons/uis/apps/images/main-menu.png and b/addons/uis/apps/images/main-menu.png differ diff --git a/addons/uis/apps/images/widget-overview.png b/addons/uis/apps/images/widget-overview.png index bda715d2b..f5344f176 100644 Binary files a/addons/uis/apps/images/widget-overview.png and b/addons/uis/apps/images/widget-overview.png differ