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

Validator Errors - unable to dereference URI & invalid extra points #173

Closed
noursaidi opened this issue Aug 8, 2021 · 3 comments
Closed

Comments

@noursaidi
Copy link
Collaborator

I encounter the following message when running the validator. (SNS1 is a proxy device bound to a gateway)

Processing device #1/9: SNS-1/event_pointset
Warning: Nashorn engine is planned to be removed from a future JDK release
Error validating message: fatal: unable to dereference URI "file:event_pointset_point.json#"
    level: "fatal"
    uri: "file:event_pointset_point.json#"
    exceptionMessage: "event_pointset_point.json (No such file or directory)"

java.lang.RuntimeException: Metadata validation failed: Extra points: play_sound,room_temp,sound_level,sound_volume
	at com.google.daq.mqtt.validator.ReportingDevice.validateMetadata(ReportingDevice.java:67)
	at com.google.daq.mqtt.validator.Validator.validateUpdate(Validator.java:381)
	at com.google.daq.mqtt.validator.Validator.validateMessage(Validator.java:286)
	at com.google.daq.mqtt.validator.Validator.lambda$messageValidator$0(Validator.java:233)
	at com.google.daq.mqtt.util.PubSubClient.processMessage(PubSubClient.java:112)
	at com.google.daq.mqtt.validator.Validator.messageLoop(Validator.java:261)
	at com.google.daq.mqtt.validator.Validator.validatePubSub(Validator.java:239)
	at com.google.daq.mqtt.validator.Validator.main(Validator.java:124)

Two problems I think with this message are:

  1. Regarding “Error validating message: fatal: unable to dereference URI "file:state_pointset_point.json#”, (which also appears for other files such as "file:event_pointset_point.json#"

These files exist (error while running on linux too)

nournew@macbook udmi % find  ~/udmi -name event_pointset_point.json
/Users/nournew/udmi/schema/event_pointset_point.json
nournew@macbook udmi % find  ~/udmi -name state_pointset_point.json
/Users/nournew/udmi/schema/state_pointset_point.json
  1. The message reports "extra points" which I do not think are extra are extra described in metadata. Could there be a debug mode which prints the payload too to help identify what the message parsed is?

The pointset from the metadata in the local site model directory is:

…
"pointset": {
    "points": {
      "play_sound": {
        "units": "No-units",
        "ref": "MV28.Present_Value"
      },
      "room_temp": {
        "units": "Degrees-Celsius",
        "ref": "AI3.Present_Value"
      },
      "sound_level": {
        "units": "No-units",
        "ref": "AI17.Present_Value"
      },
      "sound_volume": {
        "units": "Percent",
        "ref": "AV30.Present_Value"
      }
    }
  }
…

Event from a subscription to udmi_target is the following. I can't see any other messages which are different.

{
	"version": 1,
	"timestamp": "2021-08-08T10:36:15.839346Z",
	"points": {
		"play_sound": {
			"present_value": 1.0
		},
		"room_temp": {
			"present_value": 20.82
		},
		"sound_level": {
			"present_value": 35.53
		},
		"sound_volume": {
			"present_value": 71.0
		}
	}
}

The version of the UDMI git repo I'm running is the current latest:

commit 37486e632919909ce7389c2d016212d39cf13eb2 (HEAD -> master, origin/master, origin/HEAD)
Author: rniemo-g <[email protected]>
Date:   Wed Aug 4 14:56:00 2021 -0700

    Update MessageValidator to fail when validation fails
@grafnu
Copy link
Collaborator

grafnu commented Aug 10, 2021

#174 fixes the problem with file paths

@grafnu
Copy link
Collaborator

grafnu commented Aug 10, 2021

Also, the last message of each type is written to a file already: e.g. more out/devices/AHU-1/event_pointset.json (from the UDMI directory)

@grafnu
Copy link
Collaborator

grafnu commented Aug 10, 2021

I fixed the one error (with file paths), but there's too much in this one issue to track everything -- so I'm going to close this (first item fixed), and if there's other separate issues they should be opened separately.

@grafnu grafnu closed this as completed Aug 10, 2021
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

2 participants