Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
224 stars 71 forks source link

How to recognize a local folder as valid DTMI model repository. #594

Closed oedze closed 1 year ago

oedze commented 1 year ago

I am trying to import model definitions using the IoT Explorer. But the IoT Explorer always tells me it can't find any definitions for the model interface i am using. I tried a few things but can't seem to get it to recognize any models.

Some extra information:

rido-min commented 1 year ago

I would expect that local model resolution supports the DMR conventions /cc @digimaun

YingXue commented 1 year ago

Hi @oedze It sounds like you are indeed doing things. We will need you to set up the local file path (for example the path would be d:/ if my Thermostat.json file is in my d drive), and the Thermostat.json.json should have an @id property equals to dtmi:com:example:Thermostat;1 ( image ) Once you save the values, the tool should be able to recognize the models.

YingXue commented 1 year ago

Closing with instructions given.

rido-min commented 1 year ago

I think there is some value by finding files in a folder hierarchy that follows the DMR convention. Do you want to track as a different feature?

YingXue commented 1 year ago

Sorry for not reading the descriptions close enough. Yes so far Explorer does not support indexes and the expand file format. I am reopening the issue to investigate what we can do here.

oedze commented 1 year ago

Sorry for not reading the descriptions close enough. Yes so far Explorer does not support indexes and the expand file format. I am reopening the issue to investigate what we can do here.

Hi @YingXue yes, as @rido-min mentioned. I expected the local folder to work as a model repository. When i add the folder it's in the list with a big header above it called: "Model Repository Locations". I now added the thermostat-1.json file to the root of the folder structure and it works indeed.

It would be nice if the local folder would follow the conventions. Maybe it's possible to add an extra option next to add Public Repository, Configurable Repository and Local folder called Local Repository . Then you also won't be breaking any local folders that are setup.

For now i can work with the local folder just fine, Thanks!

YingXue commented 1 year ago

We have just release version 0.15.7 and addressed the feature request. Please give it a try if you'd like. Thank you. https://github.com/Azure/azure-iot-explorer/releases/tag/v0.15.7