http post/request - 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: http post/request (/showthread.php?tid=4913) |
http post/request - Dré - 08.08.2023 I'm trying to sent a command to a homewizzard socket, to put him on and off, but really don't know how to sent the command. I can read the value's but don;t know to sent it on and off. hope someone can help me? this is what i use to read Code: require('socket.http') this is what the site said about the command. Code: Turn on socket what i get when read the url: P1 HomeWizzard TEST 08.08.2023 12:57:02 * string: HW socket: Televisie: State{"power_on":true,"switch_lock":false,"brightness":0} RE: http post/request - admin - 08.08.2023 Try this: Code: json = require('json') RE: http post/request - Dré - 08.08.2023 Thanks a lot, this is working. |