edgexfoundry / device-onvif-camera

Owner: Device WG
Apache License 2.0
29 stars 37 forks source link

DiscoverySubnets are empty!" #432

Open outbackdingo opened 3 months ago

outbackdingo commented 3 months ago

Hi we started looking at edgex again to see if its come any further for onvif, previously, the hkvision camera we had weas discovered with jakarta some noths ago, then we dropped the project, well its back now however with napa we get the following error. and tyhe camera is not found. We used tui-generator for a simple onvif and mqtt exporter, the following docker compose was created

services:
  app-http-export:
    container_name: edgex-app-http-export
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: http-export
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-http-export
      WRITABLE_LOGLEVEL: INFO
      WRITABLE_PIPELINE_FUNCTIONS_HTTPEXPORT_PARAMETERS_URL: http://EXPORT_HOST_PLACE_HOLDER:7770
    hostname: edgex-app-http-export
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59704
        published: "59704"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-metrics-influxdb:
    container_name: edgex-app-metrics-influxdb
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: metrics-influxdb
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-metrics-influxdb
    hostname: edgex-app-metrics-influxdb
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59707
        published: "59707"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-mqtt-export:
    container_name: edgex-app-mqtt-export
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: mqtt-export
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-mqtt-export
      WRITABLE_LOGLEVEL: INFO
      WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS: MQTT_BROKER_ADDRESS_PLACE_HOLDER
      WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC: edgex-events
    hostname: edgex-app-mqtt-export
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59703
        published: "59703"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-record-replay:
    container_name: edgex-app-record-replay
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-record-replay
    hostname: edgex-app-record-replay
    image: edgexfoundry/app-record-replay:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59712
        published: "59712"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-rules-engine:
    container_name: edgex-app-rules-engine
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: rules-engine
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-rules-engine
    hostname: edgex-app-rules-engine
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59701
        published: "59701"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  consul:
    command:
      - agent
      - -ui
      - -bootstrap
      - -server
      - -client
      - 0.0.0.0
    container_name: edgex-core-consul
    hostname: edgex-core-consul
    image: hashicorp/consul:1.16.2
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 8500
        published: "8500"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: root:root
    volumes:
      - type: volume
        source: consul-config
        target: /consul/config
        volume: {}
      - type: volume
        source: consul-data
        target: /consul/data
        volume: {}
  core-command:
    container_name: edgex-core-command
    depends_on:
      consul:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      EXTERNALMQTT_URL: tcp://edgex-mqtt-broker:1883
      SERVICE_HOST: edgex-core-command
    hostname: edgex-core-command
    image: edgexfoundry/core-command:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59882
        published: "59882"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  core-common-config-bootstrapper:
    container_name: edgex-core-common-config-bootstrapper
    depends_on:
      consul:
        condition: service_started
        required: true
    environment:
      ALL_SERVICES_DATABASE_HOST: edgex-redis
      ALL_SERVICES_MESSAGEBUS_AUTHMODE: none
      ALL_SERVICES_MESSAGEBUS_HOST: edgex-mqtt-broker
      ALL_SERVICES_MESSAGEBUS_PORT: "1883"
      ALL_SERVICES_MESSAGEBUS_PROTOCOL: tcp
      ALL_SERVICES_MESSAGEBUS_TYPE: mqtt
      ALL_SERVICES_REGISTRY_HOST: edgex-core-consul
      APP_SERVICES_CLIENTS_CORE_METADATA_HOST: edgex-core-metadata
      DEVICE_SERVICES_CLIENTS_CORE_METADATA_HOST: edgex-core-metadata
      EDGEX_SECURITY_SECRET_STORE: "false"
    hostname: edgex-core-common-config-bootstrapper
    image: edgexfoundry/core-common-config-bootstrapper:3.1.0
    networks:
      edgex-network: null
    read_only: true
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  core-data:
    container_name: edgex-core-data
    depends_on:
      consul:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-core-data
    hostname: edgex-core-data
    image: edgexfoundry/core-data:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59880
        published: "59880"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  core-metadata:
    container_name: edgex-core-metadata
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-core-metadata
    hostname: edgex-core-metadata
    image: edgexfoundry/core-metadata:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59881
        published: "59881"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  database:
    container_name: edgex-redis
    hostname: edgex-redis
    image: redis:7.0.14-alpine
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 6379
        published: "6379"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: root:root
    volumes:
      - type: volume
        source: db-data
        target: /data
        volume: {}
  device-onvif-camera:
    container_name: edgex-device-onvif-camera
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-device-onvif-camera
    hostname: edgex-device-onvif-camera
    image: edgexfoundry/device-onvif-camera:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59984
        published: "59984"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  device-rest:
    container_name: edgex-device-rest
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-device-rest
    hostname: edgex-device-rest
    image: edgexfoundry/device-rest:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59986
        published: "59986"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  mqtt-broker:
    command:
      - /usr/sbin/mosquitto
      - -c
      - /mosquitto-no-auth.conf
    container_name: edgex-mqtt-broker
    hostname: edgex-mqtt-broker
    image: eclipse-mosquitto:2.0.18
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 1883
        published: "1883"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
  rules-engine:
    container_name: edgex-kuiper
    depends_on:
      database:
        condition: service_started
        required: true
      mqtt-broker:
        condition: service_started
        required: true
    environment:
      CONNECTION__EDGEX__MQTTMSGBUS__OPTIONAL__CLIENTID: kuiper-rules-engine
      CONNECTION__EDGEX__MQTTMSGBUS__OPTIONAL__KEEPALIVE: "500"
      CONNECTION__EDGEX__MQTTMSGBUS__PORT: "1883"
      CONNECTION__EDGEX__MQTTMSGBUS__PROTOCOL: tcp
      CONNECTION__EDGEX__MQTTMSGBUS__SERVER: edgex-mqtt-broker
      CONNECTION__EDGEX__MQTTMSGBUS__TYPE: mqtt
      CONNECTION__EDGEX__REDISMSGBUS__PORT: "6379"
      CONNECTION__EDGEX__REDISMSGBUS__PROTOCOL: redis
      CONNECTION__EDGEX__REDISMSGBUS__SERVER: edgex-redis
      CONNECTION__EDGEX__REDISMSGBUS__TYPE: redis
      EDGEX__DEFAULT__OPTIONAL__CLIENTID: kuiper-rules-engine
      EDGEX__DEFAULT__OPTIONAL__KEEPALIVE: "500"
      EDGEX__DEFAULT__PORT: "1883"
      EDGEX__DEFAULT__PROTOCOL: tcp
      EDGEX__DEFAULT__SERVER: edgex-mqtt-broker
      EDGEX__DEFAULT__TOPIC: edgex/rules-events
      EDGEX__DEFAULT__TYPE: mqtt
      KUIPER__BASIC__CONSOLELOG: "true"
      KUIPER__BASIC__RESTPORT: "59720"
    hostname: edgex-kuiper
    image: lfedge/ekuiper:1.11.4-alpine
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59720
        published: "59720"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: kuiper:kuiper
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
      - type: volume
        source: kuiper-data
        target: /kuiper/data
        volume: {}
      - type: volume
        source: kuiper-etc
        target: /kuiper/etc
        volume: {}
      - type: volume
        source: kuiper-log
        target: /kuiper/log
        volume: {}
      - type: volume
        source: kuiper-plugins
        target: /kuiper/plugins
        volume: {}
  support-notifications:
    container_name: edgex-support-notifications
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-support-notifications
    hostname: edgex-support-notifications
    image: edgexfoundry/support-notifications:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59860
        published: "59860"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  support-scheduler:
    container_name: edgex-support-scheduler
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-data
      INTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-data
      SERVICE_HOST: edgex-support-scheduler
    hostname: edgex-support-scheduler
    image: edgexfoundry/support-scheduler:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59861
        published: "59861"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  ui:
    container_name: edgex-ui-go
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-ui-go
    hostname: edgex-ui-go
    image: edgexfoundry/edgex-ui:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        target: 4000
        published: "4000"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
networks:
  edgex-network:
    name: edgex_edgex-network
    driver: bridge
volumes:
  consul-config:
    name: edgex_consul-config
  consul-data:
    name: edgex_consul-data
  db-data:
    name: edgex_db-data
  kuiper-data:
    name: edgex_kuiper-data
  kuiper-etc:
    name: edgex_kuiper-etc
  kuiper-log:
    name: edgex_kuiper-log
  kuiper-plugins:
    name: edgex_kuiper-plugins

it comes up fine, yet no cameras are found there are 2 on the network, we checked the container logs

level=INFO ts=2024-03-27T04:35:01.803920868Z app=device-onvif-camera source=checkstatuses.go:186 msg="Starting task loop."
level=INFO ts=2024-03-27T04:35:01.803945128Z app=device-onvif-camera source=autodiscovery.go:46 msg="Starting auto-discovery with duration 1h0m0s"
level=INFO ts=2024-03-27T04:35:01.803968779Z app=device-onvif-camera source=driver.go:290 msg="Discover was called."
level=INFO ts=2024-03-27T04:35:02.804848982Z app=device-onvif-camera source=driver.go:334 msg="Discovered 0 device(s) in 1.000853586s via multicast."
level=WARN ts=2024-03-27T04:35:02.804900732Z app=device-onvif-camera source=driver.go:352 msg="netscan discovery was called, but DiscoverySubnets are empty!"

simply put we want to utilize edge to discover onvif devices in the environment and export their feeds via mqtt to mainflux, any help is appreciated

jiekechoo commented 3 months ago

@outbackdingo Did you set the discovery network subnets before starting discovery action?

You could put the configuration to your compose file as shown below or use linux env settings, and try again:

            # Host Network Interface, IP, Subnet
            APPCUSTOM_DISCOVERYETHERNETINTERFACE: wlp1s0 # determine this setting for your machine
            APPCUSTOM_DISCOVERYSUBNETS: 192.168.93.0/24 # determine this setting for your machine
            APPCUSTOM_DISCOVERYMODE: multicast

or use the device-onvif-camera api: https://docs.edgexfoundry.org/3.1/microservices/device/services/device-onvif-camera/swagger/ to do that.

the auto-discovery documentation is here: https://docs.edgexfoundry.org/3.1/microservices/device/services/device-onvif-camera/supplementary-info/auto-discovery/

outbackdingo commented 3 months ago

Ive added the follwing to the docker-compose.yml, tore it all down and docker compose up -d and still same results.

environment:
  DEVICE_DISCOVERY_ENABLED: "true"
  DEVICE_DISCOVERY_INTERVAL: "1h"
  APPCUSTOM_DISCOVERYETHERNETINTERFACE: "eno1"
  APPCUSTOM_DISCOVERYMODE: "both" # netscan, multicast, or both
  APPCUSTOM_DISCOVERYSUBNETS: "192.168.10.0/24"
  EDGEX_SECURITY_SECRET_STORE: "false"
  SERVICE_HOST: edgex-device-onvif-camera
level=INFO ts=2024-03-27T07:13:08.562189145Z app=device-onvif-camera source=bootstrap.go:251 msg="SecuritySecretsRequested metric registered and will be reported (if enabled)"
level=INFO ts=2024-03-27T07:13:08.562204116Z app=device-onvif-camera source=bootstrap.go:251 msg="SecuritySecretsStored metric registered and will be reported (if enabled)"
level=INFO ts=2024-03-27T07:13:08.562219621Z app=device-onvif-camera source=driver.go:150 msg="Driver started."
level=INFO ts=2024-03-27T07:13:08.56225698Z app=device-onvif-camera source=checkstatuses.go:186 msg="Starting task loop."
level=INFO ts=2024-03-27T07:13:08.562247768Z app=device-onvif-camera source=autodiscovery.go:46 msg="Starting auto-discovery with duration 1h0m0s"
level=INFO ts=2024-03-27T07:13:08.562285581Z app=device-onvif-camera source=driver.go:290 msg="Discover was called."
level=INFO ts=2024-03-27T07:13:09.563186046Z app=device-onvif-camera source=driver.go:334 msg="Discovered 0 device(s) in 1.000877596s via multicast."
level=WARN ts=2024-03-27T07:13:09.563219529Z app=device-onvif-camera source=driver.go:352 msg="netscan discovery was called, but DiscoverySubnets are empty!"
jiekechoo commented 3 months ago

Try to call the api manually?

outbackdingo commented 3 months ago

ok so... curl --data '192.168.1`0.1/24' -X PUT "http://localhost:8500/v1/kv/edgex/v3/device-onvif-camera/AppCustom/DiscoverySubnets"

resulted in...

level=WARN ts=2024-03-27T07:20:44.742714349Z app=device-onvif-camera source=discover.go:62 msg="No valid CIDRs provided, unable to scan for devices."
level=INFO ts=2024-03-27T07:20:44.742729703Z app=device-onvif-camera source=driver.go:375 msg="Discovered 0 device(s) in 68.749µs via netscan."
level=INFO ts=2024-03-27T07:20:57.880136327Z app=device-onvif-camera source=config.go:684 msg="Updated custom configuration 'AppCustom' has been received from the Configuration Provider"
level=INFO ts=2024-03-27T07:20:57.880191148Z app=device-onvif-camera source=driver.go:437 msg="Discover configuration has changed! Discovery will be triggered momentarily."
level=INFO ts=2024-03-27T07:21:07.88389168Z app=device-onvif-camera source=driver.go:290 msg="Discover was called."
level=INFO ts=2024-03-27T07:21:08.885384889Z app=device-onvif-camera source=driver.go:334 msg="Discovered 0 device(s) in 1.001415384s via multicast."
Onvif WS-Discovery: Find Xaddr: 192.168.10.127            EndpointRefAddress: a34ac000-711d-11b2-806a-240f9bb602d6
level=WARN ts=2024-03-27T07:21:10.984079267Z app=device-onvif-camera source=credentials.go:105 msg="Device a34ac000-711d-11b2-806a-240f9bb602d6 is missing MAC Address, using default secret name"
level=WARN ts=2024-03-27T07:21:11.021271903Z app=device-onvif-camera source=onvifdiscovery.go:122 msg="failed to get the device information for the camera a34ac000-711d-11b2-806a-240f9bb602d6, invalid request for the function 'GetDeviceInformation' of web service 'Device'. Onvif error: fault reason: The action requested requires authorization and the sender is not authorized, fault detail: , fault code: env:Sender ter:NotAuthorized "
level=INFO ts=2024-03-27T07:21:11.021323254Z app=device-onvif-camera source=driver.go:375 msg="Discovered 1 device(s) in 2.135874566s via netscan."
level=INFO ts=2024-03-27T07:21:11.021393003Z app=device-onvif-camera source=async.go:105 msg="Adding discovered device unknown_unknown_a34ac000-711d-11b2-806a-240f9bb602d6 to Metadata"
level=INFO ts=2024-03-27T07:21:11.031998003Z app=device-onvif-camera source=devices.go:78 msg="LastConnected-unknown_unknown_a34ac000-711d-11b2-806a-240f9bb602d6 metric has been registered and will be reported (if enabled)"
level=WARN ts=2024-03-27T07:21:11.032033469Z app=device-onvif-camera source=credentials.go:105 msg="Device unknown_unknown_a34ac000-711d-11b2-806a-240f9bb602d6 is missing MAC Address, using default secret name"
outbackdingo commented 3 months ago

Okay and how/where do i set the secret name .. i dont recall having this error last time

level=WARN ts=2024-03-27T07:21:10.984079267Z app=device-onvif-camera source=credentials.go:105 msg="Device a34ac000-711d-11b2-806a-240f9bb602d6 is missing MAC Address, using default secret name"

jiekechoo commented 3 months ago

Yes, it works.

You should set the secret store, and bind the mac address to the secret name. see here: https://docs.edgexfoundry.org/3.1/microservices/device/services/device-onvif-camera/Walkthrough/deployment/ Map credentials to devices. section.

outbackdingo commented 3 months ago

ok i have 1 cameras working and can show rtsp stream url in the console all try / set appear to work, though im perplexed

StreamUri is showing


ResponseRaw:
[
   {
      "id": "44d60484-2c79-4b93-87da-c8413890d992",
      "origin": 1711528010115316700,
      "deviceName": "IPCAM-C6F0SpZ3N0PmL2-5f5a69c2-e0ae-504f-829b-00FADE9A73A7",
      "resourceName": "StreamUri",
      "profileName": "onvif-camera",
      "valueType": "Object",
      "value": "",
      "objectValue": {
         "MediaUri": {
            "InvalidAfterConnect": true,
            "InvalidAfterReboot": true,
            "Timeout": "PT5S",
            "Uri": "rtsp://192.168.10.126:554/11"
         }
      }
   }
]```

but that is the cameras interanl ip, so how do i export the cameera stream to mqtt to mainflux...

or is this not feasible? i would have thought streamUri was the embedded device running edgeX .....

i simply want to discover devices on the network and export their rtsp streams via mqtt to the cloud....

the docs seem vague on how to accomplish this? is it even feasible?
jiekechoo commented 3 months ago

but that is the cameras interanl ip, so how do i export the cameera stream to mqtt to mainflux...

Yes, it can be. Here is a simply guide you can refer: