Commit Graph

81 Commits (64a72daa277a4575006c6f9cb635711417b6a751)

Author SHA1 Message Date
jan iversen 6bd70fdf15
Solve Modbus reload issue (#82253)
fixes undefined
2022-11-18 09:32:51 +01:00
Avishay 92b5721f80
Fix modbus hvac mode keys (#81747)
Change the HVAC mode register conf constants
2022-11-09 11:09:21 +01:00
Benjamin Salchow 1d633ac484
Accept input register in Modbus binary sensor (#81352)
Adds input register as valid option for modbus binary_sensor

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2022-11-07 10:14:12 +01:00
Avishay ae7eb9cef9
Add mode control for Modbus climate entities (#73906)
* Add support for Modbus HVAC control registers
2022-10-20 13:15:30 +02:00
Nippey 0e1fe4eba5
Modbus: Add support for Holding Registers to Binary Sensor (#80460)
Update handling of binary sensors to support reading from holding registers (command 0x03).
2022-10-18 10:31:08 +02:00
epenet 7aa7458a22
Expose modbus constants in root (#78269) 2022-09-12 18:48:10 +02:00
jan iversen 1a79118600
Fix modbus reload service (#68040)
* Fix modbus reload service.

* Please coverage.

* Resolve difference between local pytest and github.
2022-03-12 14:12:38 +02:00
jan iversen 306498378c
Coverage 100% of Modbus climate (#67396)
* Coverage 100% of climate.py

* Allow 100% test.
2022-03-11 19:14:40 +02:00
jan iversen e891df0ff3
Allow multi read of Modbus sensor (#67378) 2022-02-28 11:07:55 -08:00
jan iversen 6ec9c402b1
Remove generic data types INT, UINT, FLOAT in modbus (#67268) 2022-02-26 13:27:48 -08:00
jan iversen 3173f1672b
Remove deprecated reverse_order and data_count from Modbus (#67236) 2022-02-25 08:01:03 -08:00
jan iversen cb877adb6a
Allow multiread in modbus binary_sensor (#59886) 2022-02-21 10:22:50 -08:00
jan iversen 4ca339c5b1
Set slave default to 0, as already documented in Modbus (#66921) 2022-02-20 11:56:38 +01:00
jan iversen d76687d672
Add support for INT8 and UINT8 in Modbus (#66889) 2022-02-19 17:17:29 +01:00
Tathar 16e5d7abe1
Add unique_id to modbus entities (#64634)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-01-26 10:37:15 +01:00
jan iversen 42803e6ac0
Clean startup of modbus by moving service schemas (#57763) 2021-10-15 09:40:27 -07:00
jan iversen 4417ffb407
COnvert DATA_TYPE to enum. (#57699) 2021-10-15 07:09:59 +02:00
Robert Hillis 488a636aec
Clean up unused loggers (#57662) 2021-10-14 10:03:38 -07:00
jan iversen c7c789f618
Strictly type modbus __init__.py, validator.py (#56378)
* strictly type: __init__.py, validator.py
2021-09-21 13:43:41 +02:00
jan iversen aaa62dadec
Add service to stop/restart modbus (#55599)
* Add service to stop/restart modbus.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-14 09:42:50 +02:00
Matthias Alphart cd0ae66d58
Add CONF_STATE_CLASS to `sensor/__init__.py` (#54106)
* add CONF_STATE_CLASS to const.py

* move to `sensor/__init__.py`

* move to sensor/const.py

* Revert "move to sensor/const.py"

This reverts commit 604d0d066b.

* move it to `sensor/const.py` but import it from `sensor/__init__.py`

* add Modbus
2021-08-27 05:54:50 +02:00
jan iversen 7df8d0c973
Check for duplicate host/port and integration name in modbus (#54664)
* Check for duplicate host/port and integration name.

* Change to use set().

* Please CI.

* Add basic tests.
2021-08-25 12:29:00 +02:00
Matthias Alphart 51361fbd2b
Add configurable `state_class` to Modbus sensors (#54103)
* add configurable state_class

* Add test of new parameter.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-08-25 11:50:54 +02:00
jan iversen 33f660118f
Add lazy_error_count to modbus (#54412)
* Add lazy_error_count.

* Use -=

* Review comments.
2021-08-21 15:49:50 +02:00
jan iversen 0688aaa2b6
Check for duplicate entity name/address in modbus entities (#54669)
* Check for duplicate entity name/address.
2021-08-19 09:37:31 +02:00
jan iversen bafbbc6563
Adjust modbus constants names (#54792)
* Follow up.
2021-08-18 12:56:54 +02:00
jan iversen e8aa280d7f
Add modbus get_hub (#54277)
* Add dict with hubs.

* Update flexit to use get_hub.

* Remove executor_task for close.
2021-08-08 22:48:33 +02:00
jan iversen 2232915ea8
Add parameter to delay sending of requests in modbus (#54203) 2021-08-07 21:10:08 -07:00
jan iversen 0f8a286cc7
Allow combinations write_coil/read_coils and write_coils/read_coil for modbus switch (#53856) 2021-08-02 14:55:52 +02:00
jan iversen 7306503756
Calculate count automatically in modbus platforms (#53116) 2021-07-20 22:49:54 -07:00
jan iversen 646862ec96
Add array write to turn_on/off in modbus switch/fan/light (#52582) 2021-07-12 11:22:53 -07:00
jan iversen 2ecfd74fa4
Add more data_types to modbus (#52423)
* Add more data_types.

* Use new struct when writing temperature.
2021-07-12 07:58:45 +02:00
jan iversen f1303e02ff
Let climate use base_struct_schema. (#52154) 2021-06-28 22:21:31 -07:00
jan iversen 1f4fdb50dc
Share struct validator between sensor and climate (#51935) 2021-06-23 11:03:17 -07:00
jan iversen bc329cb602
Convert if/elif chains to dicts in modbus (#51962) 2021-06-18 11:20:44 +02:00
jan iversen 7ad91fdf71
Add swap to climate and change data_count -> count in modbus (#51668) 2021-06-16 12:11:23 +02:00
jan iversen 2a51587bc3
Remove reverse_order (replaced by generic swap) (#51665)
Remove reverse_order (replaced by generic swap).
2021-06-11 11:41:41 +02:00
jan iversen 9e378d51af
Reduce modbus schemas and add delay to fan/light (#51664) 2021-06-11 09:22:47 +02:00
jan iversen 50001684aa
Add retries/retry_on_empty configuration parameters to Modbus (#51412)
* Add retries/retry_on_empty configuration parameters.

* Please review comment.
2021-06-06 09:13:50 +02:00
jan iversen 538a189168
Adjust modbus climate to use address/input_type (#51202) 2021-05-28 17:57:14 +02:00
jan iversen 00507539c1
Change Cover to use address/input_type (#51154)
* Change Cover to use address/input_type.

* Flake.
2021-05-28 13:23:44 +02:00
jan iversen 5afd16ef5d
Move modbus schema validators to validators.py (#51121) 2021-05-28 11:38:31 +02:00
Yuriy Sannikov 6391d75919
Refactor ModbusRegisterSensor class to get hub and configuration (#50234)
* refactor ModbusRegisterSensor to match the ModbusSwitch interface

* Please pylint, mypy etc.

* Remove PLATFORM.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-26 19:28:14 +02:00
jan iversen be13a73db8
Allow manual scan and add delay in switch verify. (#50974) 2021-05-24 12:59:55 +02:00
Vladimír Záhradník c979101a02
Add Modbus fan integration (#48558)
* Add Modbus fan entity

* Update to PR.

* Pylint.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-21 09:56:47 +02:00
Vladimír Záhradník 80d172140f
Add Modbus light integration (#42120)
* Add  Modbus Light and add unit tests

* Update to original PR.

* Review comments.

* Review 2.

Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-05-21 08:57:17 +02:00
jan iversen ad7be91b6a
Fix modbus blocking threads (#50619)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-15 19:54:17 +02:00
jan iversen 19cdff10c3
Add "close_comm_on_error" to modbus configuration (#50583) 2021-05-14 10:54:23 +02:00
jan iversen 70b09ed9a1
Handle relation between scan_interval and pymodbus timeout in modbus (#50363)
* Control scan_interval compared to pymodbus timeout.

add MINIMUM_SCAN_INTERVAL=5 seconds and validata with Voluptous.
Keep modbus.py 100% coverage.

* Please pylint.

* Review comments.

* pylint.
2021-05-10 19:28:38 +02:00
jan iversen 552ca1c57b
Fix modbus switch problems (#50117) 2021-05-07 22:12:13 +02:00