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

How to set _config_mode #594

Closed
prajgujarathi opened this issue May 12, 2022 · 8 comments
Closed

How to set _config_mode #594

prajgujarathi opened this issue May 12, 2022 · 8 comments
Assignees
Labels
help wanted Extra attention is needed ontology instance validator Improvements or issues with the instance validator P1 High priority

Comments

@prajgujarathi
Copy link

Describe the bug
I keep getting errors on valid YMAL files saying KeyError: 'No valid _config_mode is set' when trying to validate using instance_validator

To Reproduce
Steps to reproduce the behavior:
Go to folder digitalbuildings\tools
try validating the file using the validator using the command py .\toolkit.py --input file-path -v

Expected behavior
It errors out with error:
-py3.9.egg\validate\instance_parser.py", line 374, in _ValidateEntityContent
raise KeyError('No valid _config_mode is set')
KeyError: 'No valid _config_mode is set'

OS (please complete the following information):
windows

Here are the file contents:

CONFIG_METADATA:
operation: EXPORT

US-MTV-1804:
type: FACILITIES/BUILDING
id: FACILITIES/

device2715203:
type: HVAC/FAN_SS_DSP
cloud_device_id: 2550389110353931
translation:
exhaust_fan_run_command:
present_value: "points.efss_1.present_value"
states:
ON: "true"
OFF: "false"
schedule_run_command:
present_value: "points.schedule_1.present_value"
states:
ON: "true"
OFF: "false"
zone_air_cooling_temperature_setpoint:
present_value: "points.eff_clg_sp_1.present_value"
units:
key: "pointset.points.eff_clg_sp_1.units"
values:
degrees_fahrenheit: "°F"
unoccupied_zone_temperature_cooling_setpoint:
present_value: "points.unocc_clg_sp_1.present_value"
units:
key: "pointset.points.unocc_clg_sp_1.units"
values:
degrees_fahrenheit: "°F"
zone_air_unoccupied_heating_temperature_setpoint:
present_value: "points.unocc_htg_sp_1.present_value"
units:
key: "pointset.points.unocc_htg_sp_1.units"
values:
degrees_fahrenheit: "°F"
failed_alarm:
present_value: "points.ef_fail_1.present_value"
states:
ON: "true"
OFF: "false"
zone_air_heating_temperature_setpoint:
present_value: "points.eff_htg_sp_1.present_value"
units:
key: "pointset.points.eff_htg_sp_1.units"
values:
degrees_fahrenheit: "°F"
occupied_zone_temperature_cooling_setpoint:
present_value: "points.occ_clg_sp_1.present_value"
units:
key: "pointset.points.occ_clg_sp_1.units"
values:
degrees_fahrenheit: "°F"
zone_air_occupied_heating_temperature_setpoint:
present_value: "points.occ_htg_sp_1.present_value"
units:
key: "pointset.points.occ_htg_sp_1.units"
values:
degrees_fahrenheit: "°F"
exhaust_fan_run_status:
present_value: "points.efst_1.present_value"
states:
ON: "true"
OFF: "false"
zone_air_temperature_sensor:
present_value: "points.zone_temp_asvi_1.present_value"
units:
key: "pointset.points.zone_temp_asvi_1.units"
values:
degrees_fahrenheit: "°F"
connections:
US-MTV-1804: CONTAINS

@charbull charbull added help wanted Extra attention is needed ontology instance validator Improvements or issues with the instance validator P1 High priority labels May 17, 2022
@charbull
Copy link
Collaborator

Hi @prajgujarathi can you please remove this part?

CONFIG_METADATA:
operation: EXPORT

What is the purpose of validating an exported config?

@prajgujarathi
Copy link
Author

Hi, @charbull Just to test the validation setup. If I remove that part, I get another error:

while parsing a mapping
unexpected key not in schema 'description'
in "", line 2, column 1:
description: some device.
^ (line: 2)

Using a simple YMAL file:

FAN_4:
description: 'some device.'
uses:

  • fan_run_command

@charbull
Copy link
Collaborator

@trav3711
Copy link
Contributor

trav3711 commented May 18, 2022

@charbull Isn't the config_metadata block required? @prajgujarathi try validating with:

CONFIG_METADATA:
operation: INITIALIZE

@trav3711
Copy link
Contributor

@prajgujarathi Did that fix your issue?

@prajgujarathi
Copy link
Author

Yes, it did. Thank you.

@trav3711
Copy link
Contributor

Great. Closing issue.

@charbull
Copy link
Collaborator

fyi: the initialize is the default setup, it is not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed ontology instance validator Improvements or issues with the instance validator P1 High priority
Projects
Ontology Instance Validator
  
Awaiting triage
Development

No branches or pull requests

3 participants