Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pending events #195

Closed
wants to merge 2 commits into from
Closed

Pending events #195

wants to merge 2 commits into from

Conversation

qedi-r
Copy link

@qedi-r qedi-r commented Mar 19, 2014

An initial stab at issue #174

  • similar to events, creates a pending_events table
  • similar to telling the agent to create an event, you can tell the agent to queue_event
  • HuginnScheduler monitors the table every minute, adds jobs to rufus when new pending events are seen

Still a couple of things to do, but I wanted to get some feedback first. Things I am aware of:

  • handling server restarts when we scheduled the task with rufus
  • specs, duh

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b438d7d on qedi-r:pending_events into 691f3b7 on cantino:master.

@cantino
Copy link
Member

cantino commented Mar 19, 2014

Interesting! So the idea is that an Agent can schedule Events that will "appear" in the future. What are some example use cases?

@qedi-r
Copy link
Author

qedi-r commented Mar 20, 2014

My driving motivation for this currently is an astronomy agent, which I will submit a pull request for once this is done. It checks weather underground automatically whenever the date changes and determines the sunrise and sunset times and schedules events for them so I trigger things based on those times.

@cantino
Copy link
Member

cantino commented Mar 22, 2014

It feels like a better model would be to have either

  1. an Agent that outputs arbitrary events at very specific times
  2. an Agent that delays input events until very specific times
    or
  3. a general system to schedule exactly when agents will run

being able to emit "future events" strikes me as a bit odd, although I understand that it completely meets your needs in this case. Would 1-3 work for you as well?

@qedi-r
Copy link
Author

qedi-r commented Mar 22, 2014

I'll take a crack at trying 2. It's probably the most flexible approach.

@cantino
Copy link
Member

cantino commented Mar 30, 2014

Hey @qedi-r, did you make any progress on this?

Also, I'm curious to know more about how you're using Huginn. You said it's for astronomy?

@qedi-r
Copy link
Author

qedi-r commented Mar 31, 2014

Hadn't had too much time to work in it as of late. I expect to have an agent tomorrow, though. The idea for this feature is for an agent that uses the wunderground astronomy API, ie an agent that can generate events at sunrise and sundown. This in turn triggers a Philips Hue Agent I have written that turns my porch lights on and off.

I'm using this trial as an experiment to see if huginn can be the flexible master control I desire for my home.

@qedi-r
Copy link
Author

qedi-r commented Mar 31, 2014

See pull request #197

@qedi-r qedi-r closed this Mar 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants