Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

Close
Important Announcement: WELCOME to the new Schneider Electric Community! Community is now no longer part of Exchange, and is now rebranded under se.com. If you have any bookmarks and links saved, we request you to update them to ensure that you continue accessing our community from this new location. For any issues that you might encounter as part of this change, please reach out to SchneiderCommunity.Support@se.com, and the team will help to get your issues resolved.
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
82508members
350112posts

Smart Connector and SBO Alarms

SmartConnector Forum

Discussion of SmartConnector applications for integration of various other building management systems (BMS) into EcoStruxure Building Operation

esari
Lieutenant JG Lieutenant JG
Lieutenant JG
0 Likes
16
1143

Smart Connector and SBO Alarms

Hello

 

 

Is there function in Smart Connector REST api where customer could get all alarms which were activated in one day? So that customer could query daily bases all alarm events from yesterday which were changed state from normal state to alarm state?

 

 

--

Esa

Tags (1)
16 Replies 16
mike_meirovitz
Commander
Commander
0 Likes
0
1138

Re: Smart Connector and SBO Alarms

Hi Esa,

 

If you use UCME-SmartConnector (https://shop.exchange.se.com/en-US/apps/40331/ucme-smartconnector), you can receive all alarms to your cellphone via Whats-app or SMS. 

Then you can see all alarms that were received during the last day.

 

I hope it helps.

 

Regards,

 

Michael 

Tags (1)
ardak
Commander Commander
Commander
8
1136

Re: Smart Connector and SBO Alarms

Hi Esa, 

 

Yes!

 

You can use the GET /AlarmEvents endpoint and supply the following query parameters, depending on what you need.  

 

alarmsendpoint.png

 

BR

Armend

Tags (1)
esari
Lieutenant JG Lieutenant JG
Lieutenant JG
0 Likes
7
1131

Re: Smart Connector and SBO Alarms

Hello Ardak

 

 

I would like to get all yesterday normail -> active alarms.

 

What parameter do i need to use?

 

--

Esa

Tags (1)
ardak
Commander Commander
Commander
6
1128

Re: Smart Connector and SBO Alarms

Hi,

 

I'd probably use the transitionedOnOrAfter and transitionedBefore parameters, but that can vary on your use case.

 

If you check transitions instead of occurrence you get all transitions, i.e.

Acknowledged -> Alarm

Reset -> Alarm 

Normal -> Alarm

 

Basically any alarm that has gone from an "ok" state to "active", which usually makes sense to the end customer.

 

If you only want new alarms, use originallyAlarmedOnOrAfter and originallyAlarmedBefore

 

Hope this makes sense,

Armend

Tags (1)
esari
Lieutenant JG Lieutenant JG
Lieutenant JG
0 Likes
5
1116

Re: Smart Connector and SBO Alarms

Hello

 

 

Some reason i will se also return events example 'alarm -> normal'. I would like to filter them.

 

--

Esa

Tags (1)
ardak
Commander Commander
Commander
0 Likes
4
1114

Re: Smart Connector and SBO Alarms

Hi,

 

You can set the state parameter to active for this.

 

The Swagger UI is very helpful for exploring the REST API, feel free to check it out!

 

BR

Armend

Tags (1)
esari
Lieutenant JG Lieutenant JG
Lieutenant JG
0 Likes
3
1111

Re: Smart Connector and SBO Alarms

Hello

 

I try state active, but most of the alarm were filtered.

 

I try to get all alarm events from one point. Some reason I will see only last alarm which is alarm -> normal. How could I get yesterday alarms from that point ?

 

--

Esa

Tags (1)
ardak
Commander Commander
Commander
0 Likes
2
1108

Re: Smart Connector and SBO Alarms

Hi,

 

That would be unwanted behaviour, what is your Smartconnector/EBO version, and could you supply screenshots of an example of the case you are describing?

 

For example Alarm transitions for the alarm in the event log in EBO, the request you are sending, and the response from the Smartconnector REST gateway.

 

BR

Armend

Tags (1)
esari
Lieutenant JG Lieutenant JG
Lieutenant JG
0 Likes
1
1104

Re: Smart Connector and SBO Alarms

Hello

 

I have Smart Connector version is 2.4.38. Backend protocol is EWS.

 

From AlarmEvents I will only get latest alarm when I query from one alarm id. Workstation shows more that one alarm.

 

Curl

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer xxxxxxxxxxxxxxxx' 'https://xxxxxxxxxxxxxxxxxx/AlarmEvents?alarmId=02%2FAmmattiopisto_Spesia_Einola_AS01%2FSulanapito%2FSUL01%2FH%C3%A4lytykset%2FSUL01_H'

Request URL

https://xxxxxxxxxxxxxxxx/AlarmEvents?alarmId=02%2FAmmattiopisto_Spesia_Einola_AS01%2FSulanapito%2FSUL01%2FH%C3%A4lytykset%2FSUL01_H

Response Body

[
  {
    "AlarmId": "02/Ammattiopisto_Spesia_Einola_AS01/Sulanapito/SUL01/Hälytykset/SUL01_H",
    "Acknowledgeable": 1,
    "OccurredOn": "2022-01-15T14:03:42Z",
    "LastTransitionedOn": "2022-01-17T04:33:38Z",
    "Message": "Sulatuksen ohjaus ristiriita, hälytys poistunut",
    "Priority": 2,
    "State": 3,
    "Type": "",
    "AlarmSourceName": "SUL01_H",
    "Id": "/Ammattiopisto_Spesia_Einola_AS01|/Ammattiopisto_Spesia_Einola_AS01/Sulanapito/SUL01/Hälytykset/SUL01_H|8f3fdea4-08a0-4a3a-9b30-c1756a1b013a"
  }
]

Response Code

200

 

Attachments
Tags (1)
ardak
Commander Commander
Commander
0 Likes
0
1099

Re: Smart Connector and SBO Alarms

Interesting!

 

I will contact you so privately so we can take a closer look.

 

BR

Armend

Tags (1)
ardak
Commander Commander
Commander
0 Likes
2
1092

Re: Smart Connector and SBO Alarms

After further investigation it seems like I was off in my first assessment.

 

The EWS GetAlarmEvents only gets the latest AlarmEvent for the AlarmItem, so no historical AlarmEvents will be included.

 

This translates to the SmartConnector REST Gateway reponse aswell, with one exception: if there are cached(by the SmartConnector cache) "historical" AlarmEvents for an AlarmItem, they will also be included in the response. This may be changed in the future.

 

BR

Armend

Tags (1)
JessieSu
Lieutenant JG Lieutenant JG
Lieutenant JG
0 Likes
1
1089

Re: Smart Connector and SBO Alarms

Hello,

 

Can we get EBO event information via SmartConnector REST Gateway? Like log on or log off information. Thanks!

 

BRs

Jessie

Tags (1)
ardak
Commander Commander
Commander
0 Likes
0
855

Re: Smart Connector and SBO Alarms

Hi,

 

AFAIK, EBO does not support this.

 

BR

Armend

Tags (1)
SteveGregory
Commander Commander
Commander
0 Likes
2
771

Re: Smart Connector and SBO Alarms

That sounds like a job/query for the (unfortunately retired) web reports server. I'm sure you can do the same from the Postgresql db.

Tags (1)
Erwin-vd-Zwart
Admiral Admiral
Admiral

Re: Smart Connector and SBO Alarms

Correct (:

 

You can get it via these query's from the PostgreSQL DB (when events are enabled)

 

Get ID for 'User logged on'

SELECT * FROM public.enumerations WHERE enumtext = 'User logged on' -> Result = 2

 

Get ID for 'User logged off'

SELECT * FROM public.enumerations WHERE enumtext = 'User logged off' -> Result = 3

 

Get all data from logged on users

SELECT * FROM public.event_data WHERE systemeventid = 2 ORDER BY timestamp DESC;

 

Get all data from logged off users

SELECT * FROM public.event_data WHERE systemeventid = 3 ORDER BY timestamp DESC;

 

There also excist a small service called PostgREST (https://postgrest.org/) that enables a API on the PostgreSQL DB so you can get them with a REST request out of the DB

 

Tags (1)
ardak
Commander Commander
Commander
0 Likes
0
748

Re: Smart Connector and SBO Alarms

This is the way to go!

 

Unfortunately, EBO doesn't expose this through EWS, so going trough the REST Gateway is not possible.

 

--Armend

Tags (1)