Problem switching Kamstrup Contactors

Avatar

sdg.marinusvz
2024-08-29 16:09

This thread was transcribed from a support call


On my one server 'Attempt Switch on failed: ReleaseOrder failed: 400' returns immediately, it doesn't even try to switch.

Avatar

sdg.marinusvz
2024-08-29 16:12

So how it works is we put in an order (to the Kamstrup server, via http), and then we return, and you see the message that it is an attempt. And then if you do the same switch again (off or on AGAIN, like the first time), then we see there is an order and we get the result and return it. So it looks to you as if it comes back immediately, but actually it's just that we check how the order is doing and because the order has returned on the kamstrup server, we immediately give the message that the server gives us (failed)

What we normally do, is wait up to a minute and get the status of the order repeatedly and see if it finishes. If not, we return and say we have waited for the order to complete and timed out. But in the background, the order is still in the Kamstrup server. When you switch it to the same state again, we will not create a new order, but check on the status of the old order, until it finishes, whether that is successfully or with some error message.


Avatar

sdg.marinusvz
2024-08-29 16:12
Last Edited 2024-08-29 16:13

Switch breaker orders doesn't show on the appropriate screen for Tools->View Kamstrup Meter orders

Avatar

sdg.marinusvz
2024-08-29 16:27

Ok, the reason for that was found.


The 400 error code you got in the beginnig was HTTP error 400: Bad Request Error

This was because it had stuff in the switch request that the Kamstrup server rejected.
'The element 'DirectLoadOnOffCommand' has invalid child element 'Priority'. List of possible elements expected: 'State''

However, even when I exclude Priority, it still fails with error code 400 but message: 'Order could not validate against one or more meter profiles. The following commands are either not supported or has an unsupported action or version: DirectLoadOnOffCommand'

Seems like this meter does not physically have a relay?

do you really want to switch the relay, and not the meter contactor?

how did you load the Contactor entities onto the pnpscada server?

Avatar

sdg.marinusvz
2024-08-29 16:31

No, the intention was to add them onto the meter's inline contactor, not a separate relay.

I used a Bulk add, from a spreadsheet, e.g.
 advar_classp25_num  p25_num0:$eid{cid:214;key1::} Name
 128 1 26726347 ITL 01
 128 1 26726348 ITL 02


Avatar

sdg.marinusvz
2024-08-29 16:33

Right. So because there are 2 possible Digital Outputs on a Kamstrup meter and your bulk upload does not specify which one to choose, it defaulted to the first row of a select statement. However, the select statement was not ordered, so it didn't choose the inline contactor like it should have, but the relay.


I have fixed the code and updated your server. Please try re-creating the Contactors with a Bulk Add again.

Avatar

sdg.marinusvz
2024-08-29 16:36

I put the new breaker on 26726747.


Now I get the timeout problem

Kamstrup server still busy and then pnpscada times out?

Avatar

sdg.marinusvz
2024-08-29 16:36

No but remember, check the order on the Kamstrup server


Avatar

sdg.marinusvz
2024-08-29 16:37

<MeterResults ref='http://xx.xx.xx.x0/utilidriver/api/orders/Ve7H7MEhCkyMPLHbAOIMvQ/executions/Uk8fFzcjH0GSyANMXO1wSQ/completed/' total='0' count='0'/>

<Status ref='http://xx.xx.xx.x0/utilidriver/api/orders/Ve7H7MEhCkyMPLHbAOIMvQ/executions/Uk8fFzcjH0GSyANMXO1wSQ/status/'>
<SucceededCommandCount>0</SucceededCommandCount>
<WaitingCommandCount>1</WaitingCommandCount>
<FailedCommandCount>0</FailedCommandCount>
<NotSupportedCommandCount>0</NotSupportedCommandCount>
<WaitingMeterCount>1</WaitingMeterCount>
<CompletedMeterCount>0</CompletedMeterCount>
<AbortedCommandCount>0</AbortedCommandCount>
</Status>

Avatar

sdg.marinusvz
2024-08-29 16:37

waiting? then it is still busy?

Avatar

sdg.marinusvz
2024-08-29 16:38

Correct.


But pnpcada times out.

Avatar

sdg.marinusvz
2024-08-29 16:40

No, it doesn't just time out. It says specifically in the timeout message that he is waiting for the order to complete, and it didn't complete, so he returns.


because the order on the Kamstrup server has not completed yet.

If you try to switch it AGAIN, then it will first check the existing order AGAIN
We won't create a new order until the first one finishes.

Avatar

sdg.marinusvz
2024-08-29 16:42

Yes, pnpscada times out after 60 seconds


Doesn't look so, it creates a new order. I can see it under Tools->View Kamstrup Meter orders
Yes, I do see orders for the breaker, but it creates a new one every time I switch?

Avatar

sdg.marinusvz
2024-08-29 16:42
Last Edited 2024-08-29 16:43

That is because you tried to switch it to the opposite value.


Switch it to the SAME value! Don't flip flop between on and off. E.g. Switch it on multiple times until it finishes. It will check the same order again every time your switch to the same value.

Avatar

sdg.marinusvz
2024-08-29 16:44

Ah ok


Order stays the same yes

Ok great, thanks

Please log in to post a comment