This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Homewizard websocket
#6
A simpler way:
Code:
function clientHandler(ip, token)   if not client then     ws = require('user.websocket')     json = require('json')     local url = 'wss://' .. ip .. '/api/ws'     client, err = ws.client('sync', 10)     res, err =  client:connect(url)     ...   else     data, _, _, opcode, err =  client:receive()     ...   end end

Code:
require('user.nit_homewizard') clientHandler('192.168.192.168', '123456')
Reply


Messages In This Thread
Homewizard websocket - by gjniewenhuijse - 16.10.2025, 09:20
RE: Homewizard websocket - by admin - 16.10.2025, 09:39
RE: Homewizard websocket - by gjniewenhuijse - 16.10.2025, 09:39
RE: Homewizard websocket - by admin - 16.10.2025, 10:11
RE: Homewizard websocket - by gjniewenhuijse - 17.10.2025, 12:54
RE: Homewizard websocket - by admin - 17.10.2025, 12:58

Forum Jump: