Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modbus bridge write #16351

Merged
merged 15 commits into from
Aug 27, 2022
Merged

Modbus bridge write #16351

merged 15 commits into from
Aug 27, 2022

Conversation

jeroenst
Copy link
Contributor

@jeroenst jeroenst commented Aug 27, 2022

Description:

Related issue (if applicable): fixes issues in #9586

I have done a lot of work to finish the modbus writing.

I have tested all function codes for the modbus send cmd and the modbustcp connection.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.4.1 N/A
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

Results of automated testing via ModbusTCP:

Testing function code 1
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x01 0x00 0x90 0x00 0x16 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x01 0x03 0x00 0x01 0x02    => OK!

Testing function code 2
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x02 0x00 0x90 0x00 0x16 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x02 0x03 0x00 0x01 0x02    => OK!

Testing function code 3
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x03 0x00 0x90 0x00 0x02 
RX: 0x00 0x01 0x00 0x00 0x00 0x07 0xf7 0x03 0x04 0x00 0x00 0x00 0x01    => OK!

Testing function code 4
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x04 0x00 0x90 0x00 0x02 
RX: 0x00 0x01 0x00 0x00 0x00 0x07 0xf7 0x04 0x04 0x00 0x00 0x00 0x01    => OK!

Testing function code 5 ON
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x05 0x00 0x90 0xff 0x00 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x05 0x00 0x90 0xff 0x00    => OK!

Testing function code 5 OFF
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xff 0x05 0x00 0x90 0x00 0x00 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xff 0x05 0x00 0x90 0x00 0x00    => OK!

Testing function code 6
TX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x06 0x00 0x90 0x00 0x01 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x06 0x00 0x90 0x00 0x01    => OK!

Testing function code 15
TX: 0x00 0x01 0x00 0x00 0x00 0x09 0xf7 0x10 0x00 0x90 0x00 0x15 0x02 0x06 0xc4 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x10 0x00 0x90 0x00 0x15    => OK!

Testing function code 16
TX: 0x00 0x01 0x00 0x00 0x00 0x09 0xf7 0x10 0x00 0x90 0x00 0x01 0x02 0x06 0xc4 
RX: 0x00 0x01 0x00 0x00 0x00 0x06 0xf7 0x10 0x00 0x90 0x00 0x01    => OK!

@arendst arendst merged commit 906d725 into arendst:development Aug 27, 2022
@arendst
Copy link
Owner

arendst commented Aug 27, 2022

Thx.

arendst added a commit that referenced this pull request Aug 27, 2022
TasmotaModbus library from v3.5.0 to v3.6.0 (#16351)
@jeroenst
Copy link
Contributor Author

jeroenst commented Aug 27, 2022

My pleasure, it was a lot of work, more than I expected.

I thought all the commit messages would be squashed during merge, next time I will squash the merge request first.

@jeroenst jeroenst deleted the ModbusBridgeWrite branch August 27, 2022 09:41
@henfri
Copy link

henfri commented Sep 2, 2022

Hello,

thanks for this development!
Does this allow to read Modbus-TCP and write Modbus-RTU (and vice versa)?
Where do I find documentation?

Best regards,
Hendrik

@Tom-Bom-badil
Copy link

Hi Hendrik,

AFAIK the questioned functionality was part of another recent project. Not sure if they finished.

/tom

@henfri
Copy link

henfri commented Sep 2, 2022

Thanks!

@jeroenst
Copy link
Contributor Author

jeroenst commented Sep 2, 2022

Code is finished but on beta status.

Here you can find the documentation:

https://tasmota.github.io/docs/Modbus-Bridge/

@nikito7
Copy link

nikito7 commented Oct 18, 2022

This works like TCP_BRIDGE?

Tcp_bridge is RTUoverTCP

@isaacncz
Copy link

Code is finished but on beta status.

Here you can find the documentation:

https://tasmota.github.io/docs/Modbus-Bridge/

hi, i would like to request for stating the version of Tasmota supported in the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants