https://github.com/loop333/ha_web_server_example
Home Assistant Custom Web Server Example
https://github.com/loop333/ha_web_server_example
aiohttp cnn custom-components example home-assistant no-ads python rss-feed tvpassport web-api web-server youtube youtube-dl
Last synced: 3 months ago
JSON representation
Home Assistant Custom Web Server Example
- Host: GitHub
- URL: https://github.com/loop333/ha_web_server_example
- Owner: loop333
- License: mit
- Created: 2019-03-14T21:16:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-27T19:52:58.000Z (over 6 years ago)
- Last Synced: 2025-01-09T22:24:45.260Z (12 months ago)
- Topics: aiohttp, cnn, custom-components, example, home-assistant, no-ads, python, rss-feed, tvpassport, web-api, web-server, youtube, youtube-dl
- Language: Python
- Size: 20.5 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Home Assistant Custom Web Server Or API Example
install:
```sh
cd ~/.homeassistant/custom_components
git clone https://github.com/loop333/ha_web_server_example my_api
```
configuration.yaml:
```yaml
my_api:
```
Check result:
```
http://:8123/my_api/tvpassport/cnn/70
http://:8123/my_api/news/cnn/cnn_latest.rss
http://:8123/my_api/news/echo
http://:8123/my_api/youtube?p=PLHFlHpPjgk72jb60xIb7Jrx4sG06os6bx&f=18&s=1&n=10
```
Youtube url format:
```
USER: /my_api/youtube?u=&f=18&s=1&n=10
CHANNEL: /my_api/youtube?c=&f=18&s=1&n=10
PLAYLIST: /my_api/youtube?p=&f=18&s=1&n=10
VIDEO: /my_api/youtube?v=&f=18
where:
f - format id, default 18
s - playlist start position, default 1
n - playlist items count from start position, default 10
```