SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
Hi Esa,
Yes!
You can use the GET /AlarmEvents endpoint and supply the following query parameters, depending on what you need.
BR
Armend
Link copied. Please paste this link to share this article on your social media post.
Hello Ardak
I would like to get all yesterday normail -> active alarms.
What parameter do i need to use?
--
Esa
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
Hello
Some reason i will se also return events example 'alarm -> normal'. I would like to filter them.
--
Esa
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
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 -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'
https://xxxxxxxxxxxxxxxx/AlarmEvents?alarmId=02%2FAmmattiopisto_Spesia_Einola_AS01%2FSulanapito%2FSUL01%2FH%C3%A4lytykset%2FSUL01_H
[
{
"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"
}
]
200
Link copied. Please paste this link to share this article on your social media post.
Interesting!
I will contact you so privately so we can take a closer look.
BR
Armend
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
Hello,
Can we get EBO event information via SmartConnector REST Gateway? Like log on or log off information. Thanks!
BRs
Jessie
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
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.
Link copied. Please paste this link to share this article on your social media post.
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
Link copied. Please paste this link to share this article on your social media post.
This is the way to go!
Unfortunately, EBO doesn't expose this through EWS, so going trough the REST Gateway is not possible.
--Armend
Link copied. Please paste this link to share this article on your social media post.
i will se also return events example 'alarm -> normal'. I would like to filter them. tea tv apk
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.