Making it more production ready
This commit is contained in:
@@ -18,5 +18,11 @@
|
||||
|
||||
// Work from this directory
|
||||
"workspaceFolder": "/workspace",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind"
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
|
||||
|
||||
"customizations": {
|
||||
"jetbrains": {
|
||||
"backend": "IntelliJIdea"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
# RS485 to Ethernet Module Installation Guide
|
||||
|
||||
## Overview
|
||||
|
||||
This guide provides step-by-step instructions for installing a 2-Channel RS485 to Ethernet adapter module to connect Modbus devices (thermostats) to a network.
|
||||
|
||||
## Hardware Requirements
|
||||
|
||||
- 2-CH RS485 to Ethernet adapter module
|
||||
- Existing 24V DC transformer
|
||||
- RS485/Modbus devices (e.g., thermostats)
|
||||
- Appropriate wiring (shielded twisted pair recommended for RS485)
|
||||
|
||||
## Module Specifications
|
||||
|
||||
- **Power Input**: 6-36V DC (24V DC typical)
|
||||
- **RS485 Channels**: 2 independent channels
|
||||
- **Ethernet Ports**: 2 ports (either can be used for network, other for cascading)
|
||||
|
||||
## Connection Diagram
|
||||
|
||||
### Power Connections
|
||||
|
||||
```
|
||||
24V DC Transformer RS485 Module
|
||||
┌─────────────┐ ┌──────────────────┐
|
||||
│ │ │ │
|
||||
│ + 24V ───┼────────────┼──→ 6-36V Input │
|
||||
│ │ │ │
|
||||
│ - GND ───┼────────────┼──→ Ground │
|
||||
│ │ │ │
|
||||
└─────────────┘ └──────────────────┘
|
||||
```
|
||||
|
||||
### RS485 Data Connections
|
||||
|
||||
```
|
||||
Electrical Panel RS485 Module
|
||||
XCOM Terminal Group
|
||||
┌──────────────────────┐ ┌─────────────────────┐
|
||||
│ │ │ │
|
||||
│ Device 1 (String 1) │ │ RS485 Channel 1 │
|
||||
│ ├─ T+ (Data+) ──────┼───────────┼──→ A │
|
||||
│ ├─ T- (Data-) ──────┼───────────┼──→ B │
|
||||
│ └─ GND ─────────────┼───────────┼──→ Signal Ground │
|
||||
│ │ │ │
|
||||
│ Device 2 (String 2) │ │ RS485 Channel 2 │
|
||||
│ ├─ T+ (Data+) ──────┼───────────┼──→ A │
|
||||
│ ├─ T- (Data-) ──────┼───────────┼──→ B │
|
||||
│ └─ GND ─────────────┼───────────┼──→ Signal Ground │
|
||||
│ │ │ │
|
||||
└──────────────────────┘ └─────────────────────┘
|
||||
```
|
||||
|
||||
### Complete System Overview
|
||||
|
||||
```
|
||||
┌─────────────────┐
|
||||
│ 24V DC Power │
|
||||
│ Transformer │
|
||||
└────────┬────────┘
|
||||
│
|
||||
┌────────▼──────────────────────────┐
|
||||
│ RS485 to Ethernet Module │
|
||||
│ │
|
||||
│ Power: 6-36V Input, Ground │
|
||||
│ │
|
||||
│ RS485-1: A, B, GND │
|
||||
│ RS485-2: A, B, GND │
|
||||
│ │
|
||||
│ Ethernet: ETH1 or ETH2 ────────► To Network
|
||||
│ │
|
||||
└──────┬─────────────┬──────────────┘
|
||||
│ │
|
||||
┌─────────▼─────┐ ┌───▼────────────┐
|
||||
│ Thermostat │ │ Thermostat │
|
||||
│ String 1 │ │ String 2 │
|
||||
│ (via Modbus) │ │ (via Modbus) │
|
||||
└───────────────┘ └────────────────┘
|
||||
```
|
||||
|
||||
## Installation Steps
|
||||
|
||||
### 1. Safety First
|
||||
|
||||
⚠️ **IMPORTANT**: Disconnect all power before beginning installation.
|
||||
|
||||
### 2. Power Connection
|
||||
|
||||
1. Locate the existing 24V DC transformer
|
||||
2. Connect the module's **6-36V Input** terminal to the transformer's **+ (positive)** output
|
||||
3. Connect the module's **Ground** terminal to the transformer's **- (negative)** output
|
||||
|
||||
**Wire colors (typical)**:
|
||||
- Red: +24V DC
|
||||
- Black: Ground/Common
|
||||
|
||||
### 3. RS485 Data Connections
|
||||
|
||||
#### Understanding the XCOM Terminal Group
|
||||
|
||||
In your electrical panel's XCOM group, you'll find:
|
||||
- First set of wires: RDZ HMI connections
|
||||
- Following pairs: Two RS485 pairs for two strings of thermostats
|
||||
|
||||
#### Connection Notes
|
||||
|
||||
- **T+** on devices connects to **A** on the module
|
||||
- **T-** on devices connects to **B** on the module
|
||||
- **PE/GND** connects to **Signal Ground** on the module
|
||||
- Some wires may be unmarked - verify with continuity testing
|
||||
|
||||
#### Wiring Each Channel
|
||||
|
||||
Connect each RS485 device string to one of the two module channels:
|
||||
|
||||
**For String 1** (any channel - e.g., RS485-1):
|
||||
```
|
||||
Device T+ ──→ RS485-1 A
|
||||
Device T- ──→ RS485-1 B
|
||||
Device GND ─→ RS485-1 Signal Ground
|
||||
```
|
||||
|
||||
**For String 2** (remaining channel - e.g., RS485-2):
|
||||
```
|
||||
Device T+ ──→ RS485-2 A
|
||||
Device T- ──→ RS485-2 B
|
||||
Device GND ─→ RS485-2 Signal Ground
|
||||
```
|
||||
|
||||
> **Note**: The assignment of devices to Channel 1 or Channel 2 is flexible. Choose either channel for each device string - the specific mapping doesn't matter as thermostat identification is done after discovery through the network.
|
||||
|
||||
### 4. Verify Connections
|
||||
|
||||
**Before applying power**:
|
||||
|
||||
1. ✅ Check continuity between Wi-SA connectors and module terminals
|
||||
2. ✅ Verify correct polarity on power connections
|
||||
3. ✅ Ensure RS485 wires are properly paired (A-to-A, B-to-B)
|
||||
4. ✅ Confirm all ground connections are secure
|
||||
|
||||
### 5. Ethernet Connection
|
||||
|
||||
1. Connect an Ethernet cable from either **ETH1** or **ETH2** to your network switch/router
|
||||
2. The second Ethernet port can be used for router cascading if needed
|
||||
|
||||
### 6. Power On and Test
|
||||
|
||||
1. Restore power to the 24V DC transformer
|
||||
2. Check the module's LED indicators:
|
||||
|
||||
| LED | Description |
|
||||
|-----|-------------|
|
||||
| **PWR** | Power indicator - should be solid |
|
||||
| **NET** | Network indicator - blinks when connected to Ethernet |
|
||||
| **LINK1** | Lights up when establishing RS485 Channel 1 connection |
|
||||
| **ACT1** | Lights up when Channel 1 is transmitting data |
|
||||
| **LINK2** | Lights up when establishing RS485 Channel 2 connection |
|
||||
| **ACT2** | Lights up when Channel 2 is transmitting data |
|
||||
|
||||
## Important Notes
|
||||
|
||||
- ⚠️ Use **shielded twisted pair cable** for all RS485 connections to minimize interference
|
||||
- ⚠️ Maintain proper polarity: A↔A (T+), B↔B (T-), GND↔GND
|
||||
- ⚠️ Power input must be within **6-36V DC** range (24V DC is typical)
|
||||
- ⚠️ Either Ethernet port functions identically - choose whichever is more convenient
|
||||
- ℹ️ Channel assignment is flexible - devices can be connected to either RS485-1 or RS485-2
|
||||
- ℹ️ Device discovery and mapping is performed after installation via network configuration
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Issue | Possible Solution |
|
||||
|-------|------------------|
|
||||
| PWR LED not lit | Check 24V DC power connections and voltage |
|
||||
| NET LED not blinking | Verify Ethernet cable and network connection |
|
||||
| LINK LED not lit | Check RS485 wiring polarity (A, B, GND) |
|
||||
| No device communication | Verify continuity of RS485 cables; check for proper termination |
|
||||
|
||||
## Post-Installation
|
||||
|
||||
After successful installation:
|
||||
|
||||
1. Access the module's web interface via its IP address
|
||||
2. Configure network settings if necessary
|
||||
3. Perform device discovery to identify all connected Modbus devices
|
||||
4. Map thermostats/devices to their physical locations
|
||||
5. Test communication with each device
|
||||
|
||||
## Safety and Compliance
|
||||
|
||||
- Installation should be performed by a **qualified electrician**
|
||||
- Follow all local electrical codes and regulations
|
||||
- Ensure proper grounding of all equipment
|
||||
- Use appropriate wire gauges for the application
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- Consult the module's technical documentation for advanced configuration
|
||||
- Refer to device-specific manuals for RS485 settings (baud rate, parity, etc.)
|
||||
|
||||
---
|
||||
|
||||
**Revision**: 1.0
|
||||
**Last Updated**: January 2026
|
||||
@@ -0,0 +1,146 @@
|
||||
# RS485 to Ethernet Module - Software Configuration Guide
|
||||
|
||||
## Overview
|
||||
|
||||
This guide covers the essential software configuration of the 2-CH RS485 to Ethernet adapter. Configuration is done via web browser - no software installation required.
|
||||
|
||||
## What You Need to Configure
|
||||
|
||||
**Only two things are critical:**
|
||||
1. **IP Address** - Match your network
|
||||
2. **Baud Rate** - Set to 19200 (or match your devices)
|
||||
|
||||
All other settings can remain at their defaults.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Default Module Settings
|
||||
|
||||
- **Channel 1**: `192.168.1.200`
|
||||
- **Channel 2**: `192.168.1.201`
|
||||
- **Default Port**: `4196`
|
||||
- **No password required** (first login)
|
||||
|
||||
### Step 1: Access the Web Interface
|
||||
|
||||
1. Temporarily set your computer's IP to `192.168.1.100` (same network as module)
|
||||
2. Open web browser and go to:
|
||||
- Channel 1: `http://192.168.1.200`
|
||||
- Channel 2: `http://192.168.1.201`
|
||||
3. Click "Login" (leave password blank on first access)
|
||||
|
||||
### Step 2: Change IP Address
|
||||
|
||||
**Network Settings section:**
|
||||
- **Device IP**: Change to your network (example: `192.168.11.200`)
|
||||
- **Subnet Mask**: Usually `255.255.255.0`
|
||||
- **Gateway**: Your router IP (example: `192.168.11.1`)
|
||||
- Leave other settings as default
|
||||
|
||||
> **Important**: Each channel needs a unique IP! Use sequential IPs like `.200` and `.201`
|
||||
|
||||
### Step 3: Set Baud Rate
|
||||
|
||||
**Serial Settings section:**
|
||||
- **Baud Rate**: Set to `19200`
|
||||
- Leave other serial settings as default (8 databits, None parity, 1 stopbit)
|
||||
|
||||
### Step 4: Save and Repeat
|
||||
|
||||
1. Click **"Submit Modification"**
|
||||
2. Access the module at its new IP address
|
||||
3. Repeat Steps 1-4 for Channel 2 with a different IP
|
||||
|
||||
## Configuration Summary
|
||||
|
||||
### Essential Settings to Change
|
||||
|
||||
| Setting | Channel 1 | Channel 2 |
|
||||
|---------|-----------|-----------|
|
||||
| **Device IP** | `192.168.x.200` | `192.168.x.201` |
|
||||
| **Baud Rate** | `19200` | `19200` |
|
||||
|
||||
### Other Settings (Keep Defaults)
|
||||
|
||||
The web interface shows additional settings that can remain at defaults:
|
||||
- Work Mode: TCP Server
|
||||
- Device Port: 4196
|
||||
- IP mode: Static
|
||||
- Databits: 8
|
||||
- Parity: None
|
||||
- Stopbits: 1
|
||||
- Flow control: None
|
||||
- Advanced Settings: Keep defaults
|
||||
- Multi-Host Settings: Keep defaults
|
||||
|
||||
## LED Indicators
|
||||
|
||||
After configuration, check the module's LEDs:
|
||||
|
||||
| LED | Expected Status |
|
||||
|-----|----------------|
|
||||
| **PWR** | Solid (power on) |
|
||||
| **NET** | Blinking (network connected) |
|
||||
| **LINK1/2** | On (RS485 connection) |
|
||||
| **ACT1/2** | Blinking (data transmission) |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Can't Access Web Interface
|
||||
|
||||
1. Verify your computer is on `192.168.1.x` network
|
||||
2. Check Ethernet cable is connected
|
||||
3. Ensure module is powered (PWR LED lit)
|
||||
4. **Reset if needed**: Hold RESET button for 5 seconds (reverts to `192.168.1.254`)
|
||||
|
||||
### Can't Access After Changing IP
|
||||
|
||||
1. Update your computer's IP to match the new network
|
||||
2. Verify gateway and subnet mask are correct
|
||||
3. If lost, reset module and start over
|
||||
|
||||
### No RS485 Communication
|
||||
|
||||
1. Verify baud rate is set to `19200`
|
||||
2. Check RS485 wiring: A to A (T+), B to B (T-)
|
||||
3. Ensure RS485 devices are powered
|
||||
|
||||
## Configuration Checklist
|
||||
|
||||
- [ ] Accessed Channel 1 web interface (`192.168.1.200`)
|
||||
- [ ] Changed Channel 1 IP to match my network
|
||||
- [ ] Set Channel 1 baud rate to `19200`
|
||||
- [ ] Saved and verified Channel 1 settings
|
||||
- [ ] Accessed Channel 2 web interface (`192.168.1.201`)
|
||||
- [ ] Changed Channel 2 IP to match my network (unique from Channel 1)
|
||||
- [ ] Set Channel 2 baud rate to `19200`
|
||||
- [ ] Saved and verified Channel 2 settings
|
||||
- [ ] Verified LED indicators are working
|
||||
|
||||
## Example Configuration
|
||||
|
||||
Based on network `192.168.11.x`:
|
||||
|
||||
**Channel 1** (`http://192.168.11.200`):
|
||||
```
|
||||
Device IP: 192.168.11.200
|
||||
Baud Rate: 19200
|
||||
Subnet Mask: 255.255.255.0
|
||||
Gateway: 192.168.11.1
|
||||
```
|
||||
|
||||
**Channel 2** (`http://192.168.11.201`):
|
||||
```
|
||||
Device IP: 192.168.11.201
|
||||
Baud Rate: 19200
|
||||
Subnet Mask: 255.255.255.0
|
||||
Gateway: 192.168.11.1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**For Additional Help**:
|
||||
- **Waveshare Wiki**: https://www.waveshare.com/wiki/2-CH_RS485_TO_ETH_(B)
|
||||
- **Support**: Contact us for configuration assistance
|
||||
|
||||
**Last Updated**: January 2026
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
Business Source License 1.1 - Parameters
|
||||
Licensor: Bad Kitty Production S.R.L.
|
||||
Licensed Work: RDZ Thermostats Monitor
|
||||
The Licensed Work is © 2026 Bad Kitty Production S.R.L.
|
||||
Software Description: Home Assistant integration for monitoring and controlling master-slave thermostat systems via RS485 to Ethernet adapters
|
||||
Additional Use Grant: You may make use of the Licensed Work, provided that you do not use the Licensed Work for a Commercial Purpose.
|
||||
A "Commercial Purpose" means any of the following:
|
||||
|
||||
Offering the Licensed Work to third parties as a commercial service or Software-as-a-Service (SaaS)
|
||||
Using the Licensed Work as part of a commercial smart home installation, monitoring, or management business
|
||||
Incorporating the Licensed Work into a commercial product or service that is sold or licensed to customers
|
||||
|
||||
For clarity, the following uses are permitted and are not considered Commercial Purposes:
|
||||
|
||||
Personal use in your own home or residence
|
||||
Internal use within your organization for your own thermostat systems
|
||||
Educational or research purposes
|
||||
Development, testing, and evaluation purposes
|
||||
Use by non-profit organizations for their own internal operations
|
||||
|
||||
Change Date: January 20, 2030
|
||||
Change License: Apache License, Version 2.0
|
||||
|
||||
License text copyright © 2024 MariaDB plc, All Rights Reserved. “Business Source License” is a trademark of MariaDB plc.
|
||||
|
||||
Terms
|
||||
The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
|
||||
|
||||
Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.
|
||||
|
||||
If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
|
||||
|
||||
All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
|
||||
|
||||
You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
|
||||
|
||||
Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
|
||||
|
||||
This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License).TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. MariaDB hereby grants you permission to use this License’s text to license your works, and to refer to it using the trademark “Business Source License”, as long as you comply with the Covenants of Licensor below.
|
||||
|
||||
Covenants of Licensor
|
||||
In consideration of the right to use this License’s text and the “Business Source License” name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
|
||||
|
||||
To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where “compatible” means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
|
||||
To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text “None” to specify a Change Date. Not to modify this License in any other way.
|
||||
|
||||
Notice
|
||||
The Business Source License (this document, or the “License”) is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
|
||||
|
||||
For more information on the use of the Business Source License for MariaDB products, please visit the MariaDB Business Source License FAQ. For more information on the use of the Business Source License generally, please visit the Adopting and Developing Business Source License FAQ.
|
||||
@@ -0,0 +1,213 @@
|
||||
# RDZ Thermostats Monitor
|
||||
|
||||
A Home Assistant custom integration for monitoring and controlling RDZ thermostats via Modbus RTU over TCP.
|
||||
|
||||
## Overview
|
||||
|
||||
This integration enables passive monitoring and control of RDZ thermostats that are connected to a PLC-based heating system via Modbus RTU. It uses a 2-Channel RS485 to Ethernet adapter to bridge the Modbus network to your local network, allowing Home Assistant to observe thermostat communication and send temperature setpoint commands.
|
||||
|
||||
**Key Features:**
|
||||
- Passive monitoring of temperature, humidity, and thermostat status
|
||||
- Remote temperature setpoint control from Home Assistant
|
||||
- Automatic discovery of thermostats on the Modbus network
|
||||
- Climate entities with HVAC action display (heating/idle)
|
||||
- Zone pump status monitoring
|
||||
|
||||
### What This Enables
|
||||
|
||||
This integration provides **monitoring and control** of your RDZ thermostats within Home Assistant. With the zone pump status exposed, you can see exactly when each zone was heating or cooling, and Home Assistant's recorder keeps a full history of this data. The temperature and humidity readings, combined with setpoint control, open up possibilities for extending functionality through Home Assistant automations - such as granular scheduling, event-based heating (presence, weather, calendar), or using sensor values to trigger alerts and other automations. These extensions are not built into the plugin but are easily achievable using Home Assistant's native automation capabilities.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Home Assistant** installed and running (Core, Supervised, or OS)
|
||||
- **2-Channel RS485 to Ethernet adapter** ([Waveshare](https://amzn.to/49rCdDc) or compatible)
|
||||
- **RDZ thermostats** connected via Modbus RTU
|
||||
- Basic networking knowledge
|
||||
|
||||
## Bill of Materials
|
||||
|
||||
| Item | Description | Quantity | Notes |
|
||||
|------|-------------|----------|---------------------------------------------------------------------------------------------------|
|
||||
| RS485 to Ethernet Adapter | 2-CH RS485 to ETH (B) | 1 | [Waveshare](https://amzn.to/49rCdDc) or similar (Configuration Steps refer to this specific model) |
|
||||
| 24V DC Power Supply | 6-36V DC compatible | 1 | May use existing transformer or [MEAN WELL](https://amzn.to/3Nz7kUI) |
|
||||
| Ethernet Cable | Cat5e or better | 1 | To connect adapter to network |
|
||||
| RS485 Cable | Shielded twisted pair | As needed | For RS485 connections |
|
||||
| Home Assistant | if you don't already have it, the host on which the plugin will run | 1| [Pre Built](https://amzn.to/4qEBK6w) or you can DIY with RPI, or other solutions |
|
||||
## Installation
|
||||
|
||||
### 1. Hardware Setup
|
||||
|
||||
Follow the detailed hardware installation guide:
|
||||
|
||||
**[Hardware Installation Instructions](2ch%20RS485%20Hardware%20Installation%20Instructions.md)**
|
||||
|
||||
This covers:
|
||||
- Power connections (24V DC)
|
||||
- RS485 wiring (A, B, GND terminals)
|
||||
- Ethernet network connection
|
||||
- LED indicator verification
|
||||
|
||||
### 2. RS485 Adapter Configuration
|
||||
|
||||
Configure the RS485 to Ethernet adapter:
|
||||
|
||||
**[Software Configuration Guide](2ch%20RS485%20Software%20Configuration.md)**
|
||||
|
||||
Key settings you'll need for Home Assistant:
|
||||
- **IP Address**: Note down the IP you assign (e.g., `192.168.11.200`)
|
||||
- **Port**: Default is `4196`
|
||||
- **Baud Rate**: Must be `19200`
|
||||
|
||||
### 3. Home Assistant Integration Setup
|
||||
|
||||
#### Copy the Integration
|
||||
|
||||
1. Download or clone this repository
|
||||
2. Copy the `custom_components/rdz_thermostats_monitor/` folder to your Home Assistant's `custom_components/` directory:
|
||||
|
||||
```
|
||||
/config/custom_components/rdz_thermostats_monitor/
|
||||
```
|
||||
|
||||
Your directory structure should look like:
|
||||
```
|
||||
/config/
|
||||
├── configuration.yaml
|
||||
├── custom_components/
|
||||
│ └── rdz_thermostats_monitor/
|
||||
│ ├── __init__.py
|
||||
│ ├── manifest.json
|
||||
│ ├── climate.py
|
||||
│ ├── sensor.py
|
||||
│ ├── binary_sensor.py
|
||||
│ └── ...
|
||||
```
|
||||
|
||||
#### Restart Home Assistant
|
||||
|
||||
Restart Home Assistant to load the new integration:
|
||||
- Go to **Settings** > **System** > **Restart**
|
||||
- Or use the command line: `ha core restart`
|
||||
|
||||
#### Add the Integration
|
||||
|
||||
1. Go to **Settings** > **Devices & Services**
|
||||
2. Click **+ Add Integration**
|
||||
3. Search for **"RDZ Thermostats Monitor"**
|
||||
4. Enter the configuration:
|
||||
- **Host**: IP address of your RS485 adapter (e.g., `192.168.11.200`)
|
||||
- **Port**: TCP port (default: `4196`)
|
||||
5. Click **Submit**
|
||||
|
||||
**Note**: If you have two RS485 channels (two thermostat strings), add the integration twice - once for each channel's IP address.
|
||||
|
||||
#### Verify Setup
|
||||
|
||||
After adding the integration:
|
||||
1. Thermostats will be automatically discovered as they communicate
|
||||
2. Each thermostat appears as a device named "RDZ Thermostat X" (where X is the Modbus slave ID)
|
||||
3. Entities created include:
|
||||
- `climate.rdz_thermostat_X` - Main thermostat control
|
||||
- `sensor.rdz_thermostat_X_humidity` - Humidity reading
|
||||
- `binary_sensor.rdz_thermostat_X_zone_pump` - Zone pump status
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-----------|-------------|---------|
|
||||
| Host | IP address of RS485 adapter | Required |
|
||||
| Port | TCP port for Modbus communication | 4196 |
|
||||
|
||||
## Disclaimer - Secondary Master Communication
|
||||
|
||||
**Important:** This integration operates as a **secondary Modbus master** on the RS485 bus. The primary master is typically your PLC or building automation system.
|
||||
|
||||
### What This Means
|
||||
|
||||
When you change a temperature setpoint in Home Assistant, this integration sends commands to the thermostat. However, since the PLC is continuously communicating with the thermostats, there's a possibility of **bus contention** - where both masters try to communicate simultaneously.
|
||||
|
||||
### Potential Issues
|
||||
|
||||
- **Command conflicts**: Occasionally, setpoint commands from Home Assistant may not be received correctly by the thermostat due to timing conflicts with PLC communication
|
||||
- **Intermittent failures**: While rare, you may notice that a temperature change doesn't "stick" on the first attempt
|
||||
|
||||
### Mitigation Strategies
|
||||
|
||||
1. **Retry mechanism**: The integration includes automatic retry logic (5 attempts with 1.3-second intervals) to increase command success rate
|
||||
|
||||
2. **Consistent updates**: If you're using automations to set temperatures, consider pushing the desired setpoint multiple times or verifying the setpoint was accepted:
|
||||
|
||||
```yaml
|
||||
# Example: Automation with verification
|
||||
automation:
|
||||
- alias: "Set morning temperature with retry"
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "06:00:00"
|
||||
action:
|
||||
- repeat:
|
||||
count: 3
|
||||
sequence:
|
||||
- service: climate.set_temperature
|
||||
target:
|
||||
entity_id: climate.rdz_thermostat_1
|
||||
data:
|
||||
temperature: 21
|
||||
- delay: "00:00:05"
|
||||
```
|
||||
|
||||
3. **Monitor for changes**: Use the climate entity's `current_temperature` and `temperature` (setpoint) attributes to verify commands were accepted
|
||||
|
||||
### Why This Happens
|
||||
|
||||
The Modbus RTU protocol doesn't natively support multiple masters. This integration works by:
|
||||
- Passively monitoring existing PLC-thermostat traffic (read-only, no conflicts)
|
||||
- Only actively transmitting when you change a setpoint (potential for brief conflicts)
|
||||
|
||||
In practice, conflicts are **rare** and the retry mechanism handles most cases automatically.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### No Thermostats Discovered
|
||||
|
||||
- Verify the RS485 adapter is powered (PWR LED lit)
|
||||
- Check network connectivity (ping the adapter's IP)
|
||||
- Confirm baud rate is set to 19200
|
||||
- Check RS485 wiring polarity (A to A, B to B)
|
||||
|
||||
### Thermostats Show as Unavailable
|
||||
|
||||
- Ensure the PLC/primary master is communicating with thermostats
|
||||
- Check the adapter's ACT LEDs for data transmission activity
|
||||
- Verify the integration is connected (check Home Assistant logs)
|
||||
|
||||
### Setpoint Changes Don't Apply
|
||||
|
||||
- This may be due to bus contention (see Disclaimer above)
|
||||
- Try changing the setpoint again
|
||||
- Check Home Assistant logs for error messages
|
||||
|
||||
### View Logs
|
||||
|
||||
Enable debug logging to troubleshoot:
|
||||
|
||||
```yaml
|
||||
# configuration.yaml
|
||||
logger:
|
||||
default: info
|
||||
logs:
|
||||
custom_components.rdz_thermostats_monitor: debug
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
For issues and feature requests, please open an issue on the GitHub repository.
|
||||
|
||||
## License
|
||||
|
||||
This project is provided as-is for personal use. See LICENSE file for details.
|
||||
|
||||
---
|
||||
|
||||
**Version**: 1.0.0
|
||||
**Last Updated**: January 2026
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
@@ -0,0 +1,132 @@
|
||||
# RDZ Thermostats Monitor - Development Repository
|
||||
|
||||
## Overview
|
||||
|
||||
This repository contains the **RDZ Thermostats Monitor** custom integration for Home Assistant, along with a complete development environment for local testing.
|
||||
|
||||
**Integration Purpose**: Passive monitoring of Modbus RTU communication over TCP, enabling Home Assistant control of RDZ thermostats in a PLC-based heating system without disrupting existing automation.
|
||||
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
modbus_rtu_monitor/ # This repository
|
||||
├── .devcontainer/
|
||||
│ └── devcontainer.json # Dev container for local HA testing
|
||||
├── config/ # HA configuration for dev environment
|
||||
│ ├── configuration.yaml # Minimal HA config
|
||||
│ └── custom_components/ # Mount point during development
|
||||
├── custom_components/
|
||||
│ └── rdz_thermostats_monitor/ # THE INTEGRATION (publish this folder)
|
||||
│ ├── claude.md # 📋 DETAILED INTEGRATION DOCS HERE
|
||||
│ ├── __init__.py
|
||||
│ ├── hub.py
|
||||
│ ├── coordinator.py
|
||||
│ ├── climate.py
|
||||
│ ├── sensor.py
|
||||
│ ├── binary_sensor.py
|
||||
│ ├── config_flow.py
|
||||
│ ├── const.py
|
||||
│ ├── manifest.json
|
||||
│ └── strings.json
|
||||
└── claude.md # This file (repo overview)
|
||||
```
|
||||
|
||||
## Quick Start (Development)
|
||||
|
||||
### Using Dev Container
|
||||
|
||||
1. **Open in IDE with dev container support** (VS Code or IntelliJ IDEA)
|
||||
2. **Container builds automatically** and installs Home Assistant
|
||||
3. **Start HA**:
|
||||
```bash
|
||||
hass -c /config --debug
|
||||
```
|
||||
4. **Access UI** at http://localhost:8123
|
||||
5. **Edit code** in `custom_components/rdz_thermostats_monitor/`
|
||||
6. **Restart HA** to test changes (Ctrl+C, then rerun `hass`)
|
||||
|
||||
### Dev Container Details
|
||||
|
||||
The `.devcontainer/devcontainer.json` provides:
|
||||
- Python 3.12 environment
|
||||
- Auto-installed Home Assistant
|
||||
- Live code mounting (no rebuild needed)
|
||||
- Port 8123 forwarded to host
|
||||
- IntelliJ IDEA integration
|
||||
|
||||
## Documentation
|
||||
|
||||
### 📋 Integration Documentation
|
||||
|
||||
**For detailed integration documentation, implementation details, and development guides, see:**
|
||||
|
||||
**[`custom_components/rdz_thermostats_monitor/claude.md`](custom_components/rdz_thermostats_monitor/claude.md)**
|
||||
|
||||
That file contains:
|
||||
- Integration architecture and design patterns
|
||||
- Critical implementation details (reconnection logic, passive monitoring)
|
||||
- Modbus protocol specifics
|
||||
- Development tasks and testing procedures
|
||||
- Code patterns and conventions
|
||||
- Known issues and solutions
|
||||
|
||||
### Repository vs Integration
|
||||
|
||||
This repository serves two purposes:
|
||||
|
||||
1. **Development Environment** (root level)
|
||||
- Dev container configuration
|
||||
- Local HA instance for testing
|
||||
- This file documents the dev setup
|
||||
|
||||
2. **Home Assistant Integration** (`custom_components/rdz_thermostats_monitor/`)
|
||||
- The actual integration code
|
||||
- Published/installed to HA's `custom_components/` folder
|
||||
- See nested `claude.md` for integration details
|
||||
|
||||
## Installation (Production)
|
||||
|
||||
To install this integration in a production Home Assistant instance:
|
||||
|
||||
1. Copy the **entire** `custom_components/rdz_thermostats_monitor/` folder to your HA's `custom_components/` directory
|
||||
2. Restart Home Assistant
|
||||
3. Add the integration via UI: Settings → Devices & Services → Add Integration → "RDZ Thermostats Monitor"
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Passive Monitoring**: Observes existing Modbus traffic without interfering
|
||||
- **No Polling**: Completely non-intrusive to PLC communication
|
||||
- **Auto-Discovery**: Automatically creates entities for discovered slaves
|
||||
- **Robust Reconnection**: Handles extended server outages gracefully
|
||||
- **Selective Writing**: Only writes setpoint when user changes temperature
|
||||
- **Climate Entity**: Full thermostat control with HVAC action display
|
||||
- **Configurable**: Enable only the sensors you need
|
||||
|
||||
## Technology Stack
|
||||
|
||||
- **Home Assistant**: Smart home automation platform
|
||||
- **Modbus RTU over TCP**: Industrial communication protocol
|
||||
- **Python 3.12**: Integration implementation language
|
||||
- **Dev Containers**: Isolated development environment
|
||||
|
||||
## Use Case
|
||||
|
||||
This integration enables remote monitoring and control of RDZ thermostats in a PLC-based heating system, providing a migration path from PLC automation to Home Assistant without disrupting existing critical infrastructure.
|
||||
|
||||
For full background and use case details, see the [integration documentation](custom_components/rdz_thermostats_monitor/claude.md#use-case--background).
|
||||
|
||||
## Support & Contribution
|
||||
|
||||
When working on this integration:
|
||||
- Always consult `custom_components/rdz_thermostats_monitor/claude.md` for implementation details
|
||||
- Test with the dev container before deploying to production
|
||||
- Maintain passive monitoring approach (no active polling)
|
||||
- Test reconnection logic with extended outages
|
||||
|
||||
## File Organization
|
||||
|
||||
- **Root `claude.md`** (this file): Repository overview, dev environment setup
|
||||
- **Integration `claude.md`**: Detailed implementation docs, architecture, protocols
|
||||
- **`.devcontainer/`**: Development environment configuration
|
||||
- **`config/`**: HA configuration for local testing
|
||||
- **`custom_components/rdz_thermostats_monitor/`**: The integration itself (publishable)
|
||||
+2
-2
@@ -109,7 +109,7 @@ class ModbusRTUMonitorCoilSensor(
|
||||
# Device info (groups with climate and humidity sensor)
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, f"{coordinator.config_entry.entry_id}_{slave_id}")},
|
||||
name=f"Modbus Slave {slave_id}",
|
||||
name=f"RDZ Thermostat {slave_id}",
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
)
|
||||
@@ -165,7 +165,7 @@ class ModbusRTUMonitorZonePumpSensor(
|
||||
# Device info (groups with climate and humidity sensor)
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, f"{coordinator.config_entry.entry_id}_{slave_id}")},
|
||||
name=f"Modbus Slave {slave_id}",
|
||||
name=f"RDZ Thermostat {slave_id}",
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
)
|
||||
+67
-2
@@ -1,4 +1,4 @@
|
||||
# Modbus RTU Monitor Integration - Development Guide
|
||||
# RDZ Thermostats Monitor Integration - Development Guide
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -6,6 +6,71 @@ This integration provides **passive monitoring** of Modbus RTU communication ove
|
||||
|
||||
**Key Feature**: Non-intrusive monitoring - the integration does not initiate Modbus requests, it only observes traffic. The exception is the climate entity's setpoint write functionality.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
modbus_rtu_monitor/ # Repository root
|
||||
├── .devcontainer/
|
||||
│ └── devcontainer.json # Dev container configuration for local HA testing
|
||||
├── config/ # Home Assistant configuration for dev environment
|
||||
│ ├── configuration.yaml # Minimal HA config for development
|
||||
│ └── custom_components/ # Mount point for integration during dev
|
||||
└── custom_components/
|
||||
└── rdz_thermostats_monitor/ # Integration code
|
||||
├── __init__.py # Integration setup/unload
|
||||
├── hub.py # TCP connection and frame decoding
|
||||
├── coordinator.py # Data update coordination
|
||||
├── climate.py # Thermostat entity platform
|
||||
├── sensor.py # Humidity and register sensors
|
||||
├── binary_sensor.py # Coil and zone pump sensors
|
||||
├── config_flow.py # UI configuration flow
|
||||
├── const.py # Constants and data models
|
||||
├── manifest.json # Integration metadata
|
||||
├── strings.json # UI strings
|
||||
└── claude.md # This file
|
||||
```
|
||||
|
||||
**Note**: This file (`claude.md`) is located within the integration folder at `custom_components/rdz_thermostats_monitor/`. All file path references in this document are relative to this location unless otherwise specified.
|
||||
|
||||
## Development Environment
|
||||
|
||||
The repository includes a dev container configuration for local Home Assistant testing:
|
||||
|
||||
**Dev Container Setup** (`.devcontainer/devcontainer.json`):
|
||||
- Python 3.12 base image
|
||||
- Auto-installs Home Assistant on container creation
|
||||
- Mounts `custom_components/` into `/config/custom_components/` for live development
|
||||
- Mounts `config/` as `/config/` for HA configuration
|
||||
- Forwards port 8123 to host machine for web UI access
|
||||
- Configured for IntelliJ IDEA integration
|
||||
|
||||
**Local Development Workflow**:
|
||||
1. Open repository in IDE with dev container support (VS Code or IntelliJ IDEA)
|
||||
2. Container builds and installs Home Assistant automatically
|
||||
3. Start HA manually: `hass -c /config --debug`
|
||||
4. Edit code in `custom_components/rdz_thermostats_monitor/`
|
||||
5. Restart HA to test changes: `Ctrl+C` then rerun `hass`
|
||||
6. Access HA UI at `http://localhost:8123`
|
||||
|
||||
**Key Commands**:
|
||||
```bash
|
||||
# Start Home Assistant in debug mode
|
||||
hass -c /config --debug
|
||||
|
||||
# Check integration logs
|
||||
# Configured in config/configuration.yaml to show debug logs for custom_components
|
||||
|
||||
# Verify integration is loaded
|
||||
hass -c /config --script check_config
|
||||
```
|
||||
|
||||
**Benefits**:
|
||||
- Isolated testing environment
|
||||
- No need to install HA on host machine
|
||||
- Same environment across different development machines
|
||||
- Easy testing without affecting production HA instance
|
||||
- Live code updates (just restart HA, no rebuild)
|
||||
|
||||
## Use Case & Background
|
||||
|
||||
This integration was developed to enable remote control and monitoring of proprietary thermostats that are integrated into a complex PLC-based heat automation system via Modbus RTU.
|
||||
@@ -362,7 +427,7 @@ All entities for a slave share the same device:
|
||||
```python
|
||||
DeviceInfo(
|
||||
identifiers={(DOMAIN, f"{coordinator.config_entry.entry_id}_{slave_id}")},
|
||||
name=f"Modbus Slave {slave_id}",
|
||||
name=f"RDZ Thermostat {slave_id}",
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
)
|
||||
+2
-2
@@ -86,7 +86,7 @@ class ModbusRTUMonitorClimate(
|
||||
# Device info (groups climate + humidity sensor)
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, f"{coordinator.config_entry.entry_id}_{slave_id}")},
|
||||
name=f"Modbus Slave {slave_id}",
|
||||
name=f"RDZ Thermostat {slave_id}",
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
)
|
||||
@@ -160,7 +160,7 @@ class ModbusRTUMonitorClimate(
|
||||
|
||||
# Write to device via hub
|
||||
try:
|
||||
await self.coordinator.hub.async_write_setpoint(
|
||||
await self.coordinator.hub.async_write_setpoint_with_retry(
|
||||
self._slave_id,
|
||||
temperature,
|
||||
)
|
||||
+5
-1
@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING
|
||||
if TYPE_CHECKING:
|
||||
pass
|
||||
|
||||
DOMAIN = "modbus_rtu_monitor"
|
||||
DOMAIN = "rdz_thermostats_monitor"
|
||||
|
||||
# Default values
|
||||
DEFAULT_PORT = 502
|
||||
@@ -61,6 +61,10 @@ AVAILABILITY_TIMEOUT = timedelta(minutes=1)
|
||||
COORDINATOR_UPDATE_INTERVAL = timedelta(seconds=5) # Minimum time between coordinator updates
|
||||
FRAME_PROCESSING_DELAY = 0.1 # Seconds to sleep between frame processing batches
|
||||
|
||||
# Setpoint write retry configuration
|
||||
SETPOINT_RETRY_COUNT = 4 # Number of retries (total writes = 5)
|
||||
SETPOINT_RETRY_INTERVAL = 1.3 # Seconds between retry attempts
|
||||
|
||||
# Device info
|
||||
MANUFACTURER = "Modbus RTU"
|
||||
MODEL = "Temperature/Humidity Monitor"
|
||||
+122
@@ -27,6 +27,8 @@ from .const import (
|
||||
REGISTER_START_ADDRESS_2,
|
||||
REGISTER_START_ADDRESS_3,
|
||||
SETPOINT_REGISTER,
|
||||
SETPOINT_RETRY_COUNT,
|
||||
SETPOINT_RETRY_INTERVAL,
|
||||
TEMP_HUMIDITY_REGISTER,
|
||||
ModbusRTUFrame,
|
||||
SlaveData,
|
||||
@@ -169,6 +171,10 @@ class ModbusRTUMonitorHub:
|
||||
# Coordination lock for write operations
|
||||
self._write_lock = asyncio.Lock()
|
||||
|
||||
# Retry mechanism for setpoint writes
|
||||
self._retry_tasks: dict[int, asyncio.Task] = {} # slave_id -> retry task
|
||||
self._retry_lock = asyncio.Lock() # Protect retry task dictionary
|
||||
|
||||
# Slave discovery and state
|
||||
self.discovered_slaves: dict[int, SlaveData] = {}
|
||||
self._pending_requests: dict[int | str, dict] = {}
|
||||
@@ -738,8 +744,124 @@ class ModbusRTUMonitorHub:
|
||||
f"Unexpected error writing setpoint to slave {slave_id}"
|
||||
) from ex
|
||||
|
||||
async def async_write_setpoint_with_retry(
|
||||
self, slave_id: int, temperature: float
|
||||
) -> None:
|
||||
"""Write temperature setpoint with automatic background retries.
|
||||
|
||||
Performs immediate first write, then schedules 4 background retries
|
||||
at 0.5s intervals. If a new setpoint is requested before retries
|
||||
complete, pending retries are cancelled.
|
||||
|
||||
Args:
|
||||
slave_id: Modbus slave ID to write to
|
||||
temperature: Target temperature in °C
|
||||
|
||||
Raises:
|
||||
HomeAssistantError: If first write fails due to connection error
|
||||
"""
|
||||
# Cancel any existing retry task for this slave
|
||||
async with self._retry_lock:
|
||||
if slave_id in self._retry_tasks:
|
||||
old_task = self._retry_tasks[slave_id]
|
||||
if not old_task.done():
|
||||
_LOGGER.debug(
|
||||
"Cancelling pending retries for slave %s (new setpoint=%.1f°C)",
|
||||
slave_id,
|
||||
temperature,
|
||||
)
|
||||
old_task.cancel()
|
||||
try:
|
||||
await old_task
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
del self._retry_tasks[slave_id]
|
||||
|
||||
# Perform first write immediately (preserve current behavior)
|
||||
await self.async_write_setpoint(slave_id, temperature)
|
||||
|
||||
# Schedule background retries
|
||||
retry_task = asyncio.create_task(
|
||||
self._retry_setpoint_writes(slave_id, temperature)
|
||||
)
|
||||
|
||||
async with self._retry_lock:
|
||||
self._retry_tasks[slave_id] = retry_task
|
||||
|
||||
async def _retry_setpoint_writes(
|
||||
self, slave_id: int, temperature: float
|
||||
) -> None:
|
||||
"""Background task to retry setpoint writes.
|
||||
|
||||
Performs SETPOINT_RETRY_COUNT writes at SETPOINT_RETRY_INTERVAL
|
||||
intervals. Always retries regardless of connection/slave status.
|
||||
Errors are silently logged and retries continue.
|
||||
|
||||
Args:
|
||||
slave_id: Modbus slave ID to write to
|
||||
temperature: Target temperature in °C
|
||||
"""
|
||||
for attempt in range(1, SETPOINT_RETRY_COUNT + 1):
|
||||
try:
|
||||
# Wait for retry interval
|
||||
await asyncio.sleep(SETPOINT_RETRY_INTERVAL)
|
||||
|
||||
# Perform retry write (no connection check - let write handle errors)
|
||||
_LOGGER.debug(
|
||||
"Retry %d/%d for slave %s setpoint %.1f°C",
|
||||
attempt,
|
||||
SETPOINT_RETRY_COUNT,
|
||||
slave_id,
|
||||
temperature,
|
||||
)
|
||||
await self.async_write_setpoint(slave_id, temperature)
|
||||
|
||||
except asyncio.CancelledError:
|
||||
# New setpoint requested - stop retrying old value
|
||||
_LOGGER.debug(
|
||||
"Retries cancelled for slave %s after %d/%d attempts",
|
||||
slave_id,
|
||||
attempt - 1,
|
||||
SETPOINT_RETRY_COUNT,
|
||||
)
|
||||
raise
|
||||
except Exception as ex:
|
||||
# Connection error or other failure - log but continue retrying
|
||||
_LOGGER.debug(
|
||||
"Retry %d/%d failed for slave %s: %s",
|
||||
attempt,
|
||||
SETPOINT_RETRY_COUNT,
|
||||
slave_id,
|
||||
ex,
|
||||
)
|
||||
continue
|
||||
|
||||
# All retries completed
|
||||
_LOGGER.debug(
|
||||
"Completed all %d retries for slave %s setpoint %.1f°C",
|
||||
SETPOINT_RETRY_COUNT,
|
||||
slave_id,
|
||||
temperature,
|
||||
)
|
||||
|
||||
# Remove from tracking dict
|
||||
async with self._retry_lock:
|
||||
if slave_id in self._retry_tasks:
|
||||
del self._retry_tasks[slave_id]
|
||||
|
||||
async def async_close(self) -> None:
|
||||
"""Close hub and cleanup resources."""
|
||||
# Cancel all pending retry tasks
|
||||
async with self._retry_lock:
|
||||
for slave_id, task in list(self._retry_tasks.items()):
|
||||
if not task.done():
|
||||
task.cancel()
|
||||
try:
|
||||
await task
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
self._retry_tasks.clear()
|
||||
|
||||
if self._monitor_task:
|
||||
self._monitor_task.cancel()
|
||||
try:
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"domain": "modbus_rtu_monitor",
|
||||
"name": "Modbus RTU Monitor",
|
||||
"domain": "rdz_thermostats_monitor",
|
||||
"name": "RDZ Thermostats Monitor",
|
||||
"codeowners": ["@constantin"],
|
||||
"config_flow": true,
|
||||
"documentation": "https://github.com/constantin/modbus_rtu_monitor",
|
||||
+2
-2
@@ -175,7 +175,7 @@ class ModbusRTUMonitorHumiditySensor(
|
||||
# Same device as climate entity
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, f"{coordinator.config_entry.entry_id}_{slave_id}")},
|
||||
name=f"Modbus Slave {slave_id}",
|
||||
name=f"RDZ Thermostat {slave_id}",
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
)
|
||||
@@ -227,7 +227,7 @@ class ModbusRTUMonitorRegisterSensor(
|
||||
# Same device as climate and humidity entities
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, f"{coordinator.config_entry.entry_id}_{slave_id}")},
|
||||
name=f"Modbus Slave {slave_id}",
|
||||
name=f"RDZ Thermostat {slave_id}",
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
)
|
||||
Reference in New Issue
Block a user