Commit Graph

33 Commits (dcc46226ee75320591367773c2339aedd811c555)

Author SHA1 Message Date
Jorim Tielemans b50c93ccb7 Validate ports as a port (#17549)
* Validate ports as port

Better than just a positive integer since it limits the range from 1 to 65535.

* Validate port for Axis

* Validate port for Xiaomi Home Camera

* Validate port for Modbus

* Validate port for Yamaha MusicCast Receivers

* Update zhong_hong.py

Validate port as a port, the gateway address as positive_int
Also moved the default values to their variable

* Validate port for the Asterisk Voicemail interface

* Fix lint

* Validate port for Xiaomi Cameras
2018-10-17 23:09:05 +02:00
Ville Skyttä 2f7b79764a More pylint 2 fixes (#15565)
## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-20 11:45:20 +03:00
Ville Skyttä b92350fb55 Lint cleanup (#15103)
* Remove unneeded inline pylint disables

* Remove unneeded noqa's

* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Ville Skyttä 4bd7a7eee3 Remove inline pylint disables for messages disabled in pylintrc (#14978) 2018-06-16 00:15:46 +02:00
Anders Melchiorsen 8267a21bfe Lazy loading of service descriptions (#11479)
* Lazy loading of service descriptions

* Fix tests

* Load YAML in executor

* Return a copy of available services to allow mutations

* Remove lint

* Add zha/services.yaml

* Only cache descriptions for known services

* Remove lint

* Remove description loading during service registration

* Remove description parameter from async_register

* Test async_get_all_descriptions

* Remove lint

* Fix typos from multi-edit

* Remove unused arguments

* Remove unused import os

* Remove unused import os, part 2

* Remove unneeded coroutine decorator

* Only use executor for loading files

* Cleanups suggested in review

* Increase test coverage

* Fix races in existing tests
2018-01-07 14:54:16 -08:00
goldminenine 9a34e7174c Update modbus.py (#11238)
Support of MODBUS RTU over TCP ethernet mode. See more description here:  https://www.eltima.com/modbus-over-ethernet/
2017-12-29 09:19:34 +01:00
ziotibia81 a024c1b162 Communication timeout support in modbus hub. (#9780)
* Communication timeout support in modbus hub.

Timeout parameter are taken from configuration and passed to pymodbus constructor.

* CONF_TYPE and CONF_TIMEOUT imported from const.py
2017-10-09 23:51:18 +02:00
Sabesto c48c2b00a8 Modbus fixes to work with pymodbus 1.3.1 (#8365)
* Fixed a bug where changing fan speed was not possible

* Bump pymodbus version to 1.3.1 to fix issue #8285

* Changed all modbus components so that they use CONF_SLAVE from const.py

* Fix checking result from a modbus transaction

* Add missing decorator

* Added modbus write coil service and added descriptions

* Removed a hiding debug print
2017-07-06 22:30:23 -07:00
Sabesto 6496c38ce6 Fix issue #8285 (#8340)
* Fixed a bug where changing fan speed was not possible

* Bump pymodbus version to 1.3.1 to fix issue #8285

* Changed all modbus components so that they use CONF_SLAVE from const.py
2017-07-04 17:01:35 +02:00
Andrey 44edf3e105 Switch pymodbus to pypi (#7677) 2017-05-20 21:19:22 +02:00
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Fabian Affolter 3ee4d1060f Update docstrings (#7361)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
2017-04-29 22:04:49 -07:00
LvivEchoes bbeb64eb24 Add support of input registers while querying modbus sensor. (#7082)
* Add support of input registers while querying modbus sensor.

* Changed config option. Refactoring.
2017-04-20 21:28:49 -04:00
Ben Van Mechelen 0ea9d935af Modbus write_register accept list 2017-02-02 10:23:13 +01:00
Per Sandström ca646c08c2 Modbus component refactoring - sensors and switches (#3297) 2016-09-13 22:47:44 +02:00
Per Sandström 54a17f5d98 modbus write registers service (#3252) 2016-09-10 08:17:28 -07:00
Per Sandström d53d8f5ea9 thread safe modbus (#3188) 2016-09-06 18:21:38 -07:00
Per SandstrÃom be1981ca5d modbus write register service 2016-08-25 08:20:08 +00:00
Fabian Affolter b534244e40 Fix PEEP257 issues 2016-03-08 17:55:57 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen fabd0ced3f Make DEPENDENCIES optional for components 2015-11-26 13:11:59 -08:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Fabian Affolter 352d3532e7 Remove configuration details 2015-10-21 21:11:18 +02:00
Paulus Schoutsen 326d23de38 Fix pip checking if zip files are installed 2015-09-08 19:49:27 -07:00
Fabian Affolter e55922eb9e Update docstring (config file) and attempt to honor PEP0257 2015-09-07 18:55:58 +02:00
Ryan Kraus 893ae15042 Changed component REQUIREMENTS to absolute versions. 2015-08-29 21:39:50 -04:00
Paulus Schoutsen b37471af68 Update modbus dependency 2015-08-08 21:42:17 -07:00
Paulus Schoutsen 60ade75031 Add missing dependencies 2015-08-08 21:22:34 -07:00
Fabian Affolter caecca7e1f update file header 2015-08-06 17:53:49 +02:00
Fabian Affolter 39ccd1b3a4 fix typo 2015-06-11 22:32:58 +02:00
Fabian Affolter fdb46d80ba Update documentation 2015-05-13 19:06:17 -07:00
Aurélien Correia 4d6555441d Passed Travis CI 2015-04-21 16:40:13 +02:00
Aurélien Correia fb6b514c34 Adding simplistic support for Modbus sensor and switch (based on pymodbus) 2015-04-15 16:47:42 +02:00