Code Monkey home page Code Monkey logo

huginn's Introduction

Huginn


What is Huginn?

Huginn is a system for building agents that perform automated tasks for you online. They can read the web, watch for events, and take actions on your behalf. Huginn's Agents create and consume events, propagating them along a directed graph. Think of it as a hackable version of IFTTT or Zapier on your own server. You always know who has your data. You do.

the origin of the name

Here are some of the things that you can do with Huginn:

  • Track the weather and get an email when it's going to rain (or snow) tomorrow ("Don't forget your umbrella!")
  • List terms that you care about and receive email when their occurrence on Twitter changes. (For example, want to know when something interesting has happened in the world of Machine Learning? Huginn will watch the term "machine learning" on Twitter and tell you when there is a spike in discussion.)
  • Watch for air travel or shopping deals
  • Follow your project names on Twitter and get updates when people mention them
  • Scrape websites and receive email when they change
  • Connect to Adioso, HipChat, FTP, IMAP, Jabber, JIRA, MQTT, nextbus, Pushbullet, Pushover, RSS, Bash, Slack, StubHub, translation APIs, Twilio, Twitter, and Weibo, to name a few.
  • Send digest email with things that you care about at specific times during the day
  • Track counts of high frequency events and send an SMS within moments when they spike, such as the term "san francisco emergency"
  • Send and receive WebHooks
  • Run custom JavaScript or CoffeeScript functions
  • Track your location over time
  • Create Amazon Mechanical Turk workflows as the inputs, or outputs, of agents (the Amazon Turk Agent is called the "HumanTaskAgent"). For example: "Once a day, ask 5 people for a funny cat photo; send the results to 5 more people to be rated; send the top-rated photo to 5 people for a funny caption; send to 5 final people to rate for funniest caption; finally, post the best captioned photo on my blog."

Gitter Changelog #199

Join us in our Gitter room to discuss the project.

Join us!

Want to help with Huginn? All contributions are encouraged! You could make UI improvements, add new Agents, write documentation and tutorials, or try tackling issues tagged with #"help wanted". Please fork, add specs, and send pull requests!

Really want a fix or feature? Want to solve some community issues and earn some extra coffee money? Take a look at the current bounties on Bountysource.

Have an awesome idea but not feeling quite up to contributing yet? Head over to our Official 'suggest an agent' thread and tell us!

Examples

Please checkout the Huginn Introductory Screencast!

And now, some example screenshots. Below them are instructions to get you started.

Example list of agents

Event flow diagram

Detecting peaks in Twitter

Logging your location over time

Making a new agent

Getting Started

Docker

The quickest and easiest way to check out Huginn is to use the official Docker image. Have a look at the documentation.

Local Installation

If you just want to play around, you can simply fork this repository, then perform the following steps:

  • Run git remote add upstream https://github.com/huginn/huginn.git to add the main repository as a remote for your fork.
  • Copy .env.example to .env (cp .env.example .env) and edit .env, at least updating the APP_SECRET_TOKEN variable.
  • Make sure that you have MySQL or PostgreSQL installed. (On a Mac, the easiest way is with Homebrew. If you're going to use PostgreSQL, you'll need to prepend all commands below with DATABASE_ADAPTER=postgresql.)
  • Run bundle to install dependencies
  • Run bundle exec rake db:create, bundle exec rake db:migrate, and then bundle exec rake db:seed to create a development database with some example Agents.
  • Run bundle exec foreman start, visit http://localhost:3000/, and login with the username of admin and the password of password.
  • Setup some Agents!
  • Read the wiki for usage examples and to get started making new Agents.
  • Periodically run git fetch upstream and then git checkout master && git merge upstream/master to merge in the newest version of Huginn.

Note: By default, email messages are intercepted in the development Rails environment, which is what you just setup. You can view them at http://localhost:3000/letter_opener. If you'd like to send real email via SMTP when playing with Huginn locally, set SEND_EMAIL_IN_DEVELOPMENT to true in your .env file.

If you need more detailed instructions, see the Novice setup guide.

Develop

All agents have specs! And there's also acceptance tests that simulate running Huginn in a headless browser.

  • Install PhantomJS 2.1.1 or greater:
  • Run all specs with bundle exec rspec
  • Run a specific spec with bundle exec rspec path/to/specific/test_spec.rb.
  • Read more about rspec for rails here.

Using Huginn Agent gems

Huginn Agents can now be written as external gems and be added to your Huginn installation with the ADDITIONAL_GEMS environment variable. See the Additional Agent gems section of .env.example for more information.

If you'd like to write your own Huginn Agent Gem, please see huginn_agent.

Our general intention is to encourage complex and specific Agents to be written as Gems, while continuing to add new general-purpose Agents to the core Huginn repository.

Deployment

Please see the Huginn Wiki for detailed deployment strategies for different providers.

Heroku

Try Huginn on Heroku: Deploy (Takes a few minutes to setup. Read the documentation while you are waiting and be sure to click 'View it' after launch!)

Huginn launches on the free version of Heroku with significant limitations. For non-experimental use, we strongly recommend Heroku's 1GB paid plan or our Docker container.

OpenShift

OpenShift Online

Try Huginn on OpenShift Online

Create a new app with either mysql or postgres:

oc new-app -f https://raw.githubusercontent.com/huginn/huginn/master/openshift/templates/huginn-mysql.json

or

oc new-app -f https://raw.githubusercontent.com/huginn/huginn/master/openshift/templates/huginn-postgresql.json

Note: You can also use the web console to import either json file by going to "Add to Project" -> "Import YAML/JSON".

If you are on the Starter plan, make sure to follow the guide to remove any existing application.

The templates should work on a v3 installation or the current v4 online.

Manual installation on any server

Have a look at the installation guide.

Optional Setup

Setup for private development

See private development instructions on the wiki.

Enable the WeatherAgent

In order to use the WeatherAgent you need an Weather Data API key from Pirate Weather. Sign up for one and then change the value of api_key: your-key in your seeded WeatherAgent.

Disable SSL

We assume your deployment will run over SSL. This is a very good idea! However, if you wish to turn this off, you'll probably need to edit config/initializers/devise.rb and modify the line containing config.rememberable_options = { :secure => true }. You will also need to edit config/environments/production.rb and modify the value of config.force_ssl.

License

Huginn is provided under the MIT License.

Huginn was originally created by @cantino in 2013. Since then, many people's dedicated contributions have made it what it is today.

Build Status Coverage Status Dependency Status Bountysource

huginn's People

Contributors

0xdevalias avatar albertsun avatar aserpi avatar baip avatar bencornelis avatar cantino avatar chriseidhof avatar clockwerx avatar darrencauthon avatar deanputney avatar dsander avatar elsurudo avatar enfop avatar gtramontina avatar ianblenke avatar international avatar irfancharania avatar knu avatar mfclarke avatar oroce avatar rishabhjain avatar sfischer13 avatar skarlso avatar strugee avatar stvnrlly avatar tantalum avatar thiagotalma avatar tildewill avatar umarsheikh avatar zoomequipd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

huginn's Issues

Clipper agent

I have had this idea for a while and figured I would act on it but still haven't due to barrier to entry of learning ruby. Anyway, here it goes:

The Clipper card is a multi-transit system paycard for the SF Bay Area. The system has an autoload feature but it only works when the balance goes below $10.

The basic idea is to create an agent which:

  • Monitors balance for threshold
  • When below threshold, auto-deposit pre-defined amount
  • Bonus: Could track daily transit usage
  • Bonus: There is a delay of up to 5 days when depositing online, Huginn could be smart and pre-determine when the threshold will be reached and deposit 5 days early

This is a little short sighted as it only applies to the Bay Area but it probably could serve a nice boilerplate for other transit systems.

As far as implementation goes, some options are scripted purely in Ruby (depends how much AJAX happens on page), scripted via PhantomJS, or we create an API wrapper for Clipper and hit that.

Payload Manipulation Agents

I think it would be super swell to abstract out payload manipulation.

The EmailAgent already does this manipulation in one direction: it allows a user to take a number of fields from a payload and combine them into a single field within the message field "template".

It would also be useful to go in the other direction: take a single field, and, given a template, extract a number of fields. The templates could look exactly the same as those given to the message field. Named captures in regexps would be more powerful, but then there'd be two problems.

I think I'm suggesting a FieldCombineAgent and a FieldExtractAgent. The FieldCombineAgent would do what the EmailAgent already does (that is, fill in a template given a payload), but the FieldExtractAgent would be new functionality. Basically, the FieldExtractAgent would allow an event with a low-complexity payload to satisfy an event with a high-complexity input (of which zero currently exist), and the FieldCombineAgent would exist to aid in conceptual symmetry and event composability.

For use cases, I'm thinking of things like sending a structured SMS to create an issue in an issue tracker or sending a structured tweet or email or IRC message to kick off a job/push/test suite.

Gmail Agent

It'd be nice to have a Gmail agent. The most useful event would be receiving an email, but conceivably, sending an email could also be useful. The payload would include the label hierarchy and star status along with all the other typical email fields (from, to, cc, bcc, subject, body, attachments[?]). These could then be passed along to the TriggerAgent to do all sorts of useful things.

Paired with Google Voice, this could also allow for hacky SMS integration (which I'd really like).

Quick Start MySQL Error

Following steps from Quick start, while copying .env to .env.example; socket is uncommented and set to /tmp/mysql.sock.

MySQL may not connect through that socket always.

It could alternately exist @ ["/var/run/mysqld/mysqld.sock", "/opt/local/var/run/mysql5/mysqld.sock", "/tmp/mysql.sock"]

Hence, comment out socket under .env.example

Geofencing Agent

An agent that can take geolocations and trigger events when the location is in a region.

This would be useful to trigger things when you go to work, shops, etc.

Digest Agent not sending Emails

Hi guys,

I been trying to get the DigestAgent working, but some reason ActionMailer is not sending any emails

I have the following in my development.rb

DOMAIN = "localhost:3000"

config.action_mailer.default_url_options = { :host => DOMAIN }
config.action_mailer.asset_host = DOMAIN
config.action_mailer.perform_deliveries = true # Enable when testing!
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "smtp.allanmacgregor.com",
port: 465,
domain: "allanmacgregor.com",
authentication: "login",
enable_starttls_auto: true,
user_name: "[email protected]",
password: "xxxx"
}
end

I'm also not seeing any errors or the email message

Probable bug in bin/schedule.rb with rufus-scheduler 3.0.0

Trying to deploy a development version to a cloud server (Linux node_name 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux), I got a strange error - after about five or six calls of propogate! from the scheduler, I start getting these errors:

16:04:06 schedule.1 | { 47046200 rufus-scheduler intercepted an error:
16:04:06 schedule.1 | 47046200 job:
16:04:06 schedule.1 | 47046200 Rufus::Scheduler::EveryJob "3s" {}
16:04:06 schedule.1 | 47046200 error:
16:04:06 schedule.1 | 47046200 47046200
16:04:06 schedule.1 | 47046200 ActiveRecord::ConnectionTimeoutError
16:04:06 schedule.1 | 47046200 could not obtain a database connection within 5 seconds (waited 5.000160871 seconds). The max pool size is currently 5; consider increasing it.

...and so on on every second tick. This was with my own modified version of Huginn, but just ticking away in the background without any browser access. I also had the dj: line in Procfile disabled to narrow down the problem. However, a vanilla install of the latest version from github (under the same account but with a slightly different set of Gems) worked without error.

After much hacking about, I discovered that this change worked for me:

scheduler.every '3s' do # 3s for testing - same problem occurs with 1m
  ActiveRecord::Base.connection_pool.with_connection do
    propogate!(mutex)
  end
end

I don't have any confidence that this is the proper way to fix the problem, and I may be the only person experiencing it, but I wanted to leave a trace for later Googling. The fresh vanilla version uses rufus-scheduler 2.0.22 but my modified version uses 3.0.0 - this seems to be the deciding factor, according to my tests. Furthermore, this change is also needed:

scheduler = Rufus::Scheduler.new

It seems backward-compatible with v2.0.22... I've also reproduced the fault and the fix on a completely different box.

no-op

Oops... I didn't realize a pull request would also create an issue. This is a no-op.

IRC Channel

Some of us are going to start hanging out in #huginn on freenode. Please join us!

Filter with hashtag?

Been playing around with huginn and I seem to have encountered an issue filtering the twitter stream with a hashtag. If I filter #test , it shows up in the twitter_stream.rb Terminal window, but doesn't get noticed as an event. If I filter test , it shows up in the twitter_stream.rb Terminal and comes across as an event. Does anyone else see this behavior? (or I could just be doing something wrong)

Centralized place to share agents?

Is there any centralized place to share agents? Even just a wiki page? It seems that with so many forks there are probably many useful or interesting agents out there that are just not findable yet. Or is the intention that once an agent is deemed ready/complete it will be merged into this origin repo?

Pull Agents into Ruby Gems

Let's start this architecture discussion.

I think Huginn Agents should be distributed as ruby gems, inheriting from a huginn-agent gem containing the base models and agent behaviors. Agent gems should also be allowed to distributed partials and controllers for any custom agent behavior; as the agent model grows it will make sense to distribute dashboards and custom UIs for some types of agents.

What is the best way to organize a Rails system like this? Engines?

Sample of working email configuration

I didn't expect to spend so much time trying to get SMTP working. Would someone be so kind as to share their .env that works?

I'd love to see a GMail example and a local/ISP example. If you don't want to share your personal info, just replace the specific address and password as if it is for [email protected] or [email protected] with a password of "abc123".

I may just have a specific issue with my local setup, but I've made some telnet tests that seem to indicate that I can talk to the SMTP servers I'm specifying in my .env.

Real RSS Agent

I know the WebsiteAgent exists, but it'd be nice to have a real RSS agent as well. RSS/Atom provide data with better fields, and people expect feeds to be crawled (not always the case with straight-up web content [does the WebsiteAgent obey robots.txt?]). This would also remove the need for the CSS selector business (while it's powerful, it's not exactly convenient).

RESTful polling

It would be great to have a RESTful agent capable of long polling.
This would, for example, allow me to have huginn watch lights turn on and off in my house using the openremote rest API
http://www.openremote.org/display/docs/Controller+2.0+HTTP-REST-JSONP
I'm sure there would be many more applications.
I'm new to huginn and to Ruby but if someone can point me to parts of the code I should look at, I'm willing to give it a try.

Heroku

This is a pretty neat project. I'd like to see easy deployment to a heroku dyno. Obviously 'contributions welcome' applies to this feature request, but I figured I'd log this here for tracking purposes.

Push notifications for OSX Notification Center? or similar?

Just wanted to say, this is very, very cool.

I've recently had my own idea of making something that would push notifications to OSX Notification Center depending on event triggers. But it seems like huginn takes care of all of the hard stuff!

I think this would be a very useful feature. I know this is OSX specific, but an application for Windows/Linux can easily be made to receive notifications that would work well with the respective platforms. I'm thinking simple pop-ups, etc.

Thoughts?

Exception in weather_agent.rb

HI!

I've setup the agent with wunderground, put in my wunderground API key as option and my town id as another option, but when I hit "run" the following message appears:

Exception during check: undefined method []\' for nil:NilClass -- [\"/srv/huginn/app/models/agents/weather_agent.rb:69:incheck'", "/srv/huginn/app/models/agent.rb:268:in `async_check\

Am I missing something?

The options are configured as follows:

{
"location": "10640",
"api_key": "0xxxxxxxxxxxxxx6"
}

Location should be Frankfurt, Germany

Twitter Stream Agent

I have noticed that there are duplicate tweets in twitter stream the payload saved with the same tweet tow times.

screenshot from 2013-08-03 15 30 58

Thanks

A better way to query serialised data

I have a /device/:device_name(/:event_name) route that handles input from devices that aren't targeted at a specific agent id, unlike webhooks_controller.rb. I want to search through to find an Agent that can handle the device and event, so I have this in my controller:

    Agent.all.each do |agent|
      # Have an agent waiting for this device
      if agent.options[:device] == params[:device_name]
        if agent.options[:event].nil? || agent.options[:event] == params[:event_name]
          # Do my stuff

Obviously, with lots of agents this may soon get rather slow. As far as I understand, however, I can try this:

    Agent.where("options LIKE ':device: '#{params[:device_name]}'").where("options LIKE ':event: '#{params[:event_name]}'").each do |agent|
      # Do my stuff

However, that is rather ugly, and looking at the database sometimes the values are in quotes and sometimes they aren't. So, my questions are:

  1. Is there a better way of doing my code?
  2. Is there something that can be done to serialize_and_symbolize.rb to clean up the rather messy query?

/delayed_job not working, events not being processed.

Running on Ruby 1.9.3 and WEbrick and 32-bit Windows XP, I don't get messages being passed down the chain, the "pending messages" in the top-right corner fills up with jobs, and the "Run event propagation" button has no obvious effect. Furthmore, accessing /delayed_job results in this error page

Routing Error

No route matches [GET] "/delayed_job"

Try running rake routes for more information on available routes.

I'm at a loss as to what could be the problem. Everything else seems to work fine.

uninitialized constant Rake::DSL

I got this error when trying to initialize the db (rake db:create). Researching for the error message showed that this is a very common error with many different solving approaches. I tried nearly all hints (forcing rake 0.8.7, adding differen require-command) but none of them changed something about the error message. As I don't know ruby enough I hope someone could help me out. The bundle-command finished with the message "Your bundle is complete!".
Here is the Backtrace of the error (has been cloned to /srv/www/huginn):

/srv/www/huginn # rake db:create --trace
(in /srv/www/huginn)
rake aborted!
uninitialized constant Rake::DSL
/var/lib/gems/1.8/gems/dotenv-0.6.0/lib/dotenv/railtie.rb:5
/var/lib/gems/1.8/gems/dotenv-rails-0.6.0/lib/dotenv-rails.rb:1
/var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in require' /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:inrequire'
/var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in each' /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:inrequire'
/var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in each' /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:inrequire'
/var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:132:in require' /srv/www/huginn/config/application.rb:7 /srv/www/huginn/Rakefile:7:inrequire'
/srv/www/huginn/Rakefile:7
/usr/lib/ruby/1.8/rake.rb:2383:in load' /usr/lib/ruby/1.8/rake.rb:2383:inraw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in load_rakefile' /usr/lib/ruby/1.8/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in load_rakefile' /usr/lib/ruby/1.8/rake.rb:2000:inrun'
/usr/lib/ruby/1.8/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1998:inrun'
/usr/bin/rake:28

API key management

It seems like it'd be worth discussing ways to allow for easy API key management. One thing to keep in mind is the distinction between app keys & user keys: correct me if I'm wrong, but I think a single Huginn deployment can be configured with a single Twitter consumer key & consumer secret, but oauth creds for each user.

My thoughts:

Quick & dirty: App keys go in .env, user keys get their own fields on the Account screen.

Better: Same as above, but separate API keys view and menu item to the Account dropdown.

Betterer: Same as above, but user keys can be accessed/modified from agent creation page and get cached for future instances of that agent. If the user is the admin, keys for the app will be available there, too.

ruby - fastercsv not installed via "bundle install"

Hi,
it seems in the dependency-configuration is fastercsv missing.

matze@pucky ~/test/huginn $ rake secret
The method 'YAML.enable_arbitrary_object_deserialization!' is deprecated and will be removed in the next release of SafeYAML -- set the SafeYAML::OPTIONS[:default_mode] to either :safe or :unsafe.
rake aborted!
no such file to load -- fastercsv
/home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in require' /home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire'
/home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in load_dependency' /home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire'
/home/matze/.gem/ruby/1.8/gems/rails_admin-0.4.5/lib/rails_admin/support/csv_converter.rb:2
/home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in require' /home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire'
/home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in load_dependency' /home/matze/.gem/ruby/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire'
/home/matze/.gem/ruby/1.8/gems/rails_admin-0.4.5/lib/rails_admin.rb:8
/home/matze/test/huginn/config/application.rb:7
/home/matze/test/huginn/Rakefile:7
(See full trace by running task with --trace)

I had to install it manually later.

Flexibility

I really love this but I worry that some of the design decisions aren't very flexible and I feel like I'm about to hack the shit out of it. The first thing is the hard coding of the configurations, and then the coupling to mysql via database.yml but more importantly the migrations. I'd like to use postgres. Then I'm probably going to work on trying to make it cheaper to run on heroku. Am I wasting my time if I start shooting pull-requests your way?

Scheduling agent to run from time X to time Y

Is it currently possible to schedule an agent from one time until another, ie. "run daily from 12:30 to 12:45 every minute"?

If so, how?
If not, does anyone know of a gem that could provide that functionality?

Default agents should immediately produce results

This could be a nice-to-have or could be better handled by requiring tests for agents, but it seems like it'd be handy if the agents that get initially installed:

  • included all current agents
  • they were all setup in such a way that if they were all run immediately upon logging in, they'd produce immediate results that can be used for new users to familiarize themselves with Huginn

Twitter stream broken

Seems the twitter stream is still using the basic authentication that is now officially deprecated. Oauth is now the only supported method

Best location for new agent suggestions?

I'm a big fan of this idea, and I'd like to develop a few agents to help me move off IFTTT and Pipes. I'd also like to avoid duplicating the effort of others if there's already work being done on agents that interest me.

Is your intention to use this issue tracker as a place to coordinate agent development? i.e. can I create issues for the agents I'm interested in and express my interest in developing them?

Foreman start error

shell$ foreman start

23:08:11 web.1 | started with pid 3090
23:08:11 schedule.1 | started with pid 3092
23:08:11 twitter.1 | started with pid 3094
23:08:11 dj.1 | started with pid 3096
23:08:16 dj.1 | /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:2:in require': no such file to load -- rubygems (LoadError) 23:08:16 dj.1 | from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:2 23:08:16 dj.1 | from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:1:inrequire'
23:08:16 dj.1 | exited with code 1
23:08:16 system | sending SIGTERM to all processes
23:08:16 | from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:1
23:08:16 web.1 | terminated by SIGTERM
23:08:16 schedule.1 | terminated by SIGTERM
23:08:16 twitter.1 | terminated by SIGTERM

Any suggestions?

Stronger schema for Events

In my usage of Huginn recently, it has seemed like Events may need a bit more structure than we're currently giving them. Specifically, right now it's difficult to

  • know how to display an arbitrary event in the UI
  • know how to format an arbitrary event for sending over email, SMS, Twitter, etc.
  • know where an event came from

Do you guys have any insights into how events could be structured to provide a stronger schema while still keeping the flexibility that we have now?

The concept of "interfaces" (from Java, Go, etc.) seems like a useful starting point. Perhaps sending Agents should declare one or more interfaces that their events conform to, and then receiving Agents can declare what interfaces they understand. E.g., the summary interface will always have a human-readable summary field, the alert interface will always have cause, date, and source fields, etc. Microformats could also be used.

Thoughts?

scraperwiki comparison

Hi Andrew,
Where do you see this project in comparison to ScraperWiki? ScraperWiki is also open-source, but it also allow developers to write their agent equivalents in multiple programming languages and also share them between users. I am interested to hear your thoughts if they overlap or serving different purposes ( given that ScraperWiki is in 4 years of development, it might be good to hear your thoughts about your project's philosophy)

The future of Huginn

Next Steps

I want to explore the next steps for Huginn and to talk about something much more ambitious than the current implementation.

Huginn, the Protocol

Goals:

  • Huginn Agents shouldn't have to be implemented in Ruby inside of a Rails app. Agents should be implementable in any language.
  • You should be able to interact with both local and remote Agents in the same way, with the same API.
  • The system should be fast enough to tackle a wide variety of problems.

Proposal:

  • Agents can be written in any language on any platform that can open persistent connections.
  • Agents create and consume JSON Event objects.
  • To consume events from an Agent you connect to that Agent's IP address and port and subscribe to a standing query for matching events. The default query is something like subscribe to *, returning all generated events, but specific Agents can allow for more complex predicates, such as subscribe where zipcode = 12345 (syntax TBD).
    • This could easily be wrapped in WebSockets.
    • This predicate language should be standardized and, importantly, very simple to implement.
    • It's possible that Agents should create events in a rolling event log and allow for short-term event replay from a specific timestamp so that a re-connecting Agent can recover any lost events.
  • Agent configuration is not part of the spec. Some Agents may be configured via the command line, others via a web GUI, still others can be paid remote services.
    • The reference implementation will make it easy to customize and deploy Agents on your own system with configuration via a web GUI similar to the current system.
    • The reference implementation may allow Agents to be sandboxed (a la docker) so that you can install semi-trusted 3rd-party code.
  • Agents should be runnable locally or remotely. The goal is to allow you to maintain control of your data by running everything locally, or to subscribe to remote Agents and participate in a larger data ecosystem. Some questions:
    • How should local Agents be packaged and distributed?
    • What would a marketplace look like where you could easily subscribe to, or download and run, Agents for any purpose?

What do you think?

Get Involved!

Want to help create the future of Huginn? Get involved! You can comment and contribute here, send pull requests, follow @tectonic on Twitter, or contact me directly on my personal site to discuss further involvement.

Don't backfill events

When you setup a new agent to receive events from an existing one that already has events, the first time event propagation is run, ALL of those events are sent through receive. That obviously causes some trouble if the sender agent has accumulated a lot of events already.

That doesn't make a whole lot of sense to me as default behavior. It would make much more sense to only send future events through.

I could tackle changing this, and I'm looking through the code for where that's being done, but I'm not that familiar with the code base and am having trouble finding it. A pointer to where that's happening would be appreciated.

What's the best way to allow people to fork and configure a Rails app while keeping pull requests simple?

Right now contributing to Huginn while keeping your personal changes private is somewhat difficult.

You can fork Huginn and then make a private remote of the fork, but pushing changes from the private duplicate is difficult without leaking your personal configuration, unless you're very careful about how you structure your branches.

Should we move all configuration into a single .gitignored YAML file? Or would it be better if this was a Rails engine?

Deployment

What do you think about removing the deployment-specific files and configuration from master?

Admin page broken > RuntimeError in RailsAdmin::MainController#dashboard

I am not a RoR developer. I am a technically minded growth hacker and want to use Huginn. Let me say first, thanks for making this interesting program and to all the people helping.

I will say that the newbie guide and the quick start guide both have holes in them. However I have a Vagrant box with Ubuntu Lucid 32 up and running with Huginn working. However I get the below error when trying to click on the Admin page. Everything else seems to be working and Agents are generating events. I would be happy to contribute my Vagrant box once everything is working so it's easy for anyone to play with Huginn.


RuntimeError in RailsAdmin::MainController#dashboard

Task Argument Error

Rails.root: /vagrant
Application Trace | Framework Trace | Full Trace

lib/capistrano/sync.rb:35:in block (2 levels) in <top (required)>' lib/capistrano/sync.rb:28:inblock in <top (required)>'
lib/capistrano/sync.rb:27:in `<top (required)>'

Reddit Agent

I have some code from a similar project that can be adapted to create a Reddit Agent

Wunderground - input location besides ZIP for non-US users

Hello... First time posting on Github, pretty exciting. I'm not a programmer, just a hobbyist, so I'm not sure I can do this myself but I'd like to modify or create a secondary Weather Agent where the user can get weather info for non-USA locations.

This seems easily possible in the Wunderground API, but I can't quite find how Huginn creates the request URL. I'm looking at app/models/agents/weather_agent.rb and I see references to ZIP but I'm not sure how to go about changing it to another method of specifying location (I think the Country / City method would be good).

I'll keep looking around but if you can quickly give me some clues maybe I can get it done!

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.