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.
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.
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.
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.
* 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.