Hm… That’s unfortunate. Is there a reason why this is? When will it be turned on? In some ways I’m glad that’s true. This one was a head scratcher.
@TAustin Thank you for your post. I should have mentioned that I tried both with asyncify and without. I must have a mistake but I can’t seem to find it. The exact same url works in curl but not in the code. On a related note, it’s very difficult to debug this. All the returns are nil…
@TAustin I can’t tell if the target is receiving since I am calling a REST api. What I mean is that I don’t get anything useful from the https.request call itself. The call completes but the return variables are all nil. At least I think they are.
I noticed that you are including Content-Type header, however you don’t appear to be sending any body data with your message. If the REST api you are using isn’t expecting any, then try removing that header. Otherwise, if you are sending data in the body part of the message, then you should also include a Content-Length header and of course this:
source = ltn12.source.string(sendbody)
If you want, you can send me a direct message with the URL so I can check that. Otherwise, have you tried plugging that exact url into a browser to confirm that it works ok?
EDIT: One other thing, I usually include this header in all requests - body data or not:
@TAustin OK. I will give that a try. @lmullineux Are you sure Edge drivers only allow local LAN? If so, that seems very restrictive. Where is this limitation documented?
@csstup Wow that’s pretty annoying, actually. In a groovy DHT you could call external addresses. The functionality has gone backwards in this respect. I suppose the claim will be that it has something to do with security, but it seems to me https requests to outside addresses are secure(?). Also, it would be good if the http request calls would return something saying that the address is not accessible or something instead of just nothing.
You can build internet connected devices, and smartapps still on the new platforms. Just like you could with groovy, only difference is now you have to host them yourself.
If you really want to use edge (although this is not what Samsung intended) you can use a proxy installed on a device on your network (e.g a raspberry pi) to get your requests out onto the internet. @TAustin had some software that you can use
@lmullineux I see what you mean. In my case I am trying to add functionality to the Flair vents and pucks. I had it all working with groovy and I am now porting it to Lua. I suppose I would have had to choose to create a Cloud Connected Device and implement all the auth stuff. That’s a lot of work for just 3 devices in my case. It’s more work than just creating an Edge device, since porting from groovy is proving to be pretty easy. It’s still a little unclear as to why an Edge device cannot access the outside world. Is it really a security concern? As you point out, I will have to end up creating a simple “API proxy” that sits inside my LAN and translates from the Edge device to the API…I will probably just write it in php. Simple enough. A little annoying, but it will still be less complexity than supporting a “Connected & Secure Cloud” using Schema, etc. That route really seems to be for more of a professional solution rather than the part time software person.