more G-Labs products

Author Topic: Text file to scheduler  (Read 610 times)

February 25, 2017, 10:11:02 AM
Read 610 times

IanR

  • **
  • Information
  • Jr. Member
  • Posts: 31
Hello
Has anyone got any code that can take information out of a text file (log file) and enter it into the scheduler?
Before I try and write something (badly) to do it.
Thanks
Ian R

February 25, 2017, 10:46:01 AM
Reply #1

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Hi, IanR.
I don't understand what do you want to achieve?
What kind of logs do you want to use to take information from? And how use this information in scheduler?

February 27, 2017, 05:10:36 PM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If you want someone to help, you'll need to be more clear on what you want to accomplish.  The best bet would be to provide an example of what your text file looks like and what it should look like once in the scheduler.  If there's anything else that would be useful info, you should provide that prior to having someone write code for you.

February 27, 2017, 10:12:46 PM
Reply #3

IanR

  • **
  • Information
  • Jr. Member
  • Posts: 31
Hello
Sorry for the delay just got back.
I have a set of text files I have generated from old log files.
I just had the idea of a quick and simple upload to the schedule from a text file instead of scheduling ever light and blind in the house every time by hand. Hopefully A faster way to set the house up when you have unexpected travel plans.
The text file only has what is required but more can be added.
Format:
Time , Modlue name , Level
Eg
16:30:00 , Hall , 65 .
22:45:00 , Hall , 0 .

Thanks
Ian R

February 28, 2017, 04:47:44 PM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
That is possible and something someone may be able to help with.  I would recommend considering using the new scheduler as it can set up a bunch of modules for specific on/off/level times really quickly assuming they all work at the same time.  If you have a number of random events to simulate presence, you might find it easier to make a random time/action generator in the scheduler than hard coding them like this.

http://www.homegenie.it/forum/index.php?topic=1953.msg11042#msg11042

February 28, 2017, 09:32:16 PM
Reply #5

IanR

  • **
  • Information
  • Jr. Member
  • Posts: 31
Thank you
I will give that a try.

Ian R