Commit Graph

540 Commits (8c728d1b4eaf5f66570d7a9d139cd8e1940c551f)

Author SHA1 Message Date
Micha LaQua 08d60fb04b Initial support for generic 433Mhz GPIO adapters on a Raspberry Pi (#1865)
* initial support for generic 433mhz gpio adapters

* rpi-rf: refactor id_on/id_off to code_on/code_off

fits the purpose better and improves understanding

* rpi-rf: use v0.9.4

* rpi-rf: update features and dependencies to v0.9.5

includes the ability to optionally specify a protocol for each switch

* rpi-rf: remove explicit RPi.GPIO dependency

already a dependency of the rpi-rf module

* rpi-rf: make setting gpio, code_on and code_off mandatory

* rpi-rf: remove unused value_template

* rpi-rf: only enable TX once if there are switches
2016-04-26 11:35:01 +02:00
Dan Cinnamon 7154603567 Summary: Enhanced to make more robust and efficient. (#1917)
Prevented a switch from being turned on twice.

Made the module regex more robust.

Refactored the code to reduce the amount of network traffic to/from pulseaudio.

Fixed pylint issues
2016-04-26 11:29:20 +02:00
Per Sandström ba696888c1 Merge pull request #1889 from persandstrom/verisure_updated_links
Verisure: new version and changed "key" in smartplug
2016-04-22 20:15:26 +02:00
Per Sandström a4083bab1a new version and changed "key" 2016-04-22 20:02:54 +02:00
Daniel Høyer Iversen d3fb69783d Tellstick config validation 2016-04-21 07:57:28 -07:00
Paulus Schoutsen 9d391becc1 Add mysensors tcp ethernet gateway (#1861)
* Bump version of pymysensors to 0.6, which includes the tcp gateway.
* Update requirements_all.txt.
* Replace CONF_PORT with CONF_DEVICE and ATTR_PORT with ATTR_DEVICE.
* Add tcp_port in config.
* Try to guess if tcp or serial gateway is configured, by validating
	device name as an ip address. If successful setup tcp gateway, if it
	fails, setup serial gateway.
* Update device_state_attributes to show correct device, ethernet or
	serial.
2016-04-19 21:00:56 -07:00
Brad Johnson 09693bf16c Upgrading to python-wink 0.7.4 and improving RGB color support in HA (#1832) 2016-04-17 19:07:21 -07:00
John Arild Berentsen b45c0cd735 Zwave import fixes for stability (#1845) 2016-04-17 14:46:51 -07:00
Paulus Schoutsen 68d92c3196 Use standardised datetime format 2016-04-16 01:46:50 -07:00
Jan Harkes 1deaf2fe8f Service validation for switch component. 2016-04-13 12:35:07 -04:00
Dennis Karpienski a862e994c7 Thinkingcleaner support (#1784)
* added first implementation of thinking cleaner

* fix lock release

* fixed tox flaws

* updated coveragerc

* fixed lock

* changed update lock

* fixed codestyle
2016-04-10 16:59:53 -07:00
Daniel Høyer Iversen cac555fc69 Rfxtrx config validating (#1747)
* config validation

* Config validation of rfxtrx switch

* Config validation of rfxtrx light

* Config validation of rfxtrx

* Config validation of rfxtrx
2016-04-08 20:55:31 -07:00
Jan Harkes a7016e4b32 Move CONF_STATE_TOPIC, CONF_COMMAND_TOPIC and CONF_RETAIN to mqtt component. 2016-04-06 22:51:39 -04:00
Jan Harkes deecec5e4e Config validation for MQTT switch platform. 2016-04-06 22:51:39 -04:00
Will Hughes 5a32ddbe6f Update Orvibo platform to the switch component, add 'mac' option
This adds an optional 'mac' configuration option to the platform which

is passed to the underlying Orvibo library. The 'mac' option is required

when the switch is connected to a different subnet to the Home Assistant

host
2016-04-06 14:52:21 -07:00
Daniel Høyer Iversen cfb318287d Refactor rfxtrx component 2016-04-06 10:34:51 -07:00
root 7b1ec418f2 Fix crash of Rfxtrx component when using config option fire_event 2016-03-30 16:20:19 +02:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Paulus Schoutsen 41f205e09d Clean up template platforms 2016-03-24 23:22:17 -07:00
Paulus Schoutsen 70ce179224 Merge pull request #1551 from w1ll1am23/command_line_assumed
Added assumed state to command_line switch
2016-03-24 21:54:36 -07:00
Paulus Schoutsen 5bd004ee38 Merge pull request #1526 from tilutza/dev
Arduino switch: add support for default stat and negate port function…
2016-03-22 08:40:39 -07:00
Dan Cinnamon 6ee3ca8264 Creation of a new platform for the existing switch component. 2016-03-20 23:10:57 -05:00
dtila a8761e1ef8 Add support for having default state on arduino switch and negate functionality
Arduino switch: add support for default stat and negate port functionality

Travis changes

Arduino switch: add support for default stat and negate port functionality
Because Travis was configured to have maxiimum 5 arguments allowed in functions, I changed the function constructor signature too ... Paul, 6 parameters for a function is really ok

Arduino Switch: add default state config and negate functionality
2016-03-20 12:52:06 +02:00
joopert 0bbcc81285 wake on lan platform 2016-03-18 15:01:53 +01:00
Paulus Schoutsen c093a2bf54 Merge pull request #1564 from balloob/fix_template_race_condition
Fix remaining race condition in template components.
2016-03-17 21:18:38 -07:00
William Scanlon 208a7c9e60 Added available method to all wink components 2016-03-17 15:57:26 -04:00
William Scanlon a64726e321 Added assumed state to command_line switch 2016-03-17 10:41:26 -04:00
pavoni 4e7160139e Fix race condition in template components. 2016-03-17 12:10:19 +00:00
Greg Dowling fd27e4fc7d Merge pull request #1550 from balloob/restructure_vera
Refactor vera into a platform.
2016-03-16 09:28:27 +00:00
pavoni 9fc73fa644 Refactor vera into a platform. 2016-03-16 09:03:56 +00:00
bradsk88 8a6cc49438 Upgrading python-wink to 0.6.3
This corrects a bug where multi-sensors' internal states were rendered null when downloading state updates from the Wink API.
2016-03-14 19:16:54 -06:00
pavoni fe2adff017 Handle startup race condition. 2016-03-14 10:29:12 +00:00
Stefan Jonasson eb9ed5ccfe Rewrite of the tellstick module. It now uses a common base for all shared functionality.
The rewrite addresses a problem with the tellstick hardware dropping
commands when too many simultaneous calls is being made from HA. Also fixes a bug when the dim level was changed externally.
This breaks previous configurations.

The new config for tellstick is

```yaml
tellstick:
  signal_repetitions: X
```
Lights and Switches are detected automatically.
Sensors work like before because they do not share any functionality with the other devices and they also needs a complete other configuration.
2016-03-13 19:28:42 +01:00
Paulus Schoutsen 025713ee41 Type checks for MQTT config 2016-03-10 21:42:17 -08:00
Paulus Schoutsen b9856a2af5 Fix final pep257 issues 2016-03-09 23:34:38 -08:00
Fabian Affolter d6eab03a61 Remove parenthesis 2016-03-08 18:05:01 +01:00
Fabian Affolter 49ebc6d0b0 Fix PEP257 issues 2016-03-08 13:35:39 +01:00
pavoni 4e3c8a8697 Fix noisy error on startup. Make callbacks code consistent. 2016-03-06 19:19:07 +00:00
Stefan Jonasson e57eca517b Add assumed state for Tellstick devices.
Tellstick device states are always assumed so this should be set to true.
2016-03-05 10:24:22 +01:00
Paulus Schoutsen ec642cbeff Merge pull request #1450 from kk7ds/mfi-tls-verify
Give mFi options to control TLS usage
2016-02-29 19:18:06 -08:00
MartinHjelmare bfa579f8b2 Add assumed_state to mysensors switch and light
* Return true for assumed_state if optimistic config setting is true.
* Fix PEP257
2016-03-01 03:09:55 +01:00
Dan Smith be04ebf9ed Give mFi options to control TLS usage
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.
2016-02-29 17:37:41 -08:00
Paulus Schoutsen be55ee059e Make names command line platform consistent 2016-02-27 15:56:35 -08:00
Paulus Schoutsen afb51d14b8 Merge pull request #1302 from persandstrom/vsure_maintenace
updated verisure reconnect
2016-02-27 14:50:24 -08:00
Per Sandström d7e3c6a442 verisure refactoring and fix reconnect 2016-02-27 21:50:19 +01:00
Daniel Høyer Iversen 278fdc0983 Merge pull request #1385 from balloob/rfxtrx
improve rfxtrx sensor
2016-02-26 10:49:10 +01:00
Greg Dowling 6dc49df2df Merge pull request #1405 from balloob/wemo_insight_updates
Fix typo in Wemo state_detail attribute.
2016-02-26 08:46:54 +00:00
pavoni b2d32114c8 Fix typo. 2016-02-26 08:28:17 +00:00
Paulus Schoutsen 6512b7d701 Merge pull request #1380 from w1ll1am23/wink_binary_sensor
Moved Wink binary sensors to a binary sensor class
2016-02-25 18:19:38 -08:00
Paulus Schoutsen dd45b5e0b1 Merge pull request #1402 from kk7ds/fix-mfi-connect-exception
Fix mFi error handling in setup_platform
2016-02-25 17:06:03 -08:00
pavoni ddbceebd65 Cast standby_state to int before testing. 2016-02-26 00:16:33 +00:00
Dan Smith 37e5b98919 Fix mFi error handling in setup_platform
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.
2016-02-25 15:52:13 -08:00
pavoni 86973226b1 Remove ghost comment. 2016-02-25 23:13:20 +00:00
pavoni 72144945b4 Move standby from state to attribute, add optimistic switch status. 2016-02-25 22:46:14 +00:00
William Scanlon 5a64ef2c98 Moved Wink binary sensors to a binary sensor class 2016-02-25 14:03:02 -05:00
Daniel 8ffa3684e3 rfxtrx refactor 2016-02-25 17:40:24 +01:00
Daniel 23db6e753f refactor rfxtrx code 2016-02-25 13:08:16 +01:00
Paulus Schoutsen 621a6e0ea0 Merge pull request #1395 from MartinHjelmare/fix-mysensors-switch-light
Fix mysensors switch & light types
2016-02-24 19:56:36 -08:00
MartinHjelmare 9c538d11c2 Fix mysensors switch & light types
* 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.
2016-02-25 00:48:29 +01:00
MartinHjelmare 2790ee0b02 Use get_component instead of importing component 2016-02-25 00:24:31 +01:00
Fabian Affolter 4563c54a3e Add link to docs and modify docstrings to match PEP257 2016-02-24 10:38:06 +01:00
Fabian Affolter 582394bc3b Modify import of template and PEP257 2016-02-23 21:19:22 +01:00
Jan Harkes afe564fb3f Move WeMo discovery into a common component 2016-02-21 22:23:00 -05:00
Jan Harkes 368ad93eb6 Only add discovered switches instead of any WeMo device. 2016-02-21 21:57:53 -05:00
Paulus Schoutsen c77266c544 Merge pull request #1357 from w1ll1am23/update_wink_for_binary_switch_fix
Updated wink version for binary switch fix
2016-02-21 13:50:59 -08:00
Paulus Schoutsen 070cee48a8 Merge pull request #1353 from balloob/assume-state
Add assumed_state to Group, MQTT Switch, MQTT Light
2016-02-21 09:19:54 -08:00
William Scanlon 3da554a198 Update wink version 2016-02-21 12:01:32 -05:00
Christian Fredborg Braedstrup 2f66528595 Added support for d-link W215 smart plug 2016-02-21 08:34:07 +01:00
Paulus Schoutsen 443b39bccd MQTT Switch to expose assumed_state if optimistic 2016-02-20 17:17:30 -08:00
MartinHjelmare 08aaea5444 Add mysensors binary sensor
* 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.
2016-02-20 04:28:17 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Justyn Shull 9a740bff2a Return early from setup_platform when zwave NETWORK is not configured 2016-02-18 18:12:00 -06:00
pavoni 98d18c3060 Bump pywemo version. 2016-02-18 19:32:30 +00:00
MartinHjelmare 6e8c79d531 Change refactor structure
* 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.
2016-02-18 02:04:06 +01:00
Paulus Schoutsen c66511e0cf Merge pull request #1275 from balloob/rfxtrxSignalRep
Rfxtrx signal rep
2016-02-16 20:23:55 -08:00
Paulus Schoutsen 79dbd14568 Merge pull request #1280 from molobrakos/tellduslive
added assumed_state property + improved error handling
2016-02-16 13:51:14 -08:00
Erik 008d65677b add assumed state property 2016-02-16 17:18:49 +01:00
Daniel b93ebe1936 Add signal repetition to rfxtrx 2016-02-15 19:45:33 +01:00
Daniel 0010cadd39 Add signal repetition to rfxtrx 2016-02-15 19:41:40 +01:00
John Arild Berentsen f429a6c4ff Add assumed_state for rfxtrx switch and light. 2016-02-15 18:59:11 +01:00
Paulus Schoutsen 8bea5c06de Add assumed_state property to entity 2016-02-13 23:42:11 -08:00
Paulus Schoutsen 77b141a355 Update Wink to 0.6 2016-02-13 08:17:38 -08:00
Paulus Schoutsen 7dd51034cd Merge pull request #1213 from MartinHjelmare/mysensors-light
Add mysensors light platform
2016-02-12 19:01:41 -08:00
MartinHjelmare 0492f0abd0 Fix error in update method for V_STATUS
* Remove check against V_STATUS to avoid error when using version 1.4
    of mysensors. V_LIGHT has the same integer value so V_STATUS is not
    needed.
2016-02-12 22:05:31 +01:00
Paulus Schoutsen 3c582d1e3c Merge pull request #1143 from balloob/rfxtrx
Rfxtrx
2016-02-11 23:30:34 -08:00
MartinHjelmare 2cf061c768 Add mysensors light platform
* Make light controllable independently with types V_LIGHT, V_DIMMER,
    V_RGB and V_RGBW. V_RGBW is not implemented in the frontend yet.
* Add discovery for light platform.
* Add optimistic mode config setting for switch and light
    to allow feedback state from actuator.
* Move S_LIGHT, V_LIGHT, V_STATUS types from switch to light platform.
* Change node update logging to debug from info level.
* Fix some inaccurate comments.
2016-02-12 01:22:35 +01:00
Dan Smith 4cfa14c29d Support manually-defined WeMo devices
This is extremely useful if you want to support wemos that are on
another subnet or across a VPN. It also lets you sidestep the discovery
process, which is problematic for a lot of people and situations.

In order for this to work, we need to bump the pywemo requirement to
0.3.10, which includes my changes to make this possible.

WeMo devices can be manually configured by adding a static section to
the config, like this:

  switch:
    platform: wemo
    static:
       - 192.168.100.5
       - 192.168.100.6
2016-02-11 17:23:20 +00:00
Daniel f938134069 updated rfxtrx lib 2016-02-11 14:15:51 +01:00
MartinHjelmare 75775a561b Use entity property available 2016-02-11 03:27:02 +01:00
Daniel cdf0e80773 Improve the robustness of the rfxtrx module, and solve issue #1116 2016-02-10 08:44:34 +01:00
Dan Smith 0a7db98b0e Round mFi sensor values to reasonable levels of precision
Most of the mFi sensors are able to reasonably provide accurate
readings to a tenth of a unit or so. This patch rounds them for
better display in the UI. Normally, I would expect this to be a view
action instead of altering the actual data emitted, but since these
values are reasonable for sensor precision, we're not really losing
anything. I followed the model from the openweathermap component, which
rounds for readability in the backend.
2016-02-07 20:51:00 +00:00
Dan Smith 951fa603ff Support mPort voltage output switch types
An mPort device has a voltage output port that, if configured,
we should support like a switch.
2016-02-07 20:48:57 +00:00
Dan Smith c113997609 Tweak mFi switch behavior to avoid false states
When we update the mFi server for the state of a switch, the new
state is not always reported immediately if we update right after
the action (the server is not RESTful).

This patch adds some internal target-state handling to report the
desired state on the next poll, allowing any subsequent polls to
override that state.

Also, bump the version requirement for mficlient to 0.2.2 to absorb
a bug fix.
2016-02-07 20:48:51 +00:00
Paulus Schoutsen 64611ab2be Merge pull request #1157 from balloob/device-state-attributes
Clean up state_attributes vs device_state_attributes
2016-02-07 10:16:34 -08:00
Fabian Affolter 757946293e Move configuration details to docs 2016-02-07 11:52:17 +01:00
Paulus Schoutsen f08b77dc4c Clean up state_attributes vs device_state_attributes 2016-02-06 22:34:24 -08:00
Paulus Schoutsen 428750eeda Merge pull request #1151 from kk7ds/add-mfi
Add support for Ubiquiti mFi sensors and switches
2016-02-06 20:11:53 -08:00
Dan Smith ffc4822f50 Add support for Ubiquiti mFi switchable devices
This adds support for mFi devices that are swichable,
such as the mFi Outlet device.
2016-02-07 03:02:49 +00:00
MartinHjelmare d773ad1ecb Fix mysensors version errors
* The application of the version check in unit_of_measurement was
	messed up after the last refactor. Fix that again.
* An error could occur in device_state_attributes if there was a
	mismatch between used value_type in the device and mysensors
	version in config. Add try... except to handle that.

Bump pyvera version.

Bump pywemo version.

Add unavailable status before properly initialised for maker and insight.
2016-02-07 00:28:12 +00:00
Paulus Schoutsen b3e966665a Merge pull request #1150 from bradsk88/master
Updating to python-wink 0.5.0
2016-02-06 13:04:42 -08:00