The Vera Community forums have moved!

Advanced => Programming => Plugins & Plugin Development => Topic started by: becky on January 14, 2016, 01:28:23 pm

Title: How do I read from a log file on vera?
Post by: becky on January 14, 2016, 01:28:23 pm
I've decided to take the plunge and learn how to write a plug-in. I've dabbled in scene scripts enough and I think I'm ready.

My husband has written a script on the VERA using CURL something or other. He's pulling text from a local website that lists school closings. If our school is closed, it writes to a file that ourschoolname is closed. if it doesn't find anything it has ourschoolname is open. I think he also writes if there is a 2 hour delay.

My part of the challenge is to create a plug-in that simple pulls that text from the file and puts it into something that I can use in a scene or PLEG. Is there a current plug-in that would be best to use as a learning tool to modify to what I need? I'm looking for one that reads from a file on the vera. I think once I'm pointed in that direction I can figure it out/learn from there.

My ultimate goal (other than learning how to write a plug-in) is to add school closings or delays to our morning announcements.
Title: Re: How do I read from a log file on vera?
Post by: rstrouse on January 14, 2016, 02:20:23 pm
Virtual Panel Does.  It reads from JSON configuration files and handles compression of the files.
Virtual Panel (http://forum.micasaverde.com/index.php/topic,31128.msg223995.html#msg223995)

Title: Re: How do I read from a log file on vera?
Post by: becky on January 14, 2016, 03:18:48 pm
awesome, thank you!