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

Transformation to OCB does not work with manual provisioning of the IoTAgent #126

Closed
manolait opened this issue Jan 16, 2024 · 2 comments
Closed

Comments

@manolait
Copy link

manolait commented Jan 16, 2024

Hello,

I am having problems when performing the provisioning of the device through the REST API. If I perform the configuration through the file, config if it works. Also, I think there is missing information on how to provision devices and groups in the tutorials.

I am using this:

{
    "devices": [
        {
            "device_id": "age01_Car",
            "entity_name": "age01_Car",
            "entity_type": "Device",
            "apikey": "iot",
            "service": "opcua_car",
            "subservice": "/demo",
            "attributes": [
                 {
                    "name": "SCADAASPAnalogInput_10PresentValue",
                    "type": "Float"
                  },
                  {
                    "name": "SCADAASPAnalogInput_11PresentValue",
                    "type": "Float"
                  }
            ],
            "lazy": [
            ],
            "commands": [
            ],
            "endpoint": "opc.tcp://1xxxxxxxx:49320"
        }
    ]
}

searching on the internet I have seen that maybe you should add

"object_id": "ns=2;s=SCADA.ASP.AnalogOutput_10.PresentValueRel",

Complete:

{
    "devices": [
        {
            "device_id": "age01_Car",
            "entity_name": "age01_Car",
            "entity_type": "Device",
            "apikey": "iot",
            "service": "opcua_car",
            "subservice": "/demo",
            "attributes": [
                 {
                    "name": "SCADAASPAnalogInput_10PresentValue",
                    "object_id": "ns=2;s=SCADA.ASP.AnalogOutput_10.PresentValueRel",
                    "type": "Float"
                  },
                  {
                    "name": "SCADAASPAnalogInput_11PresentValue",
                     "object_id": "ns=2;s=SCADA.ASP.AnalogInput_11.PresentValue",
                    "type": "Float"
                  }
            ],
            "lazy": [
            ],
            "commands": [
            ],
            "endpoint": "opc.tcp://192.xxxxx:49320"
        }
    ]
}

but we have the following error: ```
{
"name": "WRONG_SYNTAX",
"message": "Wrong syntax in request: Errors found validating request."
}


this version of the docker image is `image: iotagent4fiware/iotagent-opcua:2.2.0`

How can I add devices?

Thank you, best regards.
@manolait manolait changed the title OCB does not work with manual provisioning Transformation to OCB does not work with manual provisioning of the IoTAgent Jan 16, 2024
@walterwootz
Copy link
Collaborator

Hi @manolait,
We are facing some problems regarding API provisioning related to iotagent-node-lib. We already opened an issue and are waiting for support to fix it. We recommend using config.js autoprovisioning at the moment.

@manfredipist
Copy link
Collaborator

Hi @manolait you should add property "relaxTemplateValidation" inside config.iota object and set it to true to solve your issue related to "WRONG_SYNTAX". Regarding the provisioning of the device, OCB will get updated only once proper measured are received as discussed in the following issue (telefonicaid/iotagent-node-lib#1575)

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

3 participants