We have moved at community.getvera.com

Author Topic: How do I read from a log file on vera?  (Read 1343 times)

Offline becky

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +3/-0
How do I read from a log file on vera?
« 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.

Offline rstrouse

  • Hero Member
  • *****
  • Posts: 842
  • Karma: +30/-9
Re: How do I read from a log file on vera?
« Reply #1 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

1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Offline becky

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +3/-0
Re: How do I read from a log file on vera?
« Reply #2 on: January 14, 2016, 03:18:48 pm »
awesome, thank you!