Write a code from LM3, to send HTTP commands to a device to control it - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Write a code from LM3, to send HTTP commands to a device to control it (/showthread.php?tid=76) |
Write a code from LM3, to send HTTP commands to a device to control it - phongvucba - 17.09.2015 Hi everybody! Please help me...please.! I tried with it, but all failed... I have a line: http://100.100.100.9/send.htm?remote=samsungtv&command=power And I need to write a script used LM3, to send HTTP commands to a device to control it That is Irtrans. Please help me. Thank you very much...All RE: Write a code from LM3, to send HTTP commands to a device to control it - admin - 18.09.2015 This should do it. You will see the result of this request in "Logs" tab. Code: require('socket.http') RE: Write a code from LM3, to send HTTP commands to a device to control it - phongvucba - 21.09.2015 (18.09.2015, 06:11)admin Wrote: This should do it. You will see the result of this request in "Logs" tab. Thank admin. But I did try and error: . * arg: 1 * nil * arg: 2 * string: No route to host So why do it?..although, I typed in the address bar of Chorme still works 'http://100.100.100.9/send.htm?remote=samsungtv&command=power' Please help me... thank all RE: Write a code from LM3, to send HTTP commands to a device to control it - admin - 21.09.2015 Check network settings in System Config -> Network -> Interfaces -> eth0. You have to set Gateway IP to your router IP, otherwise LogicMachine will only have access to devices in the same local network, but not outside. RE: Write a code from LM3, to send HTTP commands to a device to control it - phongvucba - 22.09.2015 ! Thank Admin and everyone. I 've done . I succeeded! Thank all! RE: Write a code from LM3, to send HTTP commands to a device to control it - Hoang189 - 28.09.2015 (22.09.2015, 12:03)phongvucba Wrote: ! Thank Admin and everyone. sr. ai đấy nhỉ? RE: Write a code from LM3, to send HTTP commands to a device to control it - phongvucba - 30.09.2015 (28.09.2015, 09:14)Hoang189 Wrote:(22.09.2015, 12:03)phongvucba Wrote: ! Thank Admin and everyone. |