edgexfoundry / device-opc-ua

Apache License 2.0
28 stars 29 forks source link

Write fail #6

Closed hongda3141 closed 2 years ago

hongda3141 commented 3 years ago

when use "set" command to write a nodeid like "ns=2;s=Demo.Dynamic.Scalar.Int16", will occur a error about:

(EXTRA ua.StatusCode=The value supplied for the attribute is not of the same type as the attribute's value. StatusBadTypeMismatch (0x80740000)

and i found that is because a parameter error of file "device-opcua-go/internal/driver/driver.go + line: 203":

EncodingMask: uint8(6),

in gopcua demo of write,that parametar is : EncodingMask: ua.DataValueValue,

and i change to thar value, the write function success

gabriele-scivoletto commented 3 years ago

hi @hongda3141 , Are you using docker-compose based deployment? I have issues on the integration of opcua in my running edgex deployment

I added my device profile through the gui but when I try to run the edgex-device-opcua docker container I receive the following error

Init: useRegistry:  
profile: docker confDir: /res                                                                                                                                                              
Loading configuration from: /res/docker/configuration.toml                                                                                                                                                                                                                                                                                                                                                                    
Bypassing registration in registry...                                                                                                                                                                          
Calling service.Start.                                                                                                                                                                                         EnableRemote is true, using remote logging service                                                                                                                                                             level=INFO ts=2021-02-23T12:03:06.201333811Z app=edgex-device-opcua source=init.go:137 msg="Check Metadata service's status ..."                                                                               
level=INFO ts=2021-02-23T12:03:06.203151673Z app=edgex-device-opcua source=init.go:137 msg="Check Data service's status ..."                                                                                   
level=INFO ts=2021-02-23T12:03:06.207926754Z app=edgex-device-opcua source=init.go:47 msg="Service clients initialize successful."                                                                             
level=INFO ts=2021-02-23T12:03:06.21291831Z app=edgex-device-opcua source=service.go:149 msg="Device Service edgex-device-opcua exists"                                                                        
level=ERROR ts=2021-02-23T12:03:06.225351498Z app=edgex-device-opcua source=devices.go:43 msg="Device Profile OPCUA-Server doesn't exist for Device SimulationServer"                                          
level=ERROR ts=2021-02-23T12:03:06.225424898Z app=edgex-device-opcua source=devices.go:31 msg="creating Device from config failed: SimulationServer"                                                           
error: Failed to create the pre-defined Devices 

but the device profile OPCUA-Server exists

image

can you help me? Thanks Gabriele

iain-anderson commented 2 years ago

Fixed in #9