Local "internet request"

Moderator: Telldus

Post Reply
HarryL
Posts: 27
Joined: Fri Mar 17, 2023 9:45 am
Location: denmark

Local "internet request"

Post by HarryL »

I use node-red to do alot of things, and the "telldus-zwave-v2-local" works great but local fetch of data and actions are missing a lot of funktions like calling a http/TCP on ones local network NOT online(don't want my node-red open to the internet).. and lastupdate is not there in the local version of telldus.

and support for locks is officially not supported...

in short local "http/URL request" and lastupdate on local is missing so much that im starting to finde other solutions that is not telldus based.

still need a way to get notified if i have not heard from a sensor/switch in number of days.. hours..

what are you working on?
(had Tellstick Net v17) now Tellstick ZNet Lite v2, Denmark, Iphone/Mac/linux.
arneolav
Posts: 281
Joined: Fri Mar 17, 2023 9:45 am

Re: Local "internet request"

Post by arneolav »

Edvard Drake har gjort noe LUA skript, titta här: https://www.facebook.com/groups/1918607 ... 4/?fref=nf,
juhoroine
Posts: 4
Joined: Fri Mar 17, 2023 9:45 am

Re: Local "internet request"

Post by juhoroine »

Hello,

I discovered a workaround to locally generate a http-request from Tellstick znet lite V2 LUA script:
(works for version 1.1.1 and needs http-server you can create scripts to)

Install the "Blink1 Notifications" -plugin and configure it for your local http-server (ip+port)
Then create a server-side script for url /blink1/pattern/play
Blink1 examples used parameter pname, but you can probably use any name here.

The script must return status in json, such as:
{"status":"ok"}



Then you can generate a http-request from your LUA-code, like this:

local blink = require "blink1.Notify"
local ret = blink:send{pname="hello"} --You propably be able to use any parameter name instead of pname
if ret.status == "ok" then
print "request OK"
end


This will generate a GET request to http://MY.IP.AD.DR/blink1/pattern/play?pname=hello


EDIT: it seems not possible to pass other parameters than pname (and perhaps other Blink1 standard params), but you can capsulate value pairs to the pname param, like this:
local ret = blink:send{pname="myVar=1"}
Post Reply