Jump to content

Write / Append to file


NNilsen

Recommended Posts

I have an application that requires logging activity in plain text format to a log file.

 

I do not see such and action in programs

 

Example:

If - Insteon button "home" is pressed

Then - append to file occupancy.txt date() time() string("Home")

 

If - Insteon button "away" is pressed

Then - append to file occupancy.txt date() time() string("Away")

 

The file can be anyware that can be accessed IE: on an external network drive

 

I am currently sending an e-mail via ISY for external parsing

Link to comment

NNilsen-

 

I am using the network resources module to send to a syslog server running on my MAC. Also tested with a linux box. Not perfect but it works.

 

-Xathros

Link to comment

NNilson-

 

Here is the blurb on Network Resources from the UDI Website:

Network Module: host your own personal web site or 3rd party applications right on your ISY, control network-enabled devices through ISY programs (TCP/UDP/HTTP/HTTPS), turn on PCs using Wake On LAN

 

Generally speaking, anything that you can control from a browser, you could write a resource rule to control. It takes some research to figure out how to talk to certain devices but its usually not too difficult. You can use a program like Wireshark(Mac/Win/Linux) or EavesDrop (Mac) to "Sniff" the network traffic between your browser and the target device and then use the what you find there to build the rule.

 

Here is one of my syslog rules:

 

 

The network module also sets up a webserver on the ISY so you can host some basic web stuff on the ISY if you like.

 

-Xathros

post-1437-14047415652_thumb.jpg

Link to comment

Archived

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


×
×
  • Create New...