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

Fix bug #113 #119

Merged
merged 16 commits into from
Mar 19, 2018
4 changes: 2 additions & 2 deletions docs/configurationProvisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Lightweight M2M port.
The following request creates the configuration group for devices with type `WeatherBaloon`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is related with PR #118? In that case I understand no new entry in CNR is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. NTC

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...although, on the other side, PR is mentioning #113. Should an entry for #113 be added to CNR file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! Someday I will not forget the CNR!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c9820c8

```
(curl localhost:4041/iot/services -s -S --header 'Content-Type: application/json' \
--header 'Accept: application/json' --header 'fiware-service: Weather' --header 'fiware-servicepath: /baloons' \
--header 'Accept: application/json' --header 'fiware-service: weather' --header 'fiware-servicepath: /baloons' \
-d @- | python -mjson.tool) <<EOF
{
"services": [
Expand Down Expand Up @@ -175,7 +175,7 @@ Now you should be able to see the Entity in your Context Broker. You can do that
with the following command:
```
(curl http://192.168.56.101:1026/v1/queryContext -s -S --header 'Content-Type: application/json' \
--header 'Accept: application/json' --header 'fiware-service: Weather' --header 'fiware-servicepath: /baloons' \
--header 'Accept: application/json' --header 'fiware-service: weather' --header 'fiware-servicepath: /baloons' \
-d @- | python -mjson.tool) <<EOF
{
"entities": [
Expand Down
4 changes: 2 additions & 2 deletions docs/userGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ an IoT Agent can have some device preprovisioned, some configuration groups defi
each for different types of devices.

Some of the guides will share the use of a faked device type called `Robot` with the following characteristics:
* be part of the service `Factory` and subservice `/robots`.
* be part of the service `factory` and subservice `/robots`.
* have an active attribute called `Battery` with type `number`, mapped to the LWM2M resource ID /7392/0/1.
* have a passive attribute called `Message` with type `string`, mapped to the LWM2M resource ID /7392/0/2.
* have a command attribute called `Position` with type `location`, mapped to the LWM2M resource ID /7392/0/3.

Some guides will show the use of the automatic OMA Registry mapping, using a faked device of type 'WeatherBaloon',
with the following characteristics:
* be part of the service `Weather` and subservice `/baloons`.
* be part of the service `weather` and subservice `/baloons`.
* a passive attribute with resource ID /6/0/0 (Position: Longitude).
* a passive attribute with resource ID /6/0/1 (Position: Latitude).
* a passive attribute with resource ID /3303/0/0 (Temperature Sensor).
Expand Down
2 changes: 1 addition & 1 deletion lib/services/lwm2mHandlers/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function mapConfig(device, configuration, callback) {
service: configuration.service,
subservice: configuration.subservice,
lazy: configuration.lazy,
attributes: configuration.attributes,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related with telefonicaid/iotagent-node-lib#588...

I understand this is an internal variable not related with the keyword used in payload (i.e. "attributes"). Is my interpretation correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, this is the field used in the payload to describe attributes. So this was an error caused by telefonicaid/iotagent-node-lib#588

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, this is the field used in the payload to describe attributes

You mean to configuration.attributes, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NTC

active: configuration.attributes,
commands: configuration.commands,
internalId: device.id
};
Expand Down
10 changes: 5 additions & 5 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.