diff --git a/bundles/org.openhab.ui/doc/components/index.md b/bundles/org.openhab.ui/doc/components/index.md index ec6733b53..907417af0 100644 --- a/bundles/org.openhab.ui/doc/components/index.md +++ b/bundles/org.openhab.ui/doc/components/index.md @@ -24,6 +24,7 @@ source: https://github.com/openhab/openhab-webui/edit/main/bundles/org.openhab.u | [`oh-player`](./oh-player.html) | [Media player](./oh-player.html) | Media player controls, with previous track/pause/play/next buttons | | [`oh-repeater`](./oh-repeater.html) | [Repeater](./oh-repeater.html) | Iterate over an array and repeat the children components in the default slot | | [`oh-rollershutter`](./oh-rollershutter.html) | [Rollershutter](./oh-rollershutter.html) | Rollershutter control, with up/down/stop buttons | +| [`oh-sipclient`](./oh-sipclient.html) | [SIP Client](./oh-sipclient.html) | SIP Client to call and answer SIP calls | | [`oh-slider`](./oh-slider.html) | [Slider](./oh-slider.html) | Slider control, allows to pick a number value on a scale | | [`oh-stepper`](./oh-stepper.html) | [Stepper](./oh-stepper.html) | Stepper control, allows to input a number or decrement/increment it using buttons | | [`oh-swiper`](./oh-swiper.html) | [Swiper](./oh-swiper.html) | Swiper control, allows to display multiple swipeable slides | @@ -47,6 +48,7 @@ source: https://github.com/openhab/openhab-webui/edit/main/bundles/org.openhab.u | [`oh-list-card`](./oh-list-card.html) | [List Card](./oh-list-card.html) | Display a list in a card | | [`oh-player-card`](./oh-player-card.html) | [Player Card](./oh-player-card.html) | Display player controls in a card | | [`oh-rollershutter-card`](./oh-rollershutter-card.html) | [Rollershutter Card](./oh-rollershutter-card.html) | Display rollershutter controls in a card | +| [`oh-sipclient-card`](./oh-sipclient-card.html) | [SIP Client Card](./oh-sipclient-card.html) | Client to start and answer SIP calls | | [`oh-slider-card`](./oh-slider-card.html) | [Slider Card](./oh-slider-card.html) | Display a slider in a card to control an item | | [`oh-stepper-card`](./oh-stepper-card.html) | [Stepper Card](./oh-stepper-card.html) | Display a stepper in a card to control an item | | [`oh-swiper-card`](./oh-swiper-card.html) | [Swiper Card](./oh-swiper-card.html) | Display a swiper allowing to browse slides, in a card | diff --git a/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md b/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md index 65ae601bc..dd4850361 100644 --- a/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md +++ b/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md @@ -137,6 +137,155 @@ prev: /docs/ui/components/ +### Action +
+ + Action to perform when the element is clicked + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ diff --git a/bundles/org.openhab.ui/doc/components/oh-button.md b/bundles/org.openhab.ui/doc/components/oh-button.md index 4ebd48d9a..1aff46883 100644 --- a/bundles/org.openhab.ui/doc/components/oh-button.md +++ b/bundles/org.openhab.ui/doc/components/oh-button.md @@ -256,6 +256,155 @@ Button performing an action +### Tap Hold +
+ + Action performed when tapping and holding card (or calling contextual menu on desktop) + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ diff --git a/bundles/org.openhab.ui/doc/components/oh-calendar-axis.md b/bundles/org.openhab.ui/doc/components/oh-calendar-axis.md index caf7906a6..02adb8d83 100644 --- a/bundles/org.openhab.ui/doc/components/oh-calendar-axis.md +++ b/bundles/org.openhab.ui/doc/components/oh-calendar-axis.md @@ -54,6 +54,155 @@ prev: /docs/ui/components/ +### Action +
+ + Action to perform when the element is clicked + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ diff --git a/bundles/org.openhab.ui/doc/components/oh-calendar-series.md b/bundles/org.openhab.ui/doc/components/oh-calendar-series.md index bc90fec9d..9619282d5 100644 --- a/bundles/org.openhab.ui/doc/components/oh-calendar-series.md +++ b/bundles/org.openhab.ui/doc/components/oh-calendar-series.md @@ -99,6 +99,155 @@ prev: /docs/ui/components/ +### Action +
+ + Action to perform when the element is clicked + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ diff --git a/bundles/org.openhab.ui/doc/components/oh-data-series.md b/bundles/org.openhab.ui/doc/components/oh-data-series.md index d9bff2d08..127e2b685 100644 --- a/bundles/org.openhab.ui/doc/components/oh-data-series.md +++ b/bundles/org.openhab.ui/doc/components/oh-data-series.md @@ -40,6 +40,155 @@ prev: /docs/ui/components/ +### Action +
+ + Action to perform when the element is clicked + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ diff --git a/bundles/org.openhab.ui/doc/components/oh-input-card.md b/bundles/org.openhab.ui/doc/components/oh-input-card.md index d358cfe01..2a0094faf 100644 --- a/bundles/org.openhab.ui/doc/components/oh-input-card.md +++ b/bundles/org.openhab.ui/doc/components/oh-input-card.md @@ -115,6 +115,11 @@ Display an input in a card Link the input value to the state of this item + + + Use the formatted state as the value for the input control + + Default value when not found in item state or variable diff --git a/bundles/org.openhab.ui/doc/components/oh-input-item.md b/bundles/org.openhab.ui/doc/components/oh-input-item.md index e6b00b77c..8247a1d58 100644 --- a/bundles/org.openhab.ui/doc/components/oh-input-item.md +++ b/bundles/org.openhab.ui/doc/components/oh-input-item.md @@ -120,6 +120,11 @@ Display an input field in a list Link the input value to the state of this item + + + Use the formatted state as the value for the input control + + Default value when not found in item state or variable diff --git a/bundles/org.openhab.ui/doc/components/oh-input.md b/bundles/org.openhab.ui/doc/components/oh-input.md index eaaad4a55..e43dca0ee 100644 --- a/bundles/org.openhab.ui/doc/components/oh-input.md +++ b/bundles/org.openhab.ui/doc/components/oh-input.md @@ -83,6 +83,11 @@ Displays an input field, used to set a variable Link the input value to the state of this item + + + Use the formatted state as the value for the input control + + Default value when not found in item state or variable diff --git a/bundles/org.openhab.ui/doc/components/oh-label-card.md b/bundles/org.openhab.ui/doc/components/oh-label-card.md index a4104af82..03025b8c5 100644 --- a/bundles/org.openhab.ui/doc/components/oh-label-card.md +++ b/bundles/org.openhab.ui/doc/components/oh-label-card.md @@ -206,6 +206,155 @@ Display the state of an item in a card +### Tap Hold +
+ + Action performed when tapping and holding card (or calling contextual menu on desktop) + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ ### Label
diff --git a/bundles/org.openhab.ui/doc/components/oh-plan-marker.md b/bundles/org.openhab.ui/doc/components/oh-plan-marker.md index 6a07cbc03..69bce0afd 100644 --- a/bundles/org.openhab.ui/doc/components/oh-plan-marker.md +++ b/bundles/org.openhab.ui/doc/components/oh-plan-marker.md @@ -49,6 +49,7 @@ A marker on a floor plan ### Icon
+ You can customize the styles further with CSS attributes in the iconStyle parameter (in YAML only) Use oh:iconName (openHAB icon), f7:iconName (Framework7 icon), material:iconName (Material icon) or iconify:iconSet:iconName (Iconify icon, requires being online if not in cache) @@ -79,6 +80,11 @@ A marker on a floor plan Color of the icon (for Framework7/Material/certain Iconify icons); use expression for dynamic colors + + + Rotation of the icon in degrees + +
@@ -108,6 +114,34 @@ A marker on a floor plan Color of the tooltip + + + The direction of the tooltip + + + + + + + + + + + + + The X offset of the tooltip from the marker in pixels + + + + + The Y offset of the tooltip from the marker in pixels + + + + + The opacity of the tooltip (0-1) + +
diff --git a/bundles/org.openhab.ui/doc/components/oh-plan-page.md b/bundles/org.openhab.ui/doc/components/oh-plan-page.md index db07857ea..4f36dcad4 100644 --- a/bundles/org.openhab.ui/doc/components/oh-plan-page.md +++ b/bundles/org.openhab.ui/doc/components/oh-plan-page.md @@ -71,6 +71,16 @@ Displays markers on an image overlay Apply an invert filter to the image in dark mode - use with images in black & white or grayscale for best results
+ + + Color of the tooltip. "Black or White" means it will be black in dark mode and white in light mode + + + + + + + diff --git a/bundles/org.openhab.ui/doc/components/oh-sipclient-card.md b/bundles/org.openhab.ui/doc/components/oh-sipclient-card.md new file mode 100644 index 000000000..b0d71c27a --- /dev/null +++ b/bundles/org.openhab.ui/doc/components/oh-sipclient-card.md @@ -0,0 +1,180 @@ +--- +title: oh-sipclient-card - SIP Client Card +component: oh-sipclient-card +label: SIP Client Card +description: SIP Client +source: https://github.com/openhab/openhab-webui/edit/main/bundles/org.openhab.ui/doc/components/oh-sipclient-card.md +prev: /docs/ui/components/ +--- + +# oh-sipclient-card - SIP Client Card + + + +[[toc]] + + + + +Client to start and answer SIP calls + + +## Configuration + + + +### Card +
+ + Parameters of the card + + + Title of the card + + + + + Footer of the card + + + + + Do not render the card border + + + + + Do not render a shadow effect to the card + + + + + Show the card outline + + + +
+ +### SIP Settings +
+ + + + Size of the icon(s) in px + + + + + Full URL of the WebRTC SIP websocket, e.g. 'wss://siphost:8089/ws' or relative path, e.g. '/ws', for Android & iOS, you need wss (WebSocket secured) + + + + + SIP Domain + + + + + SIP Username + + + + + SIP Password + + + + + Enable ringback and ring tone, might cause issues with your browser, so that your call fails + + + + + Hides the username of the remote party on incoming call + + + + + Single SIP Address (phone number) for a single call target or a comma-separated list of 'phoneNumber=name' for multiple call targets + + + + + Enable video calling + + + + + Display the local camera on video calls + + + + + Default video aspect ratio used to size the widget before video is loaded. Defaults to 4/3, 16/9 and 1 are common alternatives. + + + + + Display a button to send a preset DTMF string while in calls for remote doors, gates, etc... + + + + + +
+ + + + + + + + + + + diff --git a/bundles/org.openhab.ui/doc/components/oh-sipclient.md b/bundles/org.openhab.ui/doc/components/oh-sipclient.md new file mode 100644 index 000000000..5da9d187a --- /dev/null +++ b/bundles/org.openhab.ui/doc/components/oh-sipclient.md @@ -0,0 +1,148 @@ +--- +title: oh-sipclient - SIP Client +component: oh-sipclient +label: SIP Client +description: Use SIP over WebSocket to perform calls +source: https://github.com/openhab/openhab-webui/edit/main/bundles/org.openhab.ui/doc/components/oh-sipclient.md +prev: /docs/ui/components/ +--- + +# oh-sipclient - SIP Client + + + +[[toc]] + + + + +SIP Client to call and answer SIP calls + + +## Configuration + + + +### General +
+ + + + Size of the icon(s) in px + + + + + Full URL of the WebRTC SIP websocket, e.g. 'wss://siphost:8089/ws' or relative path, e.g. '/ws', for Android & iOS, you need wss (WebSocket secured) + + + + + SIP Domain + + + + + SIP Username + + + + + SIP Password + + + + + Enable ringback and ring tone, might cause issues with your browser, so that your call fails + + + + + Hides the username of the remote party on incoming call + + + + + Single SIP Address (phone number) for a single call target or a comma-separated list of 'phoneNumber=name' for multiple call targets + + + + + Enable video calling + + + + + Display the local camera on video calls + + + + + Default video aspect ratio used to size the widget before video is loaded. Defaults to 4/3, 16/9 and 1 are common alternatives. + + + + + Display a button to send a preset DTMF string while in calls for remote doors, gates, etc... + + + + + +
+ + + + + + + + + + + diff --git a/bundles/org.openhab.ui/doc/components/oh-time-series.md b/bundles/org.openhab.ui/doc/components/oh-time-series.md index 4aa74476e..f9f710a8b 100644 --- a/bundles/org.openhab.ui/doc/components/oh-time-series.md +++ b/bundles/org.openhab.ui/doc/components/oh-time-series.md @@ -91,6 +91,155 @@ prev: /docs/ui/components/ +### Action +
+ + Action to perform when the element is clicked + + + Type of action to perform + + + + + + + + + + + + + + + + + + + + URL to navigate to + + + + + Open the URL in the same tab/window instead of a new one. This will exit the app. + + + + + Item to perform the action on + + + + + Command to send to the item. If "toggle item" is selected as the action, only send the command when the state is different + + + + + Command to send to the item when "toggle item" is selected as the action, and the item's state is equal to the command above + + + + + Comma-separated list of options; if omitted, retrieve the command options from the item dynamically. Use value=label format to provide a label different than the option. + + + + + Rule to run + + + + + Page to navigate to + + + + + Use a specific page transition animation + + + + + + + + + + + + + + + Page or widget to display in the modal + + + + + Configuration (prop values) for the target modal page or widget + + + + + Array of URLs or objects representing the images. Auto-refresh is not supported.
Edit in YAML or provide a JSON array, e.g.
[ "url1", { "item": "ImageItem1", "caption": "Camera" } ]
Objects are in the photos array format with an additional item property to specify an item to view. +
+
+ + + Configuration for the photo browser.
Edit in YAML or provide a JSON object, e.g.
{ "exposition": false, "type": "popup", "theme": "dark" }
See photo browser parameters (not all are supported). +
+
+ + + Group item whose members to show in a popup + + + + + Start analyzing with the specified (set of) item(s) + + + + + The initial analyzing period - dynamic or a predefined fixed period: day, week, month or year + + + + + + + + + + + + The initial coordinate system of the analyzer - time, aggregate or calendar (only time is supported for dynamic periods) + + + + + + + + + + Shows a toast popup when the action has been executed. Can either be a text to show or a JSON object including some of the supported parameters + + + + + The variable name to set + + + + + The value to set the variable to + + +
+
+ diff --git a/bundles/org.openhab.ui/doc/components/oh-video-card.md b/bundles/org.openhab.ui/doc/components/oh-video-card.md index 180bb2611..2ab64a640 100644 --- a/bundles/org.openhab.ui/doc/components/oh-video-card.md +++ b/bundles/org.openhab.ui/doc/components/oh-video-card.md @@ -80,11 +80,30 @@ Display a video (URL or URL from String item) in a card Hide the control buttons of the video - + Does not start playing the video automatically + + + Select the player type (optional), defualts to Video.js + + + + + + + + + WebRTC stun server (optional), defaults to 'stun:stun.l.google.com:19302' + + + + + WebRTC ICE candidates discovery timeout length in milliseconds (optional), defaults to '2000', '0' to disable + + diff --git a/bundles/org.openhab.ui/doc/components/oh-video.md b/bundles/org.openhab.ui/doc/components/oh-video.md index fffa18e29..aec5012b2 100644 --- a/bundles/org.openhab.ui/doc/components/oh-video.md +++ b/bundles/org.openhab.ui/doc/components/oh-video.md @@ -48,11 +48,30 @@ Displays a video player from a URL or an item Hide the control buttons of the video - + Does not start playing the video automatically + + + Select the player type (optional), defualts to Video.js + + + + + + + + + WebRTC stun server (optional), defaults to 'stun:stun.l.google.com:19302' + + + + + WebRTC ICE candidates discovery timeout length in milliseconds (optional), defaults to '2000', '0' to disable + + diff --git a/bundles/org.openhab.ui/web/package-lock.json b/bundles/org.openhab.ui/web/package-lock.json index 4a7ff4a33..53d51ce00 100644 --- a/bundles/org.openhab.ui/web/package-lock.json +++ b/bundles/org.openhab.ui/web/package-lock.json @@ -22,6 +22,7 @@ "framework7": "^5.7.12", "framework7-icons": "^3.0.1", "framework7-vue": "^5.7.12", + "jssip": "^3.9.1", "leaflet": "^1.7.1", "leaflet-providers": "^1.11.0", "lodash": "^4.17.20", @@ -3696,6 +3697,14 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/eslint": { "version": "7.2.6", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.6.tgz", @@ -3774,11 +3783,15 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "node_modules/@types/node": { - "version": "14.6.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", - "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==", - "dev": true + "version": "14.18.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz", + "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -7493,12 +7506,19 @@ "dev": true }, "node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/debug-log": { @@ -7510,6 +7530,11 @@ "node": ">=0.10.0" } }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -9692,10 +9717,9 @@ "dev": true }, "node_modules/events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", - "dev": true, + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "engines": { "node": ">=0.8.x" } @@ -13036,6 +13060,18 @@ "verror": "1.10.0" } }, + "node_modules/jssip": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/jssip/-/jssip-3.9.1.tgz", + "integrity": "sha512-hl8jxkte4p0zHl9Nen03rdwP8lbBwMy3SnrmzVf7f+Jhvnz7gF/WXdFi35zpEpxAmxFLczxD4U8ATK/CHEwhqw==", + "dependencies": { + "@types/debug": "^4.1.5", + "@types/node": "^14.14.34", + "debug": "^4.3.1", + "events": "^3.3.0", + "sdp-transform": "^2.14.1" + } + }, "node_modules/jsx-ast-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", @@ -17970,6 +18006,14 @@ "strip-css-comments": "^3.0.0" } }, + "node_modules/sdp-transform": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.1.tgz", + "integrity": "sha512-RjZyX3nVwJyCuTo5tGPx+PZWkDMCg7oOLpSlhjDdZfwUoNqG1mM8nyj31IGHyaPWXhjbP7cdK3qZ2bmkJ1GzRw==", + "bin": { + "sdp-verify": "checker.js" + } + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -26097,6 +26141,14 @@ "@babel/types": "^7.3.0" } }, + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "requires": { + "@types/ms": "*" + } + }, "@types/eslint": { "version": "7.2.6", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.6.tgz", @@ -26175,11 +26227,15 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "@types/node": { - "version": "14.6.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", - "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==", - "dev": true + "version": "14.18.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz", + "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==" }, "@types/parse-json": { "version": "4.0.0", @@ -29371,12 +29427,18 @@ "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } } }, "debug-log": { @@ -31180,10 +31242,9 @@ "dev": true }, "events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", - "dev": true + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, "eventsource": { "version": "1.1.2", @@ -33928,6 +33989,18 @@ "verror": "1.10.0" } }, + "jssip": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/jssip/-/jssip-3.9.1.tgz", + "integrity": "sha512-hl8jxkte4p0zHl9Nen03rdwP8lbBwMy3SnrmzVf7f+Jhvnz7gF/WXdFi35zpEpxAmxFLczxD4U8ATK/CHEwhqw==", + "requires": { + "@types/debug": "^4.1.5", + "@types/node": "^14.14.34", + "debug": "^4.3.1", + "events": "^3.3.0", + "sdp-transform": "^2.14.1" + } + }, "jsx-ast-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", @@ -37999,6 +38072,11 @@ "strip-css-comments": "^3.0.0" } }, + "sdp-transform": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.1.tgz", + "integrity": "sha512-RjZyX3nVwJyCuTo5tGPx+PZWkDMCg7oOLpSlhjDdZfwUoNqG1mM8nyj31IGHyaPWXhjbP7cdK3qZ2bmkJ1GzRw==" + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", diff --git a/bundles/org.openhab.ui/web/package.json b/bundles/org.openhab.ui/web/package.json index 2ef3fcaa0..c9e6078fa 100644 --- a/bundles/org.openhab.ui/web/package.json +++ b/bundles/org.openhab.ui/web/package.json @@ -74,6 +74,7 @@ "framework7": "^5.7.12", "framework7-icons": "^3.0.1", "framework7-vue": "^5.7.12", + "jssip": "^3.9.1", "leaflet": "^1.7.1", "leaflet-providers": "^1.11.0", "lodash": "^4.17.20", diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js index 01d7fd7d9..2fad8a4ab 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js @@ -1,7 +1,7 @@ // definitions for the chart widgets // TODO: migrate to WidgetDefinition & use helpers -import { actionGroup, actionParams } from '../actions' +import { actionGroup, actionParams } from '../actions.js' const positionGroup = { name: 'position', diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/standard/cards.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/standard/cards.js index 2bc1925bd..d22059604 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/standard/cards.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/standard/cards.js @@ -164,3 +164,9 @@ export const OhClockCardDefinition = () => new WidgetDefinition('oh-clock-card', }) ]) .paramGroup(actionGroup(null, 'Action to perform when the clock is clicked'), actionParams()) + +// OhSIPClientCard +import SIPClientParameters from '../system/sipclient.js' +export const OhSIPClientCardDefinition = () => new WidgetDefinition('oh-sipclient-card', 'SIP Client Card', 'Client to start and answer SIP calls') + .paramGroup(CardParameterGroup(), CardParameters()) + .paramGroup(pg('sip', 'SIP Settings'), SIPClientParameters()) diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/index.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/index.js index 1331fdaef..c811fcb62 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/index.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/index.js @@ -93,3 +93,7 @@ export const OhRepeaterDefinition = () => new WidgetDefinition('oh-repeater', 'R import ClockParameters from './clock.js' export const OhClockDefinition = () => new WidgetDefinition('oh-clock', 'Digital Clock', 'Display a digital clock') .params(ClockParameters()) + +import SIPClientParameters from './sipclient.js' +export const OhSIPClientDefinition = () => new WidgetDefinition('oh-sipclient', 'SIP Client', 'SIP Client to call and answer SIP calls') + .params(SIPClientParameters()) diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/sipclient.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/sipclient.js new file mode 100644 index 000000000..c0c27be80 --- /dev/null +++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/sipclient.js @@ -0,0 +1,17 @@ +import { pt, pn, pb } from '../helpers.js' + +export default () => [ + pn('iconSize', 'Icon Size', 'Size of the icon(s) in px'), + pt('websocketUrl', 'Websocket URL', 'Full URL of the WebRTC SIP websocket, e.g. \'wss://siphost:8089/ws\' or relative path, e.g. \'/ws\', for Android & iOS, you need wss (WebSocket secured)').r(), + pt('domain', 'Domain', 'SIP Domain').r(), + pt('username', 'Username', 'SIP Username').r(), + pt('password', 'Password', 'SIP Password').r(), + pb('enableTones', 'Enable tones', 'Enable ringback and ring tone, might cause issues with your browser, so that your call fails'), + pb('hideCallerId', 'Hide caller id', 'Hides the username of the remote party on incoming call'), + pt('phonebook', 'Phonebook', 'Single SIP Address (phone number) for a single call target or a comma-separated list of \'phoneNumber=name\' for multiple call targets').r(), + pb('enableVideo', 'Enable Video', 'Enable video calling'), + pb('enableLocalVideo', 'Enable Local Video View', 'Display the local camera on video calls'), + pt('defaultVideoAspectRatio', 'Default Aspect Ratio', 'Default video aspect ratio used to size the widget before video is loaded. Defaults to 4/3, 16/9 and 1 are common alternatives.').a(), + pt('dtmfString', 'DTMF String', 'Display a button to send a preset DTMF string while in calls for remote doors, gates, etc...').a(), + pb('enableSIPDebug', 'Enable SIP debugging to the console').a() +] diff --git a/bundles/org.openhab.ui/web/src/components/widgets/standard/index.js b/bundles/org.openhab.ui/web/src/components/widgets/standard/index.js index d64c7860c..c1697f7d0 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/standard/index.js +++ b/bundles/org.openhab.ui/web/src/components/widgets/standard/index.js @@ -16,3 +16,4 @@ export { default as OhSwiperCard } from './oh-swiper-card.vue' export { default as OhListCard } from './oh-list-card.vue' export { default as OhWebframeCard } from './oh-webframe-card.vue' export { default as OhClockCard } from './oh-clock-card.vue' +export { default as OhSipclientCard } from './oh-sipclient-card.vue' diff --git a/bundles/org.openhab.ui/web/src/components/widgets/standard/oh-sipclient-card.vue b/bundles/org.openhab.ui/web/src/components/widgets/standard/oh-sipclient-card.vue new file mode 100644 index 000000000..1511dc65c --- /dev/null +++ b/bundles/org.openhab.ui/web/src/components/widgets/standard/oh-sipclient-card.vue @@ -0,0 +1,27 @@ + + + diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/index.js b/bundles/org.openhab.ui/web/src/components/widgets/system/index.js index de1065dbb..10145440f 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/system/index.js +++ b/bundles/org.openhab.ui/web/src/components/widgets/system/index.js @@ -21,3 +21,4 @@ export { default as OhWebframe } from './oh-webframe.vue' export { default as OhRepeater } from './oh-repeater.vue' export { default as OhChart } from './oh-chart.vue' export { default as OhClock } from './oh-clock.vue' +export { default as OhSipclient } from './oh-sipclient.vue' diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient-ringback.mp3 b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient-ringback.mp3 new file mode 100644 index 000000000..c6c09c214 Binary files /dev/null and b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient-ringback.mp3 differ diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient-ringtone.mp3 b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient-ringtone.mp3 new file mode 100644 index 000000000..1b7a3b981 Binary files /dev/null and b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient-ringtone.mp3 differ diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient.vue b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient.vue new file mode 100644 index 000000000..e010e08ab --- /dev/null +++ b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-sipclient.vue @@ -0,0 +1,276 @@ + + + + +