✨ Initial Commit
Add all files from private repo
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Home Assistant Community Add-on: TVHeadend
|
||||
|
||||
[![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield]
|
||||
|
||||
[![Community Forum][forum-shield]][forum]
|
||||
|
||||
TVHeadend add-on by GauthamVarmaK.
|
||||
|
||||
## About
|
||||
|
||||
TVHeadend is a TV streaming server and recorder supporting:
|
||||
DVB-S, DVB-S2, DVB-C, DVB-T, DVB-T2, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun
|
||||
as input sources.
|
||||
TVHeadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
|
||||
|
||||
Multiple EPG sources are supported (over-the-air DVB and ATSC including OpenTV DVB extensions, XMLTV, PyXML).
|
||||
|
||||
Have included the following along with TVHeadend:
|
||||
-Webgrab+
|
||||
-Streamlink
|
||||
|
||||
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
|
||||
[forum]: https://community.home-assistant.io/u/gauthamvarmak
|
||||
[maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg
|
||||
[project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg
|
||||
[release-shield]: https://img.shields.io/badge/version-{{ version }}-blue.svg
|
||||
[release]: {{ repo }}/tree/{{ version }}
|
||||
@@ -0,0 +1,91 @@
|
||||
# Home Assistant Community Add-on: TVHeadend
|
||||
|
||||
TVHeadend is a TV streaming server and recorder supporting:
|
||||
DVB-S, DVB-S2, DVB-C, DVB-T, DVB-T2, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun
|
||||
as input sources.
|
||||
TVHeadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
|
||||
|
||||
Multiple EPG sources are supported such as
|
||||
over-the-air DVB and ATSC including OpenTV DVB extensions, XMLTV, PyXML.
|
||||
|
||||
Have included the following along with TVHeadend:
|
||||
-Webgrab+
|
||||
-Streamlink
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in
|
||||
comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Install "Gautham's Add-ons" in supervisor.
|
||||
1. Search for the "TVHeadend" add-on in the Supervisor add-on store and install it.
|
||||
1. Start the "TVHeadend" add-on.
|
||||
1. Check the logs of the "TVHeadend" to see if everything went well.
|
||||
1. Click the "OPEN WEB UI" button and start using it.
|
||||
1. Ready to go!
|
||||
|
||||
## Configuration
|
||||
|
||||
No changes needed from the user, unless u need to change the ports.
|
||||
|
||||
-Config files are stored in /config/tvheadend/
|
||||
-Recording files are stored in /config/tvheadend/recordings/
|
||||
Consider, backing them up whenever migrating.
|
||||
|
||||
## Changelog & Releases
|
||||
|
||||
This repository keeps a change log using [GitHub's releases][releases]
|
||||
functionality.
|
||||
|
||||
Releases are based on [Semantic Versioning][semver], and use the format
|
||||
of `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented
|
||||
based on the following:
|
||||
|
||||
- `MAJOR`: Incompatible or major changes.
|
||||
- `MINOR`: Backwards-compatible new features and enhancements.
|
||||
- `PATCH`: Backwards-compatible bugfixes and package updates.
|
||||
|
||||
## Support
|
||||
|
||||
Got questions?
|
||||
|
||||
You have several options to get them answered:
|
||||
|
||||
- The Home Assistant [Community Forum][forum].
|
||||
- You could also [open an issue here][issue] GitHub.
|
||||
|
||||
## Authors & contributors
|
||||
|
||||
This repository is owned and maintained by [GauthamVarmaK][gautham].
|
||||
|
||||
This has been possible thanks to the community add-ons initiative by [Frenck][frenck]
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 GauthamVarmaK
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
[forum]: https://community.home-assistant.io/
|
||||
[gautham]: https://github.com/GauthamVarmaK
|
||||
[frenck]: https://github.com/frenck
|
||||
[issue]: https://github.com/GauthamVarmaK/addon-tvheadend/issues
|
||||
[releases]: https://github.com/GauthamVarmaK/addon-tvheadend/releases
|
||||
@@ -0,0 +1,33 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:9.2.0
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
|
||||
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
|
||||
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories
|
||||
|
||||
COPY run.sh /run.sh
|
||||
RUN chmod +x /run.sh
|
||||
RUN /run.sh
|
||||
|
||||
RUN echo "Starting TVHeadend"
|
||||
ENTRYPOINT ["/usr/bin/tvheadend", "--firstrun", "-u", "root", "-g", "root", "-c", "/config/tvheadend"]
|
||||
|
||||
# Labels
|
||||
LABEL \
|
||||
io.hass.name="TVHeadend" \
|
||||
io.hass.description="TVHeadend Add-On" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="https://github.com/GauthamVarmaK" \
|
||||
org.label-schema.description="TVHeadend Home Assistant Add-On" \
|
||||
org.label-schema.build-date=${BUILD_DATE} \
|
||||
org.label-schema.name="TVHeadend" \
|
||||
org.label-schema.name="Home Assistant Addon: TVHeadend ${BUILD_ARCH}" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.url="https://github.com/GauthamVarmaK/addon-tvheadend" \
|
||||
org.label-schema.usage="https://github.com/GauthamVarmaK/addon-tvheadend" \
|
||||
org.label-schema.vcs-ref=${BUILD_REF} \
|
||||
org.label-schema.vcs-url="https://github.com/GauthamVarmaK/addon-tvheadend" \
|
||||
org.label-schema.vendor="https://github.com/GauthamVarmaK"
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"build_from": {
|
||||
"aarch64": "ghcr.io/hassio-addons/base/aarch64:9.2.0",
|
||||
"amd64": "ghcr.io/hassio-addons/base/amd64:9.2.0",
|
||||
"armhf": "ghcr.io/hassio-addons/base/armhf:9.2.0",
|
||||
"armv7": "ghcr.io/hassio-addons/base/armv7:9.2.0",
|
||||
"i386": "ghcr.io/hassio-addons/base/i386:9.2.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "TVHeadend",
|
||||
"version": "dev",
|
||||
"stage": "experimental",
|
||||
"slug": "addon-tvheadend",
|
||||
"description": "TV streaming server and recorder.",
|
||||
"url": "https://github.com/GauthamVarmaK/addon-tvheadend",
|
||||
"startup": "services",
|
||||
"arch": ["aarch64", "amd64", "armhf", "armv7", "i386"],
|
||||
"webui": "http://[HOST]:[PORT:9981]/",
|
||||
"ports": {
|
||||
"9981/tcp": 9981,
|
||||
"9982/tcp": 9982
|
||||
},
|
||||
"ports_description": {
|
||||
"9981/tcp": "TVH Web Interface",
|
||||
"9982/tcp": "TVH HTSP"
|
||||
},
|
||||
"map": ["config:rw"]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env bashio
|
||||
|
||||
bashio::log.info "[TVHeadend] Installing TVHeadend"
|
||||
apk update && apk add --no-cache tvheadend=4.2.8-r3 git=2.31.1-r1 mono=6.12.0.122-r1
|
||||
|
||||
mkdir -p /config/tvheadend/recordings
|
||||
|
||||
bashio::log.info '[TVHeadend] Setup completed without errors!!'
|
||||
|
||||
mkdir -p ~/.wg++
|
||||
ln -sf /config/tvheadend/wg++/guide.xml ~/.wg++/guide.xml
|
||||
|
||||
if [ "$(ls -A /config/tvheadend/wg++)" ]; then
|
||||
bashio::log.info "[Webgrab+] Webgrab+ already installed"
|
||||
else
|
||||
bashio::log.info "[Webgrab+] No webgrab+ installation found - Installing webgrab+"
|
||||
cd /tmp && \
|
||||
wget http://www.webgrabplus.com/sites/default/files/download/SW/V2.1.0/WebGrabPlus_V2.1_install.tar.gz && \
|
||||
tar -xvf WebGrabPlus_V2.1_install.tar.gz && rm WebGrabPlus_V2.1_install.tar.gz && \
|
||||
mv .wg++/ /config/tvheadend/wg++ && \
|
||||
cd /config/tvheadend/wg++ && \
|
||||
./install.sh
|
||||
|
||||
rm -rf siteini.pack/ && \
|
||||
git clone https://github.com/DeBaschdi/webgrabplus-siteinipack.git && \
|
||||
cp -R webgrabplus-siteinipack/siteini.pack/ siteini.pack && \
|
||||
cp siteini.pack/International/horizon.tv.* siteini.user/
|
||||
fi
|
||||
|
||||
wget -O /usr/bin/tv_grab_wg++ http://www.webgrabplus.com/sites/default/files/tv_grab_wg.txt && \
|
||||
chmod a+x /usr/bin/tv_grab_wg++
|
||||
|
||||
bashio::log.info '[Webgrab+] Setup completed without errors!!'
|
||||
|
||||
echo "0 0 * * * /config/tvheadend/wg++/run.sh" >> /var/spool/cron/root
|
||||
crond
|
||||
|
||||
check_streamlink () {
|
||||
if [ -z "$(command -v streamlink)" ]; then return 1; else return 0; fi
|
||||
}
|
||||
|
||||
streamlink_update () {
|
||||
if pip3 install --no-cache --upgrade streamlink; then
|
||||
bashio::log.info "[StreamLink] Streamlink version: $(streamlink --version)."
|
||||
else
|
||||
bashio::log.error '[StreamLink] Streamlink update failed!'
|
||||
fi
|
||||
}
|
||||
|
||||
streamlink_install () {
|
||||
bashio::log.info '[StreamLink] APK: Updating pkg list.'
|
||||
if apk update; then
|
||||
bashio::log.info '[StreamLink] APK: Installing required packages.'
|
||||
if apk add --no-cache py3-pip && apk add --no-cache --virtual .build-deps gcc musl-dev; then
|
||||
bashio::log.info '[StreamLink] PIP3: Updating and installing required packages.'
|
||||
if ! pip3 install --no-cache --upgrade setuptools; then bashio::log.error '[StreamLink] PIP3: Error while upgrading setuptools.'; fi
|
||||
if ! pip3 install --no-cache streamlink; then bashio::log.error '[StreamLink] PIP3: Error while installing Streamlink.'; fi
|
||||
else
|
||||
bashio::log.info '[StreamLink] APK: Critical error. Unable install required packages.'
|
||||
exit 1
|
||||
fi
|
||||
bashio::log.info '[StreamLink] APK: Removing packages no longer required.'
|
||||
apk del .build-deps gcc musl-dev
|
||||
else
|
||||
bashio::log.error '[StreamLink] APK: Critical error. Unable to update pkg list. Check connectivity.'
|
||||
exit 1
|
||||
fi
|
||||
bashio::log.info '[StreamLink] Finsihed all APK and PIP3 updates and installs.'
|
||||
}
|
||||
|
||||
if check_streamlink; then
|
||||
bashio::log.info '[StreamLink] Updating Streamlink...' ; streamlink_update
|
||||
else
|
||||
bashio::log.info '[StreamLink] Installing Streamlink...'; streamlink_install
|
||||
fi
|
||||
|
||||
bashio::log.info '[StreamLink] Setup completed without errors!!'
|
||||
Reference in New Issue
Block a user