Page 1 of 1

Access Philips Hue REST API?

Posted: Tue Mar 29, 2016 5:57 pm
by dan2600
Is it possible for a factorio mod to send requests to a web REST API?

I know LUA can use socket.http and ltn12 for such tasks. But I'm a bit confused on if mods can access standard lua functions or only the factorio lua API.

The mod I have in mind would basically turn the lights in my room different colors based on different events done in the game.

Thanks for the help!

Re: Access Philips Hue REST API?

Posted: Tue Mar 29, 2016 6:01 pm
by orzelek
Lua is limited for security reasons - no os functions and no connections of any kind.

Re: Access Philips Hue REST API?

Posted: Tue Mar 29, 2016 7:30 pm
by dan2600
orzelek wrote:Lua is limited for security reasons - no os functions and no connections of any kind.
Thanks for the reply! I figured as much. I'll post a request for a simple HTTP method to API request forum then. I think there could be a lot of cool uses for it (such as external monitoring on a second device, etc)