I want to rather than that automate the creation and population of multiple weather assets with their respective data attached. The issue im sitting with is i have an external c# program that calls to the openweather api and retrieves all the data and then puts the data into a form i can use. after this im battling with the actual recieving the data on the openremote side.
I’ve looked around quite a bit and there doesnt seem to be any documentation on doing something like this. If someone could give some help and/or advice on this i’d appreciate
There are multiple ways to achieve automatic creation of assets in OpenRemote.
You could either;
Build your own “OpenRemote setup file” in Java files.
The syntax is relatively simple, and shouldn’t be too hard to pick up.
We recommend the custom-project template, that has a CustomManagerSetup.java file.
This can be used to create assets, users, rules, and everything else.
Optionally, you can also use a fork, and manually create a setup similar to demo,
and use OR_SETUP_TYPE=<name> to auto install them.
Use the HTTP API from an external source
You could also build a simple script in your preferred coding language,
and interact with our HTTP API to create assets, users, rules etc.
More info on this can be found here, together with the HTTP API documentation.
I’m not sure if you guys would be willing to but if you could add a tutorial eventually about how to do this on the docs I feel like it would be super beneficial for people trying to do it in the future.
but i have come right with mine thanks so much again
So i’ve read though the documentation and im still battling with a few things.
I have now setup my external c# program which is working perfectly fine and communicating with the openremote platform, I am now just battling to get it to actually write to the platform and create an actual asset, if anyone has done this or can give me a step by step id appreciate it. My postman gets work perfectly but as soon as i try to send posts it returns a 405 error and sometimes a 404 error.
any assitance would be appreciated, thanks in advance
I’d recommend taking a look at your Docker container logs, and what the HTTP response is when you attempt to make those requests. It is quite important that you also correctly generate a JWT token and add that in your requests. I’d recommend using a debug tool to ensure that the request you are sending over Postman is exactly the same as the one you are sending using your C# library.