Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy Attributes #193

Closed
caiothomas opened this issue Jan 3, 2017 · 7 comments
Closed

Lazy Attributes #193

caiothomas opened this issue Jan 3, 2017 · 7 comments

Comments

@caiothomas
Copy link

Hello, I'm having doubts about the functionality of lazy attributes.
When I register a device the lazy attribute is not record in Orion. When doing a query in Orion this should make a request in the IoT Agent that will return the value of the attribute that was filled, is it correct?
In another test I registered the device entity before Orion. Whenever I perform an update on the lazy attribute, the Iot Agent updates in Orion, is it correct?

Best Regards,
Caio Thomas Oliveira

@dmoranj
Copy link
Contributor

dmoranj commented Jan 10, 2017

Hi Caio,

I don't know if I understand you correctly. Do you mean that if you create the entity in Orion before registering the device updating the device in Orion does not trigger the update in the IoTA?

You should be aware that Lazy attributes and Commands are not registered as NGSI attributes in Orion, but they are declared as provided by a Context Provider instead. This means that a query to the attribute will be redirected to the IoTA to get the answer instead of reading it from Orion's database.

If you clarify your scenario I will try to give you further help.

@caiothomas
Copy link
Author

Hello Daniel,
From what I understand about the scenario, Orion must make a QueryContext request on the IoT Agent. However, when I make the QueryContext request in IoTAgent, it does not work correctly. I think the problem might be on the IoT Agent.

In another test I registered the device entity before Orion. Whenever I perform an update on the lazy attribute, the Iot Agent updates in Orion, is it correct?

I believe that it is correct to update the IoT Agent in Orion, since I previously registered an entity and it remained as an active attribute (not lazy).

Thanks.

@caiothomas
Copy link
Author

I ran tests on iotagent-node-lib and queryContext is working. In iotagent-ul has a bug, I'll check where it is.

@caiothomas
Copy link
Author

Hello,
By analyzing the IoT Agent code (iot-agent-node-lib), I noticed that it does not store lazy attribute data. Is the device that should implement it? Or when the device does an update it is identified lazy attribute and will be stored in the context in the IoT Agent?

Thanks.

@perrolobo
Copy link

perrolobo commented Jan 20, 2017 via email

@caiothomas
Copy link
Author

Okay, I got the concept. However, I do not understand if the device always publishes on the IoT Agent and it doesn't send updates to Orion. Or is there any other feature of MQTT?

Thanks.

@fgalan
Copy link
Member

fgalan commented May 22, 2017

Lazy attribute support is parte of existing issue #23 . I understand that the present one can be closed.

@fgalan fgalan closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants