release homeassistant-0.80.3
This commit is contained in:
parent
8f94153f7e
commit
c89af0c7e7
@ -4,6 +4,7 @@ AUX homeassistant.logrotate 280 BLAKE2B a1e5ecf35df38b4928415af19c72bb3012fa8ea8
|
||||
AUX homeassistant.service 261 BLAKE2B 54819aa30aa5564aca693fa2dd70ad4a9831929a33f1042542e2555fa1ec2cb5cefd746b6abc308bc970f627803279dc3caf5fbf3de5c94b3fd73760e1343a38 SHA512 83f6ba1782f844c290f349ff50bdea8d8d88d41e2f39f3f7d5a015a0f463a4c8f7328acbd3838380cf6ca78090b39ebdbeb5e3f39607b5e307c0e53ff55ee697
|
||||
AUX recorder.yaml 114 BLAKE2B af04840805aa13124208584e7f1d40335905a083ee7deead5c0e4324c969f2a231c801c23e42075782950aba7535496d92747bf03efd73a80b0d07e8492d18f6 SHA512 cb4e353e54fb6dc7034569b8d62ddcdca92680c23c2c4e1ce707d21cf95e93f41a0c44521d8c3ee90b68c830f6b8e65dab82ae64bfa09727ae384550f7de0c94
|
||||
AUX update-homeassistant 1326 BLAKE2B 917bdd332c4e5dea5177eecd11a7f8d72b911fddfdc8e5eb54960c526fe8c735e20d44e570cf7aeb99669d2a9670c70da1c5fbc30efb284d1f0f330799de6e24 SHA512 3c05f0d6d1bde0e1526c3e679568794c07091e7856dfd8793e13feec6f22725ddaa3163ca2c81d9df86cf73573f932e561743f05de420b350a0b68f6a9582aca
|
||||
AUX yamaha.py 13403 BLAKE2B e073c1e3d4bab02e93e971cb6003705e5e82d20524204ed00f5cd4d0f8f1628419a3a0c8a50ce2e2e13a57017607e5543cfed49a3241de549c572c2012c044d7 SHA512 be6ab79a49c47ad15642ac06adc194318a2ae812cdeffa442e32303b7865b1589383386d84f57b50e942b850ffe68c1ce208d0a4c5bb70fee14f39ea77d01ef4
|
||||
DIST homeassistant-0.77.2.tar.gz 2836847 BLAKE2B 22781084751bd92a59a3cbc44992495130ed24106b0d729d5ac4c7be0587b07e01cd50aa624d863fe606866d765618d071d00983e8764fe17afccaaa36bc7a97 SHA512 fdb67a0501e973c6d7548f62cc88acac686671be5fc728c1128f6bb8ed099f004c513bd867da493bcd7442567df388e66f6b7791f89269fb26bfcb6727b725af
|
||||
DIST homeassistant-0.77.3.tar.gz 2837685 BLAKE2B 98d8f36477695aff9b9c0b0216f651a85c31463d4a727abc125b794afbda21dc6c6e40edd4ad3a5299306d01d983d11cca5aba9ad8b5d84bd5016d88d1195a09 SHA512 40c3046f88101e52e2ea3fe4b258833b5974227cf92b537d595e537dfe0030904ef19826d9f783d4c2c6e8b10bfa9ced97c006baeef28d31409c4c756e957657
|
||||
DIST homeassistant-0.78.0.tar.gz 2863439 BLAKE2B f207d82795309ff484fb52133de6574d5ccb59a75c4ca6ce45dc13c673dad9d150fbb24e3c84bd5ada0317534795b966cea301a630d3e3315a756c9de7719dd3 SHA512 1ee645e0d816cf92d0843563396c52e9547b3810f238f840079f93638feb3e84d8b61f0b84d12bd716d007614a0c70b6f0cc2c7f2751910fd8d0aeeb5eb4f185
|
||||
@ -12,6 +13,7 @@ DIST homeassistant-0.78.3.tar.gz 2863538 BLAKE2B 2381c36916bd14cbca6011e00540a39
|
||||
DIST homeassistant-0.79.3.tar.gz 2918479 BLAKE2B 41671e496eb78ee0d214a26211fc5ad4c4cd38b678cd25971038d71350e354734b31934dbbed85984981e46e7910b08d7654a15c1b07c96b09e775663c8c3d5d SHA512 06e8b4833d4859684be54705044b8834afe1b28c75a1414cb30ad0f8da082de60efa4b71de5abc1018d074c8ef4dd1c6d26177405efad6b0d013bba5c21e4339
|
||||
DIST homeassistant-0.80.1.tar.gz 2970479 BLAKE2B 9f3d0a6e8ccdbc335a2d41dfa77284e3383f81908b077484fd6c6789f4fbe7137dee75326e379934c7f9a2fdb4296e8872a2d84ff678f47c4dabbcd6f168a16a SHA512 1094906730c353141d83813ca3f424e665a08176e4fe6cf9c420f09f0d68da58ace0e61d1d0a9d7fe96176864be70e9257399647bac8f440890275447ffeaf98
|
||||
DIST homeassistant-0.80.2.tar.gz 2979380 BLAKE2B 953df076c62778e08649bc7930c132891d99bffe998c1b97d976f3e9454b85bcce01edd7c786520992ee035a87c098d057f8260f3e91a92736f6a043b23e9886 SHA512 8cdaf0db6d32c92b93f3eaee09548cbd4faf343d911ac16f6d510a8956e07a55f559047929f61bda5eecd4f6e60b53c3e5ed74eacd505131c684990c4f61cb65
|
||||
DIST homeassistant-0.80.3.tar.gz 2979360 BLAKE2B ad04bd4ee64f0942280d0a30305c8ad043b88ba0ba404d0b45e5dffc6298e24ebbe8f9e4fbf340ee5480dbdb361149257966fc8ba50605d5c336f4c76a0b221f SHA512 8095b977c7f606e04f269efb1d520490744865cfa57b838d7bb232d56afe82be8599adb73eb003d7f51c87c21249fc2d60876c848ebb774cbc3735a479ac4e6d
|
||||
EBUILD homeassistant-0.77.2.ebuild 2814 BLAKE2B 79f83a94173802e5026fab45e3d544fa15e896aeed85bcb0c52364411f4c6a83b5a922fe834569629d2b557e8ecf3df375b0142de0ac943938a584c71945ca46 SHA512 84491521b703ae12e2433914898e82f9318c34999dd6113c99ca9745e895c5dc2bc3dab4221cb3238f2ef23c34b93f2999ae1fe54afa89692d682bd89de29cee
|
||||
EBUILD homeassistant-0.77.3.ebuild 2814 BLAKE2B 79f83a94173802e5026fab45e3d544fa15e896aeed85bcb0c52364411f4c6a83b5a922fe834569629d2b557e8ecf3df375b0142de0ac943938a584c71945ca46 SHA512 84491521b703ae12e2433914898e82f9318c34999dd6113c99ca9745e895c5dc2bc3dab4221cb3238f2ef23c34b93f2999ae1fe54afa89692d682bd89de29cee
|
||||
EBUILD homeassistant-0.78.0.ebuild 2814 BLAKE2B 79f83a94173802e5026fab45e3d544fa15e896aeed85bcb0c52364411f4c6a83b5a922fe834569629d2b557e8ecf3df375b0142de0ac943938a584c71945ca46 SHA512 84491521b703ae12e2433914898e82f9318c34999dd6113c99ca9745e895c5dc2bc3dab4221cb3238f2ef23c34b93f2999ae1fe54afa89692d682bd89de29cee
|
||||
@ -20,3 +22,4 @@ EBUILD homeassistant-0.78.3.ebuild 3572 BLAKE2B 340e9e7a246fa38566583f2e80c1e592
|
||||
EBUILD homeassistant-0.79.3.ebuild 3620 BLAKE2B 1d058602b08e069fc1d6725cbed7d180bf2138f79822ec6f361d2534b8de372004aac526833438f17601fbefbad7ea628627a2c5293bf1401975b1a15b6b4b81 SHA512 d23270cc1d29cb9c5d75d0d9aa98510f720f48942f97a4de0936983136cde8f96f010f991a33e4f94995ba517a67f47420204a2c003bb70e00762933a241e600
|
||||
EBUILD homeassistant-0.80.1.ebuild 3643 BLAKE2B 5c959a418aa57cf229416754e552962c192a12341afeb45d59ea2758ae3a60721ed65fbab18dd69d3cee858c48d662c0d93a933fe07b02eab8b4ab59efa538e1 SHA512 a2bef58b11d06101200da843b6909849bb153c6901de3c6650b6b3c34fb7ebfd738f2363e3bd3f7cf2dd342e4373a8a65a25cbc33b0035002418d294e2627dbb
|
||||
EBUILD homeassistant-0.80.2.ebuild 3643 BLAKE2B 5c959a418aa57cf229416754e552962c192a12341afeb45d59ea2758ae3a60721ed65fbab18dd69d3cee858c48d662c0d93a933fe07b02eab8b4ab59efa538e1 SHA512 a2bef58b11d06101200da843b6909849bb153c6901de3c6650b6b3c34fb7ebfd738f2363e3bd3f7cf2dd342e4373a8a65a25cbc33b0035002418d294e2627dbb
|
||||
EBUILD homeassistant-0.80.3.ebuild 3643 BLAKE2B 5c959a418aa57cf229416754e552962c192a12341afeb45d59ea2758ae3a60721ed65fbab18dd69d3cee858c48d662c0d93a933fe07b02eab8b4ab59efa538e1 SHA512 a2bef58b11d06101200da843b6909849bb153c6901de3c6650b6b3c34fb7ebfd738f2363e3bd3f7cf2dd342e4373a8a65a25cbc33b0035002418d294e2627dbb
|
||||
|
||||
389
app-misc/homeassistant/files/yamaha.py
Normal file
389
app-misc/homeassistant/files/yamaha.py
Normal file
@ -0,0 +1,389 @@
|
||||
"""
|
||||
Support for Yamaha Receivers.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/media_player.yamaha/
|
||||
"""
|
||||
import logging
|
||||
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.media_player import (
|
||||
DOMAIN, MEDIA_PLAYER_SCHEMA, MEDIA_TYPE_MUSIC, PLATFORM_SCHEMA,
|
||||
SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PLAY_MEDIA,
|
||||
SUPPORT_PREVIOUS_TRACK, SUPPORT_SELECT_SOURCE, SUPPORT_STOP,
|
||||
SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET,
|
||||
SUPPORT_SELECT_SOUND_MODE, MediaPlayerDevice)
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, STATE_IDLE, STATE_OFF, STATE_ON,
|
||||
STATE_PLAYING)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
REQUIREMENTS = ['rxv==0.5.1']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_ENABLED = 'enabled'
|
||||
ATTR_PORT = 'port'
|
||||
|
||||
CONF_SOURCE_IGNORE = 'source_ignore'
|
||||
CONF_SOURCE_NAMES = 'source_names'
|
||||
CONF_ZONE_IGNORE = 'zone_ignore'
|
||||
CONF_ZONE_NAMES = 'zone_names'
|
||||
|
||||
DATA_YAMAHA = 'yamaha_known_receivers'
|
||||
DEFAULT_NAME = "Yamaha Receiver"
|
||||
|
||||
ENABLE_OUTPUT_SCHEMA = MEDIA_PLAYER_SCHEMA.extend({
|
||||
vol.Required(ATTR_ENABLED): cv.boolean,
|
||||
vol.Required(ATTR_PORT): cv.string,
|
||||
})
|
||||
|
||||
SERVICE_ENABLE_OUTPUT = 'yamaha_enable_output'
|
||||
|
||||
SUPPORT_YAMAHA = SUPPORT_VOLUME_SET | SUPPORT_VOLUME_MUTE | \
|
||||
SUPPORT_TURN_ON | SUPPORT_TURN_OFF | SUPPORT_SELECT_SOURCE | SUPPORT_PLAY \
|
||||
| SUPPORT_SELECT_SOUND_MODE
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
||||
vol.Optional(CONF_HOST): cv.string,
|
||||
vol.Optional(CONF_SOURCE_IGNORE, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
vol.Optional(CONF_ZONE_IGNORE, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
vol.Optional(CONF_SOURCE_NAMES, default={}): {cv.string: cv.string},
|
||||
vol.Optional(CONF_ZONE_NAMES, default={}): {cv.string: cv.string},
|
||||
})
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Yamaha platform."""
|
||||
import rxv
|
||||
# Keep track of configured receivers so that we don't end up
|
||||
# discovering a receiver dynamically that we have static config
|
||||
# for. Map each device from its zone_id to an instance since
|
||||
# YamahaDevice is not hashable (thus not possible to add to a set).
|
||||
if hass.data.get(DATA_YAMAHA) is None:
|
||||
hass.data[DATA_YAMAHA] = {}
|
||||
|
||||
name = config.get(CONF_NAME)
|
||||
host = config.get(CONF_HOST)
|
||||
source_ignore = config.get(CONF_SOURCE_IGNORE)
|
||||
source_names = config.get(CONF_SOURCE_NAMES)
|
||||
zone_ignore = config.get(CONF_ZONE_IGNORE)
|
||||
zone_names = config.get(CONF_ZONE_NAMES)
|
||||
|
||||
if discovery_info is not None:
|
||||
name = discovery_info.get('name')
|
||||
model = discovery_info.get('model_name')
|
||||
ctrl_url = discovery_info.get('control_url')
|
||||
desc_url = discovery_info.get('description_url')
|
||||
receivers = rxv.RXV(
|
||||
ctrl_url, model_name=model, friendly_name=name,
|
||||
unit_desc_url=desc_url).zone_controllers()
|
||||
_LOGGER.debug("Receivers: %s", receivers)
|
||||
# when we are dynamically discovered config is empty
|
||||
zone_ignore = []
|
||||
elif host is None:
|
||||
receivers = []
|
||||
for recv in rxv.find():
|
||||
receivers.extend(recv.zone_controllers())
|
||||
else:
|
||||
ctrl_url = "http://{}:80/YamahaRemoteControl/ctrl".format(host)
|
||||
receivers = rxv.RXV(ctrl_url, name).zone_controllers()
|
||||
|
||||
devices = []
|
||||
for receiver in receivers:
|
||||
if receiver.zone in zone_ignore:
|
||||
continue
|
||||
|
||||
device = YamahaDevice(
|
||||
name, receiver, source_ignore, source_names, zone_names)
|
||||
|
||||
# Only add device if it's not already added
|
||||
if device.zone_id not in hass.data[DATA_YAMAHA]:
|
||||
hass.data[DATA_YAMAHA][device.zone_id] = device
|
||||
devices.append(device)
|
||||
else:
|
||||
_LOGGER.debug("Ignoring duplicate receiver: %s", name)
|
||||
|
||||
def service_handler(service):
|
||||
"""Handle for services."""
|
||||
entity_ids = service.data.get(ATTR_ENTITY_ID)
|
||||
|
||||
devices = [device for device in hass.data[DATA_YAMAHA].values()
|
||||
if not entity_ids or device.entity_id in entity_ids]
|
||||
|
||||
for device in devices:
|
||||
port = service.data[ATTR_PORT]
|
||||
enabled = service.data[ATTR_ENABLED]
|
||||
|
||||
device.enable_output(port, enabled)
|
||||
device.schedule_update_ha_state(True)
|
||||
|
||||
hass.services.register(
|
||||
DOMAIN, SERVICE_ENABLE_OUTPUT, service_handler,
|
||||
schema=ENABLE_OUTPUT_SCHEMA)
|
||||
|
||||
add_entities(devices)
|
||||
|
||||
|
||||
class YamahaDevice(MediaPlayerDevice):
|
||||
"""Representation of a Yamaha device."""
|
||||
|
||||
def __init__(
|
||||
self, name, receiver, source_ignore, source_names, zone_names):
|
||||
"""Initialize the Yamaha Receiver."""
|
||||
self.receiver = receiver
|
||||
self._muted = False
|
||||
self._volume = 0
|
||||
self._pwstate = STATE_OFF
|
||||
self._current_source = None
|
||||
self._sound_mode = None
|
||||
self._sound_mode_list = None
|
||||
self._source_list = None
|
||||
self._source_ignore = source_ignore or []
|
||||
self._source_names = source_names or {}
|
||||
self._zone_names = zone_names or {}
|
||||
self._reverse_mapping = None
|
||||
self._playback_support = None
|
||||
self._is_playback_supported = False
|
||||
self._play_status = None
|
||||
self._name = name
|
||||
self._zone = receiver.zone
|
||||
|
||||
def update(self):
|
||||
"""Get the latest details from the device."""
|
||||
try:
|
||||
self._play_status = self.receiver.play_status()
|
||||
except requests.exceptions.ConnectionError:
|
||||
_LOGGER.info("Receiver is offline: %s", self._name)
|
||||
return
|
||||
|
||||
if self.receiver.on:
|
||||
if self._play_status is None:
|
||||
self._pwstate = STATE_ON
|
||||
elif self._play_status.playing:
|
||||
self._pwstate = STATE_PLAYING
|
||||
else:
|
||||
self._pwstate = STATE_IDLE
|
||||
else:
|
||||
self._pwstate = STATE_OFF
|
||||
|
||||
self._muted = self.receiver.mute
|
||||
self._volume = (self.receiver.volume / 100) + 1
|
||||
|
||||
if self.source_list is None:
|
||||
self.build_source_list()
|
||||
|
||||
current_source = self.receiver.input
|
||||
self._current_source = self._source_names.get(
|
||||
current_source, current_source)
|
||||
self._playback_support = self.receiver.get_playback_support()
|
||||
self._is_playback_supported = self.receiver.is_playback_supported(
|
||||
self._current_source)
|
||||
if self._zone == "Main_Zone":
|
||||
self._sound_mode = self.receiver.surround_program
|
||||
self._sound_mode_list = self.receiver.surround_programs()
|
||||
else:
|
||||
self._sound_mode = None
|
||||
self._sound_mode_list = None
|
||||
|
||||
def build_source_list(self):
|
||||
"""Build the source list."""
|
||||
self._reverse_mapping = {alias: source for source, alias in
|
||||
self._source_names.items()}
|
||||
|
||||
self._source_list = sorted(
|
||||
self._source_names.get(source, source) for source in
|
||||
self.receiver.inputs()
|
||||
if source not in self._source_ignore)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Return the name of the device."""
|
||||
name = self._name
|
||||
zone_name = self._zone_names.get(self._zone, self._zone)
|
||||
if zone_name != "Main_Zone":
|
||||
# Zone will be one of Main_Zone, Zone_2, Zone_3
|
||||
name += " " + zone_name.replace('_', ' ')
|
||||
return name
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the state of the device."""
|
||||
return self._pwstate
|
||||
|
||||
@property
|
||||
def volume_level(self):
|
||||
"""Volume level of the media player (0..1)."""
|
||||
return self._volume
|
||||
|
||||
@property
|
||||
def is_volume_muted(self):
|
||||
"""Boolean if volume is currently muted."""
|
||||
return self._muted
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""Return the current input source."""
|
||||
return self._current_source
|
||||
|
||||
@property
|
||||
def sound_mode(self):
|
||||
"""Return the current sound mode."""
|
||||
return self._sound_mode
|
||||
|
||||
@property
|
||||
def sound_mode_list(self):
|
||||
"""Return the current sound mode."""
|
||||
return self._sound_mode_list
|
||||
|
||||
@property
|
||||
def source_list(self):
|
||||
"""List of available input sources."""
|
||||
return self._source_list
|
||||
|
||||
@property
|
||||
def zone_id(self):
|
||||
"""Return a zone_id to ensure 1 media player per zone."""
|
||||
return '{0}:{1}'.format(self.receiver.ctrl_url, self._zone)
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Flag media player features that are supported."""
|
||||
supported_features = SUPPORT_YAMAHA
|
||||
|
||||
supports = self._playback_support
|
||||
mapping = {
|
||||
'play': (SUPPORT_PLAY | SUPPORT_PLAY_MEDIA),
|
||||
'pause': SUPPORT_PAUSE,
|
||||
'stop': SUPPORT_STOP,
|
||||
'skip_f': SUPPORT_NEXT_TRACK,
|
||||
'skip_r': SUPPORT_PREVIOUS_TRACK,
|
||||
}
|
||||
for attr, feature in mapping.items():
|
||||
if getattr(supports, attr, False):
|
||||
supported_features |= feature
|
||||
return supported_features
|
||||
|
||||
def turn_off(self):
|
||||
"""Turn off media player."""
|
||||
self.receiver.on = False
|
||||
|
||||
def set_volume_level(self, volume):
|
||||
"""Set volume level, range 0..1."""
|
||||
receiver_vol = 100 - (volume * 100)
|
||||
negative_receiver_vol = -receiver_vol
|
||||
self.receiver.volume = negative_receiver_vol
|
||||
|
||||
def mute_volume(self, mute):
|
||||
"""Mute (true) or unmute (false) media player."""
|
||||
self.receiver.mute = mute
|
||||
|
||||
def turn_on(self):
|
||||
"""Turn the media player on."""
|
||||
self.receiver.on = True
|
||||
self._volume = (self.receiver.volume / 100) + 1
|
||||
|
||||
def media_play(self):
|
||||
"""Send play command."""
|
||||
self._call_playback_function(self.receiver.play, "play")
|
||||
|
||||
def media_pause(self):
|
||||
"""Send pause command."""
|
||||
self._call_playback_function(self.receiver.pause, "pause")
|
||||
|
||||
def media_stop(self):
|
||||
"""Send stop command."""
|
||||
self._call_playback_function(self.receiver.stop, "stop")
|
||||
|
||||
def media_previous_track(self):
|
||||
"""Send previous track command."""
|
||||
self._call_playback_function(self.receiver.previous, "previous track")
|
||||
|
||||
def media_next_track(self):
|
||||
"""Send next track command."""
|
||||
self._call_playback_function(self.receiver.next, "next track")
|
||||
|
||||
def _call_playback_function(self, function, function_text):
|
||||
import rxv
|
||||
try:
|
||||
function()
|
||||
except rxv.exceptions.ResponseException:
|
||||
_LOGGER.warning(
|
||||
"Failed to execute %s on %s", function_text, self._name)
|
||||
|
||||
def select_source(self, source):
|
||||
"""Select input source."""
|
||||
self.receiver.input = self._reverse_mapping.get(source, source)
|
||||
|
||||
def play_media(self, media_type, media_id, **kwargs):
|
||||
"""Play media from an ID.
|
||||
|
||||
This exposes a pass through for various input sources in the
|
||||
Yamaha to direct play certain kinds of media. media_type is
|
||||
treated as the input type that we are setting, and media id is
|
||||
specific to it.
|
||||
|
||||
For the NET RADIO mediatype the format for ``media_id`` is a
|
||||
"path" in your vtuner hierarchy. For instance:
|
||||
``Bookmarks>Internet>Radio Paradise``. The separators are
|
||||
``>`` and the parts of this are navigated by name behind the
|
||||
scenes. There is a looping construct built into the yamaha
|
||||
library to do this with a fallback timeout if the vtuner
|
||||
service is unresponsive.
|
||||
|
||||
NOTE: this might take a while, because the only API interface
|
||||
for setting the net radio station emulates button pressing and
|
||||
navigating through the net radio menu hierarchy. And each sub
|
||||
menu must be fetched by the receiver from the vtuner service.
|
||||
|
||||
"""
|
||||
if media_type == "NET RADIO":
|
||||
self.receiver.net_radio(media_id)
|
||||
|
||||
def enable_output(self, port, enabled):
|
||||
"""Enable or disable an output port.."""
|
||||
self.receiver.enable_output(port, enabled)
|
||||
|
||||
def select_sound_mode(self, sound_mode):
|
||||
"""Set Sound Mode for Receiver.."""
|
||||
self.receiver.surround_program = sound_mode
|
||||
|
||||
@property
|
||||
def media_artist(self):
|
||||
"""Artist of current playing media."""
|
||||
if self._play_status is not None:
|
||||
return self._play_status.artist
|
||||
|
||||
@property
|
||||
def media_album_name(self):
|
||||
"""Album of current playing media."""
|
||||
if self._play_status is not None:
|
||||
return self._play_status.album
|
||||
|
||||
@property
|
||||
def media_content_type(self):
|
||||
"""Content type of current playing media."""
|
||||
# Loose assumption that if playback is supported, we are playing music
|
||||
if self._is_playback_supported:
|
||||
return MEDIA_TYPE_MUSIC
|
||||
return None
|
||||
|
||||
@property
|
||||
def media_title(self):
|
||||
"""Artist of current playing media."""
|
||||
if self._play_status is not None:
|
||||
song = self._play_status.song
|
||||
station = self._play_status.station
|
||||
|
||||
# If both song and station is available, print both, otherwise
|
||||
# just the one we have.
|
||||
if song and station:
|
||||
return '{}: {}'.format(station, song)
|
||||
|
||||
return song or station
|
||||
125
app-misc/homeassistant/homeassistant-0.80.3.ebuild
Normal file
125
app-misc/homeassistant/homeassistant-0.80.3.ebuild
Normal file
@ -0,0 +1,125 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Ebuild (C)2018 OnkelBeh
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python3_5 python3_6 )
|
||||
|
||||
inherit user readme.gentoo-r1 eutils distutils-r1
|
||||
|
||||
DESCRIPTION="Open-source home automation platform running on Python 3.6"
|
||||
HOMEPAGE="https://home-assistant.io"
|
||||
SRC_URI="https://github.com/home-assistant/home-assistant/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
IUSE="atv hs100 maint tradfri wemo mysql musiccast"
|
||||
|
||||
DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
!app-misc/homeassistant-bin
|
||||
>=dev-python/aiohttp-3.4.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/aiohttp-cors-0.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/astral-1.6.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/async_timeout-3.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/attrs-18.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/attrs-18.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/bcrypt-3.1.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/beautifulsoup-4.5.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/certifi-2018.4.16[${PYTHON_USEDEP}]
|
||||
>=dev-python/chardet-3.0.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/colorlog-3.1.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/cryptography-2.3.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/idna-ssl-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/jinja-2.10[${PYTHON_USEDEP}]
|
||||
>=dev-python/paho-mqtt-1.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pip-9.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytz-2018.04[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-3.13[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-2.19.1-r1[${PYTHON_USEDEP}]
|
||||
>=dev-python/typing-3.6.2-r1[${PYTHON_USEDEP}]
|
||||
>=dev-python/urllib3-1.22[${PYTHON_USEDEP}]
|
||||
>=dev-python/voluptuous-0.11.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/voluptuous-serialize-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/websocket-client-0.40.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/yarl-1.1.1[${PYTHON_USEDEP}]
|
||||
atv? ( >=dev-python/pyatv-0.3.9[${PYTHON_USEDEP}] )
|
||||
musiccast? ( >=dev-python/pymusiccast-0.1.6[${PYTHON_USEDEP}] )
|
||||
mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] )
|
||||
hs100? ( >=dev-python/pyhs100-0.3.0[${PYTHON_USEDEP}] )
|
||||
tradfri? ( >=dev-python/pytradfri-4.1.0[${PYTHON_USEDEP}]
|
||||
sys-devel/autoconf )
|
||||
wemo? ( >=dev-python/pywemo-0.4.25[${PYTHON_USEDEP}] )
|
||||
dev-db/sqlite
|
||||
dev-libs/libfastjson
|
||||
dev-libs/openssl
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
app-admin/logrotate
|
||||
maint? (
|
||||
app-crypt/certbot
|
||||
app-crypt/ssl-cert-check
|
||||
net-misc/dropbox-uploader
|
||||
)
|
||||
"
|
||||
|
||||
INSTALL_DIR="/opt/${PN}"
|
||||
|
||||
DISABLE_AUTOFORMATTING=1
|
||||
DOC_CONTENTS="
|
||||
The HA interface listens on port 8123 - this _will_ take a minute or two to appear
|
||||
|
||||
hass configuration is in: /etc/${MY_PN}
|
||||
daemon command line arguments are configured in: /etc/conf.d/${MY_PN}
|
||||
|
||||
logging is to: /var/log/${MY_PN}/{server,errors,stdout}.log
|
||||
|
||||
The sqlite db is by default in: /etc/${MY_PN}
|
||||
To move it after ${MY_PN} has run once and while ${MY_PN} is stopped:
|
||||
- add /etc/${MY_PN}/recorder.yaml to /etc/${MY_PN}/configuration.yaml
|
||||
- mv /etc/${MY_PN}/home-assistant_v2.db /var/db/${MY_PN}
|
||||
|
||||
support thread at:
|
||||
https://community.home-assistant.io/t/gentoo-homeassistant-0-59-2-ebuild/35577
|
||||
"
|
||||
|
||||
S="${WORKDIR}/home-assistant-${PV}"
|
||||
|
||||
DOCS="README.rst"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup "${PN}"
|
||||
enewuser "${PN}" -1 -1 "$INSTALL_DIR" "${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -e 's;astral==1.5;astral>=1.5;' \
|
||||
-i "setup.py" \
|
||||
-i homeassistant/package_constraints.txt
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
dodoc ${DOCS}
|
||||
distutils-r1_python_install_all
|
||||
|
||||
keepdir "$INSTALL_DIR"
|
||||
|
||||
keepdir "/etc/${PN}"
|
||||
fowners -R "${PN}:${PN}" "/etc/${PN}"
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.conf.d" "${PN}"
|
||||
newinitd "${FILESDIR}/${PN}.init.d" "${PN}"
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
readme.gentoo_print_elog
|
||||
}
|
||||
2
dev-python/aiocoap/Manifest
Normal file
2
dev-python/aiocoap/Manifest
Normal file
@ -0,0 +1,2 @@
|
||||
DIST aiocoap-0.4_alpha3.tar.gz 123988 BLAKE2B 62879a9c52033c7e467f2d130bb2837063fa0c809bea83d0e74e0d2c0a8d253ae9b9e76fc72a36a3e4ec39524aa08855b1425bb7370aaa77465ae51e1692fc94 SHA512 2d7539da4f688d9a60900937be36c464be2133298cd738154984dfee8f095e0919de339179a783c59e65736b1bdef65135d610090edf8fd49eef1b7f11d9cc15
|
||||
EBUILD aiocoap-0.4_alpha3.ebuild 645 BLAKE2B 73458c9def91ba20ae6dd29bc6ce1714d16e2d4475d2e20502d557e1648a570e18f4e91da5de4404dd9509fb2d5659103f4b36143c7bcb7b972c0a2b8f744f39 SHA512 b2c3c85af4668b4c099b82c3fa6579c19d18ac495720cf50e2189dd23fbe501999de938350404d086b6c7444adec1d1d59eabfd4225ae7e4a58e633344d1d1b8
|
||||
38
dev-python/aiocoap/aiocoap-0.4_alpha3.ebuild
Normal file
38
dev-python/aiocoap/aiocoap-0.4_alpha3.ebuild
Normal file
@ -0,0 +1,38 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=(python3_{5,6})
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PV="0.4a1"
|
||||
|
||||
DESCRIPTION="The Python CoAP library"
|
||||
HOMEPAGE="https://github.com/chrysn/aiocoap"
|
||||
SRC_URI="https://github.com/chrysn/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
DOCS="README.rst"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
src_prepare() {
|
||||
rm -rf tests # FIXME
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
2
dev-python/dtlssocket/Manifest
Normal file
2
dev-python/dtlssocket/Manifest
Normal file
@ -0,0 +1,2 @@
|
||||
DIST DTLSSocket-0.1.4.tar.gz 182199 BLAKE2B e71c31b157aa8d7eac57babdad7ce05774f26c44b4fb462d30a4d5feaa33b9b87f59eef91f495c9ecaf2f35626be6bd55ea8ac4121633a1833ddac13fa016e47 SHA512 48a492ab52388a7670ad23eea0c00e292307def0ae5189ab30d8559d77ce2fce40fdd58c6e5297d17e770b6c17a3f0cb07b9e9e50a988539b8df73ca9014696f
|
||||
EBUILD dtlssocket-0.1.4.ebuild 621 BLAKE2B 372cbb70ca458084417e7640d53a123042410a99ec963c02a74d67fcc2269366ee29b6ffc5a02fdbf81b048481c48bc9e3f03658ccc9233bffd6e7934d48fb23 SHA512 6b84b9d7552ff3e8778c2cafe971338a0cf30120ee31127daf8cb76462d391e8cf747cd3e7ff32189126257ba3e81ec9855861d63e85ca48b6910de4615da74c
|
||||
31
dev-python/dtlssocket/dtlssocket-0.1.4.ebuild
Normal file
31
dev-python/dtlssocket/dtlssocket-0.1.4.ebuild
Normal file
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=(python3_{5,6})
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN="DTLSSocket"
|
||||
|
||||
DESCRIPTION="A cython wrapper for tinydtls with a Socket like interface"
|
||||
HOMEPAGE="https://git.fslab.de/jkonra2m/tinydtls-cython"
|
||||
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
|
||||
|
||||
LICENSE="EPL-1.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/cython[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
DOCS="README"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
2
dev-python/netdisco/Manifest
Normal file
2
dev-python/netdisco/Manifest
Normal file
@ -0,0 +1,2 @@
|
||||
DIST netdisco-1.2.3.tar.gz 23730 BLAKE2B 1ca16ddc34f8c8525487f5e0af83d11754311fc487c46bb3d1d8228b213e7d43468c03c5d2f60b1e8619edcd2a941efbe37801d26905577630b3b699dae1ef4d SHA512 c805b217d4977860c13d88a307358a5bf3fdf8819cba8301a31853d5f1dc36d111baf9f213e0661824bb9467ffe54645ac0580b17473abbdb43f1aa77cd6b033
|
||||
EBUILD netdisco-1.2.3.ebuild 607 BLAKE2B 784c8bc0c66b0826ae7e93cef774a4a05506c4e1ca43e2f7f219d4fbd2e2fa44ff9d112a6ab1ca1d4d0ce935006346fbe2dd4c9db71a0a6f02dafc8d44882554 SHA512 ef5f995dc36a63587c0e09f716bdab279244027fa3c7a19aac04f736575e3016486ad8d828af6d7b78db927d50a557d1e6b38f4d7782a9323be310150ec091c1
|
||||
29
dev-python/netdisco/netdisco-1.2.3.ebuild
Normal file
29
dev-python/netdisco/netdisco-1.2.3.ebuild
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=(python3_{4,5,6})
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Discover devices on your local network"
|
||||
HOMEPAGE="https://github.com/home-assistant/netdisco"
|
||||
SRC_URI="https://github.com/home-assistant/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
RESTRICT="mirror"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
DEPEND="
|
||||
>=dev-python/requests-2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/zeroconf-0.19.1[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
DOCS="README.md"
|
||||
4
dev-python/pytradfri/Manifest
Normal file
4
dev-python/pytradfri/Manifest
Normal file
@ -0,0 +1,4 @@
|
||||
DIST pytradfri-4.1.0.tar.gz 134416 BLAKE2B 64de91d5fb06ea11c2db1d40d3556664d38e7da3b21b261053911d6125e7b03f3a28e28ed28ab6fd1d8b544ac723834c3339be99140872e2566f62d60b71a512 SHA512 ebba9c82194687330bb1c56acce4e3bd8722e057fb6a179f23f63dfd8732755c0b78b0f5a7696ad85718a692f139a2fc2079f69b23503cf91dfa59b64b3cb604
|
||||
DIST pytradfri-6.0.1.tar.gz 140959 BLAKE2B e3803eff468307eebbe6a9b5ada32ca364de92e13ec39249d6c49af546ae1504d6307c3f83ba081e8221306e1ed463c37a71206021438c530450876d62a7b842 SHA512 1eac80f9043fbd7a182f577de731373252bc31161bcb5e31a897fb00c0613c00ecf254ca6b8b672bf02d759a345be6544bff6702f297400e52210fe4ed767438
|
||||
EBUILD pytradfri-4.1.0.ebuild 633 BLAKE2B 6de746068b3362ef1dd49fbf0b63ae381531b2c54c897e6166d73868a1ae3e6ad690b69107266da8d105943535734036a9459b6609673d4e981baabf574f1cbf SHA512 12ee4d986ec7ea37877fcec44060320ac61a82108b1ccdd6a6ae7df01f7072e00975ef890e48ecf35c84cd2246caf2c519d19209327bb4ed018b5913a26d94a6
|
||||
EBUILD pytradfri-6.0.1.ebuild 633 BLAKE2B 6de746068b3362ef1dd49fbf0b63ae381531b2c54c897e6166d73868a1ae3e6ad690b69107266da8d105943535734036a9459b6609673d4e981baabf574f1cbf SHA512 12ee4d986ec7ea37877fcec44060320ac61a82108b1ccdd6a6ae7df01f7072e00975ef890e48ecf35c84cd2246caf2c519d19209327bb4ed018b5913a26d94a6
|
||||
29
dev-python/pytradfri/pytradfri-4.1.0.ebuild
Normal file
29
dev-python/pytradfri/pytradfri-4.1.0.ebuild
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=(python3_{5,6})
|
||||
|
||||
inherit eutils distutils-r1
|
||||
|
||||
DESCRIPTION="Control/observe IKEA Trådfri devices"
|
||||
HOMEPAGE="https://github.com/ggravlingen/pytradfri"
|
||||
SRC_URI="https://github.com/ggravlingen/pytradfri/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
DEPEND="
|
||||
>=dev-python/aiocoap-0.4_alpha1[${PYTHON_USEDEP}]
|
||||
>=dev-python/dtlssocket-0.1.4[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
DOCS="README.md"
|
||||
29
dev-python/pytradfri/pytradfri-6.0.1.ebuild
Normal file
29
dev-python/pytradfri/pytradfri-6.0.1.ebuild
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=(python3_{5,6})
|
||||
|
||||
inherit eutils distutils-r1
|
||||
|
||||
DESCRIPTION="Control/observe IKEA Trådfri devices"
|
||||
HOMEPAGE="https://github.com/ggravlingen/pytradfri"
|
||||
SRC_URI="https://github.com/ggravlingen/pytradfri/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
DEPEND="
|
||||
>=dev-python/aiocoap-0.4_alpha1[${PYTHON_USEDEP}]
|
||||
>=dev-python/dtlssocket-0.1.4[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
DOCS="README.md"
|
||||
Loading…
x
Reference in New Issue
Block a user