jemma.osgi.dal.web-apis: How to get data of all properties of all devices?

15 views
Skip to first unread message

Nhat Nguyen

unread,
May 3, 2017, 5:59:53 AM5/3/17
to JEMMA General Mailing List
Hi JEMMA team,

As my understanding is that subscribing to events using websockets is to receive the changed values of subscribed events. However, I need to have all data of properties of all devices at the first time when the device list is being fetched. So based on these data I can show the status of each device.

For example, "DoorLock" has 2 statuses "OPEN", and "CLOSED". If its status is "OPEN", the switch button will be ON; and if it's "CLOSED", the button is OFF. Unfortunately, I have reviewed the ReadMe doc, I found no information that can help me to get over this obstacle.


It would be appreciated, if anyone can help me on this please?

Thanks & regards,
Nhat-

Riccardo Tomasi

unread,
May 7, 2017, 5:46:24 AM5/7/17
to jemma-...@googlegroups.com

Dear Nhat,

In general the pattern you described is correct: we always first fetch the status of the device of interest via the REST - then subscribe via websocket to get further updates.

I'm not sure I fully understand your obstacle though: could you please clarify ?

Riccardo

--
JEMMA - Java Energy ManageMent Application framework - http://jemma.energy-home.org
---
You received this message because you are subscribed to the Google Groups "JEMMA General Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jemma-genera...@googlegroups.com.
To post to this group, send email to jemma-...@googlegroups.com.
Visit this group at https://groups.google.com/group/jemma-general.
To view this discussion on the web visit https://groups.google.com/d/msgid/jemma-general/a7509111-8a96-43d4-a023-587f8d1edca0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Riccardo

Nhat Nguyen

unread,
May 7, 2017, 8:56:12 AM5/7/17
to JEMMA General Mailing List, riccard...@ismb.it
Dear Riccardo, 

Could you give me an example of fetching property of one device via the REST please?

For example, in the fake devices demo, there is a device with following details:

dal.function.device.UIDdal.function.UIDdal.function.operation.namesdal.function.property.names
ZigBee:ah.app.12345195726903800-1ZigBee:ah.app.12345195726903800-1:DoorLockopen,closestatus

At the beginning, I'd like to get the "status" of "ZigBee:ah.app.12345195726903800-1:DoorLock", how could I do that? In the readme file on the github, I didn't see the instruction of how to get the data of properties except via WebSockets.

Thanks & regards,
Nhat


Reply all
Reply to author
Forward
0 new messages