esphome / esphome/feature-requests
modbus: Custom command without CRC
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
I am using a non-modbus RS485 device which has a custom protocol. I would like te reuse the existing modbus integration but with the payload exactly as provided, and parsing the data using a lambda function.
Since disable_crc already exists for receiving messages (ignore_crc would have been a better description) having the ability not to append it does not seam to far fetched. https://github.com/esphome/esphome/blob/dev/esphome/components/modbus/modbus.cpp#L212
**Please describe your use case for this integration and alternatives you've tried:**
Reimplementing this device using the UART interface seems to be too 'low-level', I would like to have the flow control and message handling from the existing modbus controller code.
An another alternative would be to actually implement this protocol for this range of devices. It works in a similar way as modbus.
**Additional context**
The device I am trying to interface with is a Depolox RESIDUAL ANALYZER.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the existing CRC handling in esphome/components/modbus/modbus.cpp around line 212, including how disable_crc affects received messages. Compare that flow with the requested custom command and UART alternative. Done means the existing Modbus flow can send an unchanged payload and expose response parsing through a lambda without appending CRC.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100