This makes us track WeMo devices by serial number instead of URL. Per
@jaharkes' suggestion, tracking via URL could potentially be a problem
if a device changes to another IP and then appears to be discovered again.
Since we can't track based on mac (for static-configured devices), we
can use the serial number exposed to make sure we're always looking at
a list of unique devices.
The default configuration of the mFi controller generates self-signed
certificates which are valid for short periods of time, and which are
regnerated on start or as needed. This makes requests mad. Since most
people will be using the self-signed certificates anyway, add options
to let them choose non-TLS, or unverified connections if they want/need.
This bumps the mficlient requirement to 0.3.0 for proper handling of
verify=False.
Looking at your code suggestion below I am not sure exactly how other people might want to put in lists. (But I am missing a more general overview of the code)
```
if not isinstance(scene_config,list):
scene_config=[scene_config]
```
But it is there !
And changed "config" to "states" !
I broke this with my fix, where I assumed that we'd always have a wemo
config section if we're running the wemo code. However, if we're fully
auto-detected, we might not.
Example Config:
...
modules:
Bedroom:
- temperature
LivingRoom:
- temperature
Outside:
- temperature
Garden:
- rain
- sum_rain_1
- sum_rain_24
The three new parameters stand for:
- rain # Estimated rainfall for today in "mm"
- sum_rain_1 # Rainfall in the last hour in "mm"
- sum_rain_24 # Rainfall in "mm" from 00:00am - 23:59pm
The wemo component was tracking devices by mac to avoid adding duplicates,
but this means we'd never be able to load more than one static wemo, since
they all have mac=None.
This changes the code to track by url, which has to be unique per wemo
anyway, and which we also have for even static wemos.
Currently we interact with players regardless of thir coordinator
role, hence soco.exceptions.SoCoSlaveException are thrown. The use
of the decorator for each interactive method should address this
Converts 0..255 values that HA expects into a device 0..SCALE value
Example:
HA considers "hall light" at 25 brightness or 10% of 255
Device considers "hall light" at 100 brightness or 10% of 1000
This allows our existing MQTT devices to not change their data format to be used in HA
The exception we were catching incorrectly referenced the client variable
in local scope instead of the module. Also, if we fail to connect we can
get a requests exception, so catch and handle that as well.
* Move S_LIGHT and V_LIGHT from light back to switch platform, to avoid
double devices showing.
* Remove MySensorsLightPlain class from light platform, since it's not
needed anymore.
* A light switch with only a switch, ie no dimmer or
RGB controls, will show as a regular switch device.
Uses the (schiene)[https://pypi.python.org/pypi/schiene/0.14] API to communicate with the webserver of bahn.de
and pulls iformation about a specific connection from the (bahn.de)[http://www.bahn.de/p/view/index.shtml]
webpage. The departure time of the next train for the given connection is shown.
In case of delay, the delay is also shown. Additional `ATTRIBUTES` are used to
inform about e.g. the type of the train, price and if it is ontime.
Usage:
sensor:
platform: deutsche_bahn
from: name_of_start_station
to: name_of_final_station
Problems:
I'm testing it for quite some time, but I have never seen the `ATTRIBUTES` in case
of a delayed train. The `ATTRIBUTES` are directly passed from the `schiene` API. So this
usecase has not been tested yet.
deutsche_bahn ist not supporting the `schiene` api unlike in the swiss_public_transport case.
It's not guaranteed that `schiene` will work forever, infact it can happen that Bahn AG will
intentionally brake the API at some point. In the past Bahn AG has not allways been very supportive
to the opensource community.
Changed the key matching to utilize integer values. It does not report always return the hex marker '0x' in the identifier strings. This Re closes issue #1349
The older (unsupported AirCam) models behave differently and also apparently
suffer some under the last release of the NVR that supported them. Since they
are EOL and not supported by current software, filter them out so we don't
break while trying to extract an image from them.
I only have WeMo Link and Insight devices and assumed model names of other
devices were fairly straightforward.
But it looks like the regular WeMo switch uses 'Socket' as the model name.
This adds tests for the uvc camera module. It's a good thing too,
because I found a few bugs which are fixed here as well:
- Graceful handling of non-integer port
- Failure to take the first host that works when probing host,internalHost
- Failure to detect if neither of them actually work
This also converts the code to only call add_devices once with a listcomp.
The NVR tells us the admin username, but not the password for the
camera. Right now, we assume the default password, which obviously
doesn't work for people that have changed it. The uvcclient library
provides a way to set the cached admin password for a camera, which
is stored in a client-specific location. We can utilize that to
grab the password, falling back to the default if it's unset. With
this, people just need to run a command per camera to set the
admin password on their systems, if it has changed.
Because of problems with the Wallet part of python blockchain library (see #1242 ) , the entire Bitcoin module isn't working currently.
This change does not fix those problems but at least makes the sensor work again for people who don't need Wallet-related functionality.
It also just seems better practice to not set a wallet and call "wallet.get_balance()" when not wallet is set in configuration.
* Add mysensors binary sensor.
* Add discovery platforms to binary_sensor base component.
* Replace device_state_attributes with state_attributes in
binary_sensor base class.
* Fix docstrings.
* Add discovery of binary sensor to mysensors component.
* Add child.type as argument to mysensors device_class.
* Move binary sensor types from sensor to binary_sensor module.
* Fix binary_sensor attribute tests. Use state_attributes instead of
device_state_attributes.
Ubiquiti's Unifi WAP infrastructure has a central controller (like mfi and uvc)
that can be queried for client status. This adds a device_tracker module that
can report the state of any client connected to the controller.
This adds a 'sensor_class' property and attribute, which should be either
None or one of several defined SENSOR_CLASSES to indicate contextual
information about what the sensor is measuring.
* From configuration.yaml is easy to provide iterable elements like lists,
this adds the possibility to provide a list of Sonos hosts using a yaml
and still supports the comma separated string version
* Remove superfluous host reassignment
* Add check if V_LIGHT is in values before sending message in
_turn_on_light.
* Replace super calls with self.
* Remove not needed init method in child classes.
* Remove turn_on method in parent class and add update_ha_state
to _turn_on_light, _turn_on_dimmer and _turn_on_rgb_or_w.
* Make a flatter one level inheritance, with MySensorsLight as parent
with four children, one per light type.
* Break out helper methods. One per plain light, dimmer and RGB/RGBW
children and per update, turn_on and turn_off, nine in total. Put
these in the parent.
* Call the helper methods as needed from the child methods update,
turn_on and turn_off.
* Change name of MySensorsLightLight to MySensorsLightPlain.
* Fix module docstrings according to pep257.
* Change name of color util method from rgb_hex_to_list to
rgb_hex_to_rgb_list.
* Add unit tests for rgb_hex_to_rgb_list.
* Add a light entity class per V_LIGHT, V_DIMMER, V_RGB and V_RGBW.
Make these classes inherit each other up to MySensorsLight class.
* Map the entity classes to their S_TYPE in a dict.
* Check if an entity class map or just an entity class have been passed
to pf_callback_factory before using the entity_class variable in
homeassistant/components/mysensors.py.
* Add rgb_hex_to_list function in homeassistant/util/color.py.
This adds verbose debugging which can be turned on to figure out what is
going on. It also adds a broad exception handler in the worker thread
to avoid dying. If you're running this such that stderr doesn't go to a
log, it can be easy to miss the thread's death.
I wrote all this to try to diagnose #1283, which seems to maybe have
healed itself. But since I have it, I figure we might as well keep it
in case we have trouble in the future.
This bumps the somecomfort requirement to 0.2.1 to pull in a change
that makes handling no-fan systems graceful. Adds a test that should
prove it gives us what we want.
If no fan, then fan is always idle and fanmode is None.
This allows you to get every door, window, smoke, etc zone from your security
panel into HA. This uses the live eventing feature of pynx584, which means you
get instantaneous signaling into HA when a door opens or something happens,
which is handy for automating lights on when doors open after dark, etc.
Requires update to pynx584 0.2
This makes the UVC camera_image() method not log into the camera on
every single image fetch, which reduces load on hass and the camera,
and lowers the latency to get an actual image fetched.
This lets you optionally only add thermostats by location or
specific device id, instead of all the thermostats in your
account. This would be helpful if you have two devices in different
houses (i.e vacation home), etc.