Jump to content

HTML to ISY994


Inchwork

Recommended Posts

Posted

Is there a unit or perhaps better, a Node Server, that can translate HTML to Z-wave; in a similar sense like Fibiro or the Fortrezz Mimo2+ (having input capability), I'm looking to see what can exist for something to sit on my LAN that will converse with ISY994 via HTML.  My goal is to have ESP8266 series SoC devices on my ISY enviro.  The ESP8266's are attached to outputs of things & send a couple HTML commands. 

I'm just stumbling on what exists to sit on LAN that will converse with ISY994 for these devices.  I did see the GPIO Control Poly by xKing but don't think that would fit.  I do not know enough how to construct a NS for this task, nor if it is feasible, though IMO seems possible.  CAO Tags are my next step but would require replacing alot of devices & some rebuilding, but not till I exhaust this tangent.

Any ideas would be helpful for this splinter in my head :)

 

 

 

Posted

@drich I think so.  Other stuff going on but one simple example would be an ESP8266 (the Wifi chip), simply powers on & triggers a camera on my BlueIris cameras ( 10.10.10.10/admin?camera=front&trigger=1).  I can use several ESP8266’s and simply change the html for different functions on BlueIris.  And that’s just BlueIris.  But seems to me I would need to create a virtual device to associate to a mac address/i.p. such that program logic in ISY can interface these devices, which again are not z-wave devices.  Z-wave devices have node details, whereas a Wifi device has a mac address and depending on the router may also include a static i.p.  That’s where I’m kinda stuck, not fully understanding REST or perhaps a node server as an intermediary to REST & these devices.     

...i think  ?

Posted

perhaps I'm answering my own question in that a Node Server or 'virtual device' would fit the bill for Wifi devices within the ISY.  The former of which could be done ahead of what I've read on a potential update to 5.0.16c for virtual devices.

Any chimes from seasoned masters..?

Posted

HTML is a text markup language for screen formatting. It has no intelligence and not a good protocol, currently being deprecated,  to be used for HA.
I am not understanding what you are wanting out of this.

Posted

@larryllix (apologies for haze, bear with me) ?
ok, exchange the REST API (barely grasping) for html.  So, I pass commands (html) to a camera workstation (BlueIris);  this is done thru Lua commands loaded on an ESP8266 (wifi SoC, a $2 PCB; just googl 'benlo esp8266').  I simply apply power to the 8266, the Lua code runs, authenticates on the SSID,  lines are run that are understood/carried out by BlueIris (ip-address/admin?camera=front&trigger=1).  Mission complete.

I'm looking for a similar arrangement on ISY, but since the ESP8266's are wifi and not z-wave, I'm lost to interface with ISY & inclusion in programs.  Nothing robust, simply contact closures.  I thought wifi devices could be interfaced as virtual devices possibly thru an NS or what I've read as a potential update 5.0.16c for virtual devices (if I'm understand the reads on virtual devices).

Hopefully a little clearer.  
 

Posted

@Inchwork Ok I think I understand what you want somewhat.

I use NR = network resources in my ISY to send out a variety of HTTP, TCP, and UDP packets to control lights and talk to my NRbridge software (self written), control A/V equipment etc...

The Network Resources module is an already installed, pay for enable firmware inside your ISY994.  It is one way only though so no responses will be had using NRs. It can send almost any combination of Ethernet packet I have ever seen.

I have forgotten the price of it, but it was cheap enough or IIRC can be "rented" as part of the ISY Portal package.

Sample Philips Hue control NR.

post-4697-0-88876000-1431052959_thumb.jpg

 

EDIT: I think I misunderstood what you want here. I thought this was a webcam. LOL

If you want to input information into ISY994 write URLs to access the REST interface. You can write to variables, program control, scenes and almost everything inside your ISY. Your code will need to be able to encrypt the security details though. It is fairly easy in python3.

https://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface

Posted
3 hours ago, larryllix said:

You can write to variables, program control, scenes and almost everything inside your ISY

....but not devices?  I can write URLs to access REST, but not to devices that don't exist or are somehow created...?  This is where I was referencing a Virtual Device; a device that is neither z-wave or Insteon, but one that has a mac or ip address that can somehow be included in the ISY environment. 

Posted
21 minutes ago, Inchwork said:

....but not devices?  I can write URLs to access REST, but not to devices that don't exist or are somehow created...?  This is where I was referencing a Virtual Device; a device that is neither z-wave or Insteon, but one that has a mac or ip address that can somehow be included in the ISY environment. 

I am sure this would be covered in the ISY wiki link I posted.
I haven't tried it. I only write to variables and let ISY use it's logic to do whatever I want from it, conditionally.

Posted
On 7/11/2020 at 4:36 PM, Inchwork said:

@drich I think so.  Other stuff going on but one simple example would be an ESP8266 (the Wifi chip), simply powers on & triggers a camera on my BlueIris cameras ( 10.10.10.10/admin?camera=front&trigger=1).  I can use several ESP8266’s and simply change the html for different functions on BlueIris.  And that’s just BlueIris.  But seems to me I would need to create a virtual device to associate to a mac address/i.p. such that program logic in ISY can interface these devices, which again are not z-wave devices.  Z-wave devices have node details, whereas a Wifi device has a mac address and depending on the router may also include a static i.p.  That’s where I’m kinda stuck, not fully understanding REST or perhaps a node server as an intermediary to REST & these devices.     

...i think  ?

So what I do with BlueIris is to just use Polyglot. It is so much easier than trying to work with network resources and/or the REST API.  (and I'm the one who provided the BlueIris network resources in the wiki: https://wiki.universal-devices.com/index.php?title=ISY-994i_Series_INSTEON:Networking:Network_Resources#Blue_Iris_v4.x ). 

The REST API is for when you want to trigger something on the ISY externally. For example, I'm using it to update Z-Wave attributes in a device from Home Assistant for a device that HA can't talk to reliably. I use something like this:

http://isy.mynetwork.com/rest/zwave/node/ZW056_1/config/set/9/{{payload}}/1

(this is from Node Red, in this case {{payload}} is replaced with the brightness when that URL is used, and ZW056_1 is the device node)

I also have some ESP8266 code that probes my ISY for my ELK alarm status, you can take a look at that here: https://github.com/sjthespian/elkm1_monitor/blob/master/elk_monitor_dht22.ino#L148

Posted

@drich Well, thanks for the NR on BlueIris; better for me in what I'm doing as I'm not as talented on Lua as you seem to be (my nephew had to do that for me).   My camera angles challenge even BlueIris v5's advanced algorithm & AI (especially windy days under trees - I mute my phone ?); thus I simply had 2 lines trigger BI for each in a bunch of solar powered/charged PIR devices with ESP8266's piggy-backed.

So as to the OP, I simply thought something that has an IP addy on the LAN could be introduced/controlled by ISY, perhaps not directly but thru a mediator (thus my references to a NS or what I thought of as a virtual device).  Though I don't know how NS's are constructed, I thought of it housing a database of devices with macs correlating to created/assigned node addresses, to which ISY could then include in its environment; then an ESP8266-02 chip (as example) could be addressable in ISY as a node and Lua (or Arduino) could be written to it which would include REST or SOAP.

However, getting along with the ISY interface which includes the Insteon dialect & sometimes frustrating oddities of flash, perhaps this too is something else I've misunderstood, and network devices which have an IP4 or IP6 address cannot be ISY nodes.

Posted

Node servers are external device drivers for the ISY.  The so-called "nodes" do not represent IP addresses, although they could.  Rather a node is a control point -- an entity that offers zero or more values to the read or communicated to the ISY, and offers zero or more values it can accept as either commands or settings from the ISY.

Consider a simple example -- a node server for a wifi-based light bulb.  This would logically offer a node that would have a status (on, off, or brightness from 0 to 100% for example).  It would accept a command or value, telling it to turn on or off or set the brightness.  Now exactly how the bulb wants the message on the network formatted, and what values in binary on the network represent the aforementioned on/off/brightness levels, well that would depend on the manufacturer -- and that's where the "device driver" part comes in.  So the node server is a bunch of code that knows how to send and receive messages from the wifi bulb in this example, understands that perhaps the bulb (due to some strange quirk of its design) doesn't take 0 to 100% as a value, but instead wants the brightness encoded as an integer rounded from the result of a floating point calculation involving log functions or some such ridiculous stuff.  Like a good Windows or Linux device driver, it insulates you the user from the gory details and ugliness of the manufacturer-proprietary protocols and units.

So, in terms of your cameras -- just knowing the IP address isn't nearly enough.  Ok, you've got the address in the ISY -- now how do you format a message to tell it to do something?  How does the camera tell the ISY about something?  What conversions of units are required?  Is "on" a logic 1 or a logic 0?  Or is it (common with light bulbs) where off is 0 but on is 255?  Someone has to write a node server, basically the device driver for your cameras.

 

Posted

@mwester super explanation and greatly appreciated ?

Cameras are not what I am (was) attempting to communicate with (or simply listen to).  Actually was the use of a ESP8266 chip as they're so cheap.  Utilizing as a sensor, SPST (or Controller in Insteon speak) simply producing a 0 or 1 (one-way comm).  In my example the ESP8266 would communicate when one of its' GPIO are triggered from watching the output of a PIR (the other GPIO for perhaps another switch closure). 

But for one or two on/offs (per 'device') it seems overkill to keep simple (& perhaps too deep for me), thus it appears I'll have to dive into the CAO sensor ecosystem ?.

I'm so indebted to the treasures of value in this community !

Posted

@Inchwork There is an older thread regarding interfacing an Arduino to the ISY via REST:

The better way to do it though would be to write a Node Server using the python/polyglot interface. I have this on my to-do list since I want to replace my pool LED light controllers with something more appealing than pastels and wild flashing colors. An ESP8266 is a perfect choice for little widgets like this (ie Garage Door controller, remote relay(s), temperature sensors, etc.).

I don't know what your coding level is, but Einstein.42 has done an incredibly good job of creating a Node Server template. The best way to learn is play with it a little. :)

Posted

Ah, thanks for the clarification.

To integrate an ESP device, you COULD use a node server, see above post.

But, that's way overkill.  It's a lot easier to use variables and network resources.  The technique is that you would have a web server running on your ESP that listens for specifically-formatted REST messages, and does "the right thing" for each message.  Sending information to the ISY can be effectively done by sending the ISY REST API message to set a variable.  You can do that in pretty much any language that runs on the ESP -- lua, if that's your thing, but I use micropython for it all.

Posted

As per @mwester above, here is a sample of the Hue Network resources I used previously. I have aborted all my Hue usage now. The original bulbs could not do green colours and they are way overpriced for me, since other brands became 1/5th of the price.

post-4697-0-59952100-1451062132_thumb.jpgpost-4697-0-21776700-1451062143_thumb.jpgpost-4697-0-59592800-1468777921_thumb.jpg

Posted

@SeeGreen Write a Node Server?~ New in the last 8 mos, I dove into HA & RPi's, spending much time playing w/o results.  In example, I learned from posts concerning functionality in a Push NS, but feared more fruitless bearings.  Thus had Ryan append/update his smtp-translator, as the versatility was better for me akin to a local smtp server.  Now I locally Push from an RPi (via rcvd formatted email envelope), using flags & w/attachments from a couple servers; and then simply use the NR ISY for Push.
Good write ups indeed, I can follow to a degree; I even got PolyGlot running on another RPi, but similarly I'll be looking for something already started.  Coding is unfortunately not in my toolkit upstairs.  Will be following you ...well, when you get to your to-do list :)

@mwester Thx Mike.  Clarifying my usage: a motion device (self-contained solar charged) turns on LEDs @night; I hacked the china circuit to monitor PIR activity @anytime (solar voltage depicts day control of LEDs); when motion triggers the PIR, output state flips to turn on white LEDs for xx seconds & momentarily powers the ESP8266 initiating Lua, authenticating on my Wifi, triggering a BlueIris camera, then ESP8266 shuts down. 

As mentioned above, coding is not my forte, but - _WOW_ Variables...?...?  This is new (to me)....I think now I see your suggest of var & NR's (& making sense of larryllix comments earlier).  If I'm understanding, add an 'Or' statement to an 'If' stance of a State Var(opposed to Int var), which is changed from REST, to cause an event sent, in my case an event would be an NR (BlueIris, camera trigger) -So to speak, correct?  Much to understand & novicely worded perhaps, but i think I'm gettin it?! 

Posted

@mwester OK, good now; appreciate the clarity & ideas from all; gonna think how to filter per PIR device / 8266, but I'm sure I'll figure something to fit my needs; not ready (sanity) for CAO devs yet ?

Being a noob challenged w/Insteon (have none; wiki has many) & phantom devices (have alot; akin to whack-a-mole) adds to the curve, but much appreciate this community of experience! (and glad for jportable!);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...