FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
01-11-2023 03:35 PM
Hi,
Maybe the development team already fixed described issues in current release (I tested on DriveConnect app V1.16 and ctrlX Core V1.18) but let me post below problems I noticed:
Issue 1)
When someone wants to add to DriveConnect app drives from other subnets and the drive which you add is not pingable (or is not a drive or you just entered wrong IP address) the app probably hangs and the whole DL subtree devices/drives is gone for some minutes
A. Image: Before adding the drive from other subnet. In my config there is one drive (IP: 192.168.99.99) and the ctrlX core is under 192.169.99.202
B. Image: now we add a drive (e.g. 172.16.5.1 routing established, IP from existing subnet in my config) using REST API call (according to https://docs.automation.boschrexroth.com/doc/3679523030/drive-connect-app/latest/en/)
The drive is visible in the DL subtree devices/drives
C. Image: now we add a fake drive (e.g. 192.168.168.1 no routing, IP from non existing subnet in my config) using REST API call (according to https://docs.automation.boschrexroth.com/doc/3679523030/drive-connect-app/latest/en/)
D. After a couple of minutes the drives in a DL subtree are back but… see issue 2)
Issue 2)
It happens that drives from the same subnet as ctrlX are not visible under DL devices/drives subtree. Adding such drive with the REST API call is not fixing the issue (still not visible). Funny thing is that disabling and enabling the app (snap) is not solving the issue. Physical reboot of ctrlX core is necessary ☹ and the DL subtree devices/drives shows back the drives from the same subnet.
The idea: What do you think about such solution: The drive connect app is not automatically searching and creating the DL subtree for drives from the same subnet (BTW: do we have any solution to limit drives to monitor if we have e.g. more than 20 devices in the same subnet as ctrlX core?). I also understand that just showing the drive in a subtree without a DL node subscription is not utilizing the CPU of the ctrlX or is actually ?
In this case maybe a better solution would be to show the drives in a DL subtree devices/drives BUT after official registration via REST API or in future after selection via GUI even if they are from the same subnet as ctrlX core?
Issue 3)
This bug is rather connected to ctrlX CORE - Data Layer API V 2.1.0 in part of SSE subscriptions (I use V1.18 of ctrlX core) :
I created an SSE subscription with the ID = sample_sse_id using REST API e.g. to collect only updates of some parameter from drives. Problem is that on a later stage when I want to makes changes to this subscription or just reference to it in my scripts this ID is not the right one.
Example:
A. Let’s use a REST API POST method to create an SSE subscription with "id" = sample_sse_id to collect some parameter from the drive - in this case the specific nodes in DL are created by DriveConnect App
Payload JSON
{
"properties": {
"keepaliveInterval":1000,
"id":"sample_sse_id",
"publishInterval":1000,
"errorInterval":2000
},
"nodes": [
"devices/drives/7260415273125/axis-1/parameters/P-0-0190.0.0/data"
]
}
We got answer like this:
So the subscription is created
B. Now we need an SSE client (I made one config using node-red) to subscribe to the event using above given "location" string.
As you see below the updates of the drive parameter P-0-0190 are delivered using the SSE client. So the config is OK we can use it in our applications BUT….
C. Now you would like to reference my subscription – the ID of it was: “sample_sse_id” – using e.g. REST API calls
D. OK, so let’s try the first one GET method for getting info about our subscription
We got an error: DL_INVALID_ADDRESS but it same time gives a hint where too look for:
Response body:
{
"type": "about:blank",
"title": "DL_INVALID_ADDRESS",
"status": 404,
"detail": "original error: DL_INVALID_ADDRESS",
"instance": "datalayer/subscriptions/clients/client-00045cc4a5/subscriptions/sample_sse_id",
"severity": "Error"
}
E. So let’s see the DL in this subtree:
There is no subscription with the ID=”simple_sse_id”
F. My specific subscription got some random ID: webSSE-1255
G. I have to use this specific random ID (which I do not know at all when using REST methods) to get the details of the subscription via REST API, please see:
To summarize this specific 3 issue:
There is a change requested for the REST API call for SSE subscriptions in handling of the id of the subscription:
When calling the POST method for SSE events creation
1. Currently required json needs "id" of the subscription e.g.
{
"properties": {
"keepaliveInterval":1000,
"id":"sample_sse_id",
"publishInterval":1000,
"errorInterval":2000
},
"nodes":[
"devices/drives/7260415273125/axis-1/parameters/P-0-0190.0.0/data"
]
}
2. But this required "id" from json is not used as a real id of the subscription but as part of the connection link to the event stream for the SSE client stroed under attribute "location".
In our case attribute "location" (from REST call) which you get as a response of proper subscription creation:
/automation/api/v2/events/sample_sse_id
3. In fact the SSE subscription is created for the client but under different "id" and can be used by the sse client but to reference your subscription in REST API calls you have to use internally created unknown id – if you use the id originally provided during subscription creation you will get an error.
4. I would ask you to reconsider a possible chnage change to current json structure for the rest call (POST SSE event creation):
For POST invoking payload
Response JSON should provide
5. If you will work on next releases in the SSE stream functionality I would see following ideas worth to consider:
Many thanks and I hope it will not be many TLDR situations as to explain and show the examples requires some words.
All the best 😁
Kookoolinoo
Solved! Go to Solution.
01-11-2023 03:50 PM
Hi Kookoolinoo,
thanks for the detailed feedback, we will have a look into it.
Regards
01-12-2023 10:44 AM
Having the same issue as described in 2.)
Also, often during operation Drives "get lost" and then reappear.
01-16-2023 01:35 PM
Hello Kookoolinoo,
I also thank you for the detailed description of your journey. I forwarded it to our development team and got the feedback that they already work on these topics and want to publish an improved version v1.18.