I’m having a go at creating my first Homey app in Java, trying to access energy usage from a smart meter. I have found and modified a python script which is correctly able to pull the data in by using http Post and Get requests, so now trying to recreate that in the Homey app, unfortunately, although I’m very experienced with C++ I’m totally new to Java!
I have found some examples that seems explain the sort of thing I want to do using the HttpRequest and HttpUrlConnection classes, however, trying to include the required java.net.http.* in my project seems to fail, I don’t know if this is because I need to set something up differently, or maybe I can’t use those classes with Homey?
Hoping maybe someone could give me a hint, or maybe point me at some simple examples or tutorials of performing http requests from Homey? Only example I found on github was a fairly complex app that made it difficult for me to understand the basics of the http stuff.