diff --git a/docs/widgets/services/hdhomerun.md b/docs/widgets/services/hdhomerun.md
index a7351156cbb..261ab046ee7 100644
--- a/docs/widgets/services/hdhomerun.md
+++ b/docs/widgets/services/hdhomerun.md
@@ -5,10 +5,14 @@ description: HDHomerun Widget Configuration
Learn more about [HDHomerun](https://www.silicondust.com/support/downloads/).
-Allowed fields: `["channels", "hd"]`.
+Allowed fields: `["channels", "hd", "tunerCount", "channelNumber", "channelNetwork", "signalStrength", "signalQuality", "symbolQuality", "networkRate", "clientIP" ]`.
+
+If more than 4 fields are provided, only the first 4 are displayed.
```yaml
widget:
type: hdhomerun
url: http://hdhomerun.host.or.ip
+ tuner: 0 # optional - defaults to 0, used for tuner-specific fields
+ fields: ["channels", "hd"] # optional - default fields shown
```
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index b0f60a6d459..716f9270e91 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -535,7 +535,15 @@
},
"hdhomerun": {
"channels": "Channels",
- "hd": "HD"
+ "hd": "HD",
+ "tunerCount": "Tuners",
+ "channelNumber": "Channel",
+ "channelNetwork": "Network",
+ "signalStrength": "Strength",
+ "signalQuality": "Quality",
+ "symbolQuality": "Quality",
+ "networkRate": "Bitrate",
+ "clientIP": "Client"
},
"scrutiny": {
"passed": "Passed",
diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js
index 84be1666dfe..8d56e2a5367 100644
--- a/src/utils/config/service-helpers.js
+++ b/src/utils/config/service-helpers.js
@@ -398,6 +398,9 @@ export function cleanServiceGroups(groups) {
// glances, customapi, iframe
refreshInterval,
+ // hdhomerun
+ tuner,
+
// healthchecks
uuid,
@@ -541,6 +544,9 @@ export function cleanServiceGroups(groups) {
if (showTime) cleanedService.widget.showTime = showTime;
if (timezone) cleanedService.widget.timezone = timezone;
}
+ if (type === "hdhomerun") {
+ if (tuner !== undefined) cleanedService.widget.tuner = tuner;
+ }
if (type === "healthchecks") {
if (uuid !== undefined) cleanedService.widget.uuid = uuid;
}
diff --git a/src/widgets/hdhomerun/component.jsx b/src/widgets/hdhomerun/component.jsx
index 2b2cb24a40b..a118eafeded 100644
--- a/src/widgets/hdhomerun/component.jsx
+++ b/src/widgets/hdhomerun/component.jsx
@@ -4,14 +4,17 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
export default function Component({ service }) {
const { widget } = service;
+ const { tuner = 0 } = widget;
const { data: channelsData, error: channelsError } = useWidgetAPI(widget, "lineup");
+ const { data: statusData, error: statusError } = useWidgetAPI(widget, "status");
- if (channelsError) {
- return ;
+ if (channelsError || statusError) {
+ const finalError = channelsError ?? statusError;
+ return ;
}
- if (!channelsData) {
+ if (!channelsData || !statusData) {
return (
@@ -20,12 +23,30 @@ export default function Component({ service }) {
);
}
- const hdChannels = channelsData?.filter((channel) => channel.HD === 1);
+ // Provide a default if not set in the config
+ if (!widget.fields) {
+ widget.fields = ["channels", "hd"];
+ }
+ // Limit to a maximum of 4 at a time
+ if (widget.fields.length > 4) {
+ widget.fields = widget.fields.slice(0, 4);
+ }
return (
-
-
+
+ channel.HD === 1)?.length} />
+ num.VctNumber != null).length ?? 0} / ${statusData?.length ?? 0}`}
+ />
+
+
+
+
+
+
+
);
}
diff --git a/src/widgets/hdhomerun/widget.js b/src/widgets/hdhomerun/widget.js
index 689fbf0bcb3..e708b4d4d45 100644
--- a/src/widgets/hdhomerun/widget.js
+++ b/src/widgets/hdhomerun/widget.js
@@ -8,6 +8,9 @@ const widget = {
lineup: {
endpoint: "lineup.json",
},
+ status: {
+ endpoint: "status.json",
+ },
},
};