Comments (16)
However, the read command
point.read()
stopped working and is always returningFalse
. In Wireshark, I noticed that the read command (C_RD_NA_1) was sent, and a valid response from my slave device was also sent, but thepoint.read()
command still returnsFalse
.
A pushed a fix into the feature branch.
About this, the branch fix-test is up to date with main. Are there any commits left to push in your local repository?
Oh sorry, i pushed the missing commit.
from iec104-python.
Just letting you know, it seems that the automatic documentation from Sphinx has stopped working. The C++ Core section is okay, but the c104 Python module has no documentation on classes, methods, properties, and enums.
This is the c104 python module section (everthing is like that):
Is everything ok with the documentation?
from iec104-python.
release 1.17.1 is there
from iec104-python.
Thank you for the detailed report.
I can confirm that iec104-python is not sending commands with the select flag.
I will prepare a fix.
from iec104-python.
From my understanding, this should be an optional feature depending in the desired operation mode (direct vs. select and execute). Is this correct?
from iec104-python.
From my understanding, this should be an optional feature depending in the desired operation mode (direct vs. select and execute). Is this correct?
Hello Lennart Bader, thank you for the comment.
Based on my knowledge of the protocol, IEC60870-5-104, commands (whether Single or Double Commands) and set-points always have the field for Select/Execute. There is no such thing as "Directly."
from iec104-python.
For command transmission, IEC104 specifies two standard procedures according to this technical report (page 22):
- "Direct command": Control operations are immediately executed (The "execute" flag is set for the first command, as currently implemented)
- "Select and execute command": Two step command, where first the "select" flag is set, the operation is checked by remote station (but not yet executed) and then acknowledged (or not acknowledged) to the client. The client can then send the same command with the "execute" flag to actually instruct the remote station to execute the command
So just sending the "execute" flag is still according to standard, and I guess the "select & execute" mode is missing.
from iec104-python.
For command transmission, IEC104 specifies two standard procedures according to this technical report (page 22):
- "Direct command": Control operations are immediately executed (The "execute" flag is set for the first command, as currently implemented)
- "Select and execute command": Two step command, where first the "select" flag is set, the operation is checked by remote station (but not yet executed) and then acknowledged (or not acknowledged) to the client. The client can then send the same command with the "execute" flag to actually instruct the remote station to execute the command
So just sending the "execute" flag is still according to standard, and I guess the "select & execute" mode is missing.
You are correct. Based on this document and the IEC60870-5-101 standard (chapter 7.4.7), there is indeed a direct command mode that simply sends the execute flag. I apologize for my earlier misconception.
from iec104-python.
I'm working on a fix from a fork as well. I noticed that when running the test.py file located in "tests," the following exception occurs.
------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\...\iec104-python\tests\test.py", line 345, in <module>
if sv_step_point.read():
ValueError: Cannot send read commands as server
Is the test suite broken, or is this an expected behavior?
from iec104-python.
There is a typo, yes, please see branch fix-test, I will merge it soon.
Here is a suggestion for the command mode feature:
#3
# new property: point.command_mode
# new enum: c104.CommandMode
single_command = station.add_point(io_address=16, type=c104.Type.C_SC_NA_1, command_mode=c104.CommandMode.SELECT_AND_EXECUTE)
from iec104-python.
Can you verify that this will fix the issue?
pip install git+https://github.com/Fraunhofer-FIT-DIEN/iec104-python.git@feature-command-mode
from iec104-python.
Can you verify that this will fix the issue? pip install git+https://github.com/Fraunhofer-FIT-DIEN/iec104-python.git@feature-command-mode
I tested this new version using the SELECT_EXECUTE flag. I tested it for the following commands: C_SC_NA_1, C_DC_NA_1, C_SE_NB_1, and C_SE_NC_1. All of them worked correctly.
However, the read command point.read()
stopped working and is always returning False
. In Wireshark, I noticed that the read command (C_RD_NA_1) was sent, and a valid response from my slave device was also sent, but the point.read()
command still returns False
.
Below is the Wireshark screenshot showing the C_RD_NA_1 command sent and the M_ME_NB_1 response being sent by the slave to the client.
There is a typo, yes, please see branch fix-test, I will merge it soon.
About this, the branch fix-test is up to date with main. Are there any commits left to push in your local repository?
from iec104-python.
It seems everything is fine now. I tested the write commands using the SELECT_EXECUTE flag and the read commands for M_SP_NA_1, M_DP_NA_1, M_ME_NB_1, and M_ME_NC_1. Everything I tested worked correctly.
I will be waiting for the merge and a formal release in PyPI. Thank you very much for your assistance.
from iec104-python.
The update was released to PyPI
from iec104-python.
I also noted that the C_SE_NA_1 commands were not fixed with the SELECT_AND_EXECUTE command mode. I opened a pull request with the correction. Just a simple fix :)
from iec104-python.
thanks I merged your contribution!
I will create a 1.17.1 once the documentation generation is fixed..
from iec104-python.
Related Issues (19)
- Unable to install c104 package HOT 4
- Wheel problem HOT 17
- Short pulse, Long Pulse and Persistent command not implemented HOT 4
- Sending timestamps not in UTC HOT 5
- server on_receive callback: message.raw cannot be accessed HOT 4
- Implementation of Event Driven COT's send from 104 Server HOT 5
- Python Script stops when the client is stopped without a connection HOT 11
- Feature Request: Support for Transmitting Single Event of Protection Messages
- Setting the quality value at the default Point HOT 2
- c104 Type does not match with client request HOT 6
- Simple client example with AttributeError HOT 2
- Fatal error: terminate called after throwing an instance of 'std::bad_weak_ptr' HOT 6
- Invalid information object address 0 HOT 10
- Error on raspbian ARMv7 HOT 6
- iec104-python documentation site not working properly HOT 3
- TLS Connection Handshake failes HOT 3
- Keep Client Open HOT 1
- timeout on transmit HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iec104-python.