Jump to content

Looking for help with network module


BBernstein

Recommended Posts

Posted

I would like to do the following, which I think is a pretty generic capability:

1) execute a network resource using a GET sting built from fixed text and variables.

2) capture a return JSON and return a specific response field into a variable.

 

Has anyone done anything similar, or know if the capability is coming (I'm on Polisy 5.4.2)

Thanks.

Posted

Network resources are one way traffic only.   You can build your get string bases on variables, there are not currently string variables available although that may be coming in some form or another if I read another thread correctly.

Number 2 on your list is not possible.  Instead you need to create a node server.

Posted

the Wiki page is here: https://wiki.universal-devices.com/index.php?title=ISY-994i_Series_INSTEON:Networking:Network_Resources

also these substitution strings can be used in the body or path portion of URL for the network resource.  as you scroll thru that page you'll discover not only the ability to include variables but any nodes info.

I've not used the replacements in the path portion of the NR before but there might be a need to check or uncheck the encode checkbox to the right of the path entry box.  @larryllix can probably tell use for sure, IIRC he's done that type of replacement extensively with his wifi bulbs.

Posted (edited)

Here is a sample NR that talks to my RPi NRbridge software and controls my WiFi bulbs.

These are the variable values I send

NRb.variables.jpg.34c25360c8947770202e922e72758d3b.jpg

 

This is the NR I use to send the variable values. Note the format included in the strings. A word of warning that variables are encrypted at send time and not at invocation time. @Michel KohanimIOW: If you change the value of a variable immediately after use in your program, the new value will get sent. This is a factor in making ISY and IoP very slow for lighting control. Every program line requires a Wait 1-3 seconds delay for repeated usage of the NR.

2077195764_NRbsetNR.thumb.jpg.6e3614a1a7e3f086ba88fb510d5a2d99.jpg

Edited by larryllix
Guest
This topic is now closed to further replies.

×
×
  • Create New...