Skip to content

Commit

Permalink
revert to 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizmo2 committed Dec 9, 2021
1 parent 5aa0cb0 commit 556992f
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 363 deletions.
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ ZidooRC will eventually need to be released as a python library per HA requireme

Includes Media Browse support with favorites (although the latter is work-in-progress - currently hard-coded into media_player)

1.2 is tested up to HA version 2021.10 and uses cover-flow.
Dev is tested up to HA version 2021.10 and uses cover-flow.
Release 1.1 is tested from HA versions 2021.1 up to 2021.10, and requires manual integration.

![Media_Library](images/media_browser.png) ![Media_Player](images/tvshow_browse.png) ![Media_Player](images/movie_playing.png) ![Music_Player](images/music_player.png) ![TVshow_Player](images/tvshow_player.png)
![Media_Library](images/media_browser.png) ![Media_Player](images/media_player.png)


## Installation

### HACS Install
### HACS Install

1. Search for `Zidoo` under `Integrations` in the HACS Store tab.
2. **You will need to restart after installation for the component to start working.**
3. Configure the integation (see Configuration section)

### Manual Install

1. Copy `zidoo` folder from zidoo-player/custom_components to `\config\custom_components` (create folder if this is your first custom integration)
1. Copy zidoo folder to \config\custom_components (create folder if this is yuor first custom integration)
2. Restart HA

### Configuration

for latest version:

1. Add `Zidoo` Integration from the 'Configuraion-Integration' menu
1. Add Zidoo Integration from the Configuraion-Integration menu
2. Add the IP address of player
3. Enter the Password if you have authentication enabled

for version 1.1:

1. Edit your `/config/configuration.yaml` with
1. Edit your /config/configuration.yaml with

```
media_player:
Expand All @@ -46,18 +46,16 @@ media_player:
```
2. Restart HA

> If you have issues connecting with the device, it may be an authorization issue.
> 1. Try opening the 'Control Center' app and retry.
> 2. Try turning off validation using the button in the app.
If you have issues connecting with the device, it may be an authorization issue.
> 1. Try opening the 'Control Center' app and retry.
> 2. Try turning off validation using the button in the app.
## ToDo

- Testing on other devices
- WOL (does not work on Z9S due to hardware limitations - current code uses ethernet mac address)
- Authentication ( not sure if newer devices are more secure)
- Possible device specific options.
- Add Coverflow options for Shortcuts in Media Browse
- Add Discovery?
- Authentication ( not sure if newer devices are more secure)
- Add Coverflow options for Shortcuts



3 changes: 0 additions & 3 deletions custom_components/zidoo/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ async def async_step_user(self, user_input=None):
errors=errors,
)

async def async_step_import(self, user_input):
"""Handle import."""
return await self.async_step_user(user_input)

class ZidooOptionsFlowHandler(config_entries.OptionsFlow):
"""Handle a option flow for wiser hub."""
Expand Down
82 changes: 3 additions & 79 deletions custom_components/zidoo/const.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
"""Constants for Zidoo component."""
import logging
from .zidoorc import ZTYPE_VIDEO, ZTYPE_MOVIE, ZTYPE_TV_SHOW, ZTYPE_TV_SEASON,ZTYPE_TV_EPISODE,ZTYPE_COLLECTION,ZTYPE_OTHER
from homeassistant.components.media_player.const import (
MEDIA_CLASS_ALBUM,
MEDIA_CLASS_ARTIST,
MEDIA_CLASS_GENRE,
MEDIA_CLASS_DIRECTORY,
MEDIA_CLASS_EPISODE,
MEDIA_CLASS_MOVIE,
MEDIA_CLASS_PLAYLIST,
MEDIA_CLASS_TRACK,
MEDIA_CLASS_SEASON,
MEDIA_CLASS_TV_SHOW,
MEDIA_CLASS_VIDEO,
MEDIA_TYPE_MUSIC,
MEDIA_TYPE_ALBUM,
MEDIA_TYPE_ARTIST,
MEDIA_TYPE_GENRE,
MEDIA_TYPE_PLAYLIST,
MEDIA_TYPE_TRACK,
MEDIA_TYPE_SEASON,
MEDIA_TYPE_MOVIE,
MEDIA_TYPE_TVSHOW,
MEDIA_TYPE_EPISODE,
MEDIA_TYPE_VIDEO,
MEDIA_TYPE_URL,
)
_LOGGER = logging.getLogger(__package__)

DOMAIN = "zidoo"
Expand All @@ -35,63 +9,13 @@
UPDATE_TRACK = "update_track"
UPDATE_LISTENER = "update_listener"


# Hub
MANUFACTURER = "Zidoo"
ROOM = "Room"

CLIENTID_PREFIX = "home-assistant"
CLIENTID_NICKNAME = "Home Assistant"

# Default Values
CONF_SHORTCUT = "shortcut_json"

MEDIA_TYPE_FILE = "file"

ITEM_TYPE_MEDIA_CLASS = {
MEDIA_TYPE_ALBUM: MEDIA_CLASS_ALBUM,
MEDIA_TYPE_ARTIST: MEDIA_CLASS_ARTIST,
MEDIA_TYPE_EPISODE: MEDIA_CLASS_EPISODE,
MEDIA_TYPE_MOVIE: MEDIA_CLASS_MOVIE,
MEDIA_TYPE_PLAYLIST: MEDIA_CLASS_PLAYLIST,
MEDIA_TYPE_SEASON: MEDIA_CLASS_SEASON,
MEDIA_TYPE_TVSHOW: MEDIA_CLASS_TV_SHOW,
MEDIA_TYPE_TRACK: MEDIA_CLASS_TRACK,
MEDIA_TYPE_VIDEO: MEDIA_CLASS_VIDEO,
MEDIA_TYPE_FILE: MEDIA_CLASS_DIRECTORY,
}

ZCONTENT_ITEM_TYPE = {
0: MEDIA_TYPE_FILE, # folder
1: MEDIA_TYPE_TRACK, # music
2: MEDIA_TYPE_VIDEO, # video
# 3: 'image', # 4: 'text', # 5: 'apk', # 6: 'pdf', # 7: 'document', # 8: 'spreadsheet', # 9: 'presentation', # 10: 'web', # 11: 'archive' , # 12: 'other'
1000: MEDIA_TYPE_FILE, # hhd
1001: MEDIA_TYPE_FILE, # usb
1002: MEDIA_TYPE_FILE, # usb
1003: MEDIA_TYPE_FILE, # tf
1004: MEDIA_TYPE_FILE, # nfs
1005: MEDIA_TYPE_FILE, # smb
1006: MEDIA_TYPE_FILE,
1007: MEDIA_TYPE_FILE,
1008: MEDIA_TYPE_FILE,
}

ZTYPE_MEDIA_CLASS = {
ZTYPE_VIDEO: MEDIA_CLASS_VIDEO,
ZTYPE_MOVIE: MEDIA_CLASS_MOVIE,
ZTYPE_COLLECTION: MEDIA_CLASS_MOVIE,
ZTYPE_TV_SHOW: MEDIA_CLASS_TV_SHOW,
ZTYPE_TV_SEASON: MEDIA_CLASS_SEASON,
ZTYPE_TV_EPISODE: MEDIA_CLASS_TRACK, # MEDIA_CLASS_EPISODE, # no episode images with zidoo
6: MEDIA_CLASS_TRACK, # Other
7: MEDIA_CLASS_TRACK, # Dummy for +1
}

ZTYPE_MEDIA_TYPE = {
ZTYPE_VIDEO: MEDIA_TYPE_VIDEO,
ZTYPE_MOVIE: MEDIA_TYPE_MOVIE,
ZTYPE_COLLECTION: MEDIA_TYPE_MOVIE,
ZTYPE_TV_SHOW: MEDIA_TYPE_TVSHOW,
ZTYPE_TV_SEASON: MEDIA_TYPE_SEASON,
ZTYPE_TV_EPISODE: MEDIA_TYPE_EPISODE, # no episode images with zidoo
ZTYPE_OTHER: MEDIA_TYPE_TRACK,
7: MEDIA_CLASS_TRACK, # Dummy for +1
}
2 changes: 1 addition & 1 deletion custom_components/zidoo/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"requirements": [],
"codeowners": ["@wizmo2"],
"iot_class": "local_polling",
"version": "1.2.5"
"version": "1.2.1"
}
Loading

0 comments on commit 556992f

Please sign in to comment.