Skip to content

ModbusServerContext hardcoded value of 0xF7 used for __delitem__ func #2647

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

Closed
sush2023 opened this issue Apr 22, 2025 · 4 comments
Closed

Comments

@sush2023
Copy link

sush2023 commented Apr 22, 2025

Currently using version 3.8.0, same behavior for version ~3.9

The delitem func ensures the slave parameter is between 0xF7 and 0 before deleting the key/node. While I am able to have a slave at an address higher with proper functionality, deleting is not working due to that code throwing an exception.

Line of interest:

if not self.single and (0xF7 >= device_id >= 0x00):

could this be configurable? This is technically supposed to be outside of the boundaries but these are also considered "reserved" and therefore usable. Thanks

@janiversen
Copy link
Collaborator

pull requests are welcome.

however I am not sure why you would first add a device and then later delete it. If you delete a device in a running in a running server you will sooner or later have a server breakdown.

@sush2023
Copy link
Author

sush2023 commented Apr 24, 2025

Ideally it would be best to be able to have the device not respond at a certain address temporarily. Removing seemed to be the most plausible option.

@janiversen
Copy link
Collaborator

not responding temporarily is easier done with the trace functions or with the simulator, it is not part of the data definition

@janiversen
Copy link
Collaborator

Closing as this is not a pymodbus bug.

@janiversen janiversen closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2025
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

No branches or pull requests

2 participants