
Show HN: Beehive – An open source IFTTT powered by Go's templating engine - mueslix
https://github.com/muesli/beehive
======
lop
"Shortly" we had that topic here already:
[https://news.ycombinator.com/item?id=4441913](https://news.ycombinator.com/item?id=4441913)
But most of the stuff is not alive anymore...

But there are some interesting new ones:

[https://github.com/cantino/huginn](https://github.com/cantino/huginn)

[https://trigger-happy.eu/infos](https://trigger-happy.eu/infos)

not sure if this is alive:
[https://sourceforge.net/projects/semanticwebpipe](https://sourceforge.net/projects/semanticwebpipe)

Do you know some other (open source) event and agent system tools? (there are
tons of commercial hosted IFTTT clones, they are not interesting...)

~~~
IshKebab
Node-RED seems similar and looks like it has a nicer interface (I've not tried
it though).

~~~
jsilence
Node-red also has a lot of connectors, from messaging eco systems to databases
and is very flexible. If you hit a wall to the available node then you can
always hand code Javascript in a function node.

The Raspbian Distro comes with Node-red pre-installed. Fastest and cheapest
way to give it a try.

------
pierrec
I recently tried to use this kind of system to pipe news from facebook pages
into an RSS feed. Impossible. Facebook hand-picks which developers get API
access, and only allows ultra-restricted usage, so for example there's no way
they would allow API access for a generic Beehive user, even just for reading
public posts.

Want to scrape data from the HTML? They aggressively detect anything that may
or may not be automated, and give you a CAPTCHA.

I see it as yet another abuse of their monopoly position. So many artists post
public updates exclusively to this platform, and this is exploited to make
sure everyone stays locked in and is forced to use facebook directly, ads
included. Even the slightest competition would make it obvious how ridiculous
this is, but the current monopoly is self-perpetuating.

~~~
AznHisoka
Facebook doesnt hand pick anyone to its api.

just create a facebook app (no approval needed), have users sign in to that
app to get their access token. then use the api posts endpoint to get all
posts from any page. its that simple

~~~
pierrec
OK, facebook hand-picks the authorization for an app (and its associated API
access) to become public. They also hand-pick private access to more advanced
API features. It's still essentially impossible to create an easy-to use
program that reads public facebook posts, since each individual user has to
create a developer account. I guess my first post was poorly phrased, but the
main point remains that their policy forces the general public to use their
front-end, and none other, to view any posts on public pages.

~~~
AznHisoka
1\. your users do not need to have a developer account. they just sign in via
your app and you get their access token as long as they are a fb user.

2\. i have over 10 fb apps and fb did not have to authorize any of them to be
made public so i am not sure how you got that info. you just click a button to
make the app public. can you clarify?

~~~
detaro
[https://developers.facebook.com/docs/facebook-
login/review/w...](https://developers.facebook.com/docs/facebook-
login/review/what-is-login-review) lists only "public_profile, user_friends
and email" as scopes available without a review, accessing posts seems to
require a different one.

~~~
AznHisoka
do you want users to pipe news from public fb pages like cnn and nytimes? or
feeds from private individuals/friends?

that permission only applies to the latter.

------
no1youknowz
Quite interesting that this just been posted.

I have to produce an events application with a UI similar to this:
[http://i.imgur.com/e0R1Kp5.png](http://i.imgur.com/e0R1Kp5.png)

The UI is already done, so that's not the reason for the post.

My question is, on the backend, is there a pattern I can use to easily execute
the steps?

I know there is a combination of logic, cron, a MQ and a db to hold the flow.
But I am unsure on how best to approach the development of this framework.

Probably if someone is passing by and you've built something like this. I'd
love your input as I'm a bit unsure how to proceed.

I'd really like best practice and implement something that is robust!

Thanks

~~~
rashkov
I think that you're probably looking for a finite state machine. There are a
number of libraries for this, so have a look around and pick one that looks
good. I haven't used it myself but would love to hear about other people's
experiences with them.

~~~
no1youknowz
Thank you for the "finite state machine" mention. I haven't seen this in my
research so far. Will be adding this to the list to look up.

~~~
pstuart
Worth perusing this for thoughts about doing an FSM in go:
[https://talks.golang.org/2011/lex.slide#1](https://talks.golang.org/2011/lex.slide#1)

------
roylez
I have been using huginn for more than one year and I am very satisfied.
What's the difference between huginn and beehive?

~~~
mueslix
huginn is a great project, by all means keep using it! The need for Beehive
originally stemmed from our local hacker space, where we wanted to run a
little daemon for 'home-automation' tasks, with the ability to control it via
IRC. huginn was just too much of a beast for our Raspberry Pi and so we
started hacking away on Beehive.

It's certainly a lot lighter, younger and less feature-complete than huginn -
but it's also a lot easier to deploy and maintain in comparison. It's written
in Golang, if that's your cup of tea, and really easy to extend.

------
aryehof
Documentation doesn't mention it, but this appears to not work on Windows - at
least not out of the box. Annoying to go to the trouble of downloading it to
try, to discover it was never going to work.

~~~
Intermernet
This actually seems to be a problem with certain test fixtures in one of the
dependencies: (github.com/ChimeraCoder/anaconda) .

The offending files are:

json/statuses/show.json?id=404409873170841600

json/statuses/show.json?id=738567564641599489

This occurs because Windows can't have question marks in the file names.

I would suggest creating a pull request, or an issue on that repo asking that
those files be renamed and the test logic be modified to not require the files
to have the question marks (a simple character replacement in the required
tests should probably do the job).

~~~
Intermernet
EDIT: There are some more issues! It uses github.com/guelfey/go.dbus which as
far as I can tell will never really work on Windows.

~~~
mueslix
Update: I've committed a fix that prevents building this bee (freedesktop.org
notification support) on Windows/OSX.

~~~
Intermernet
Nice work :-) Hopefully I'll have some time over the next few days to do some
testing. If I discover any more Windows based issues I'll send you a PR or
create an issue.

------
alrs
If you ask nice, I bet you could get Ari Lerner to give you getbeehive.com.

[https://github.com/auser/beehive](https://github.com/auser/beehive)

~~~
mueslix
I guess it can't harm to ask nicely. Thanks for the tip!

------
andrei_says_
This looks amazing. Thank you for making it available as open source -- I can
see how a vibrant community could ensure quality and up to date modules.

------
smcleod
Neat! I've been looking at a few things similar to this for various purposes
recently, one thing I'd like is some sort of mix of this plus some content
analysis system for managing an email inbox and then performing actions based
on and using the data contained within, for example an email comes in with
some sort of semi-structured data / information - it's contents is analysed,
it's put in some sort of group like a 'this is an SNMP alert' then the data is
formatted / munged into another form of structured / passable days and then
routed off to another email address, I.e. Create a markdown / whatever table,
Look for IP addresses and FQDNs, pair them if they're on the same line and
create an extra column with a human-usable hyperlink, send it on to an email
that logs a ticket in whatever ticket management system is in use at the
receiving end. That's just one simple example I could make up off the top of
my head, but I'd like to easily create some neat logic rules based on the
content and then use some of that content to decide where it should be routed
onto, again to use a ticketing / helpdesk situation as an example just because
it's what I thought of just then - an email comes in and if it contains
certain keywords or phrases a response will be sent back with a table / list
of information to fill out in the form of questions like 'please include the
following information in your reply...' and it might have some basic
information gathering steps for the end user like getting their IP address, OS
etc... then when they reply the system could pickup that data, munge /
transform it into some sort of standard / structured format, do some more
troubleshooting like pinging the IP provided, doing a whois, perhaps relating
the data to a list of clients or something and then passing it on to the right
team or ticketing system via email again. I think the key to this would be to
use something like the OSS product mentioned here that's more modern and
lightweight coupled with a nice query / rule builder interface that's fast and
responsive and easy to test. Business rules / logic apps I've used in big
corps in the past have been a combination, mix of, or all of the following:
slow and resource hungry, proprietary with all forms of vendor lock-in, hard
to build rules and apply them, require up to a whole team to support and
maintain them, and often not technically focused / directed.

------
Kexoth
When I started learning Elixir/Phoenix this type of system was the first thing
that came out of my mind when I was covering the Erlang/BEAM/OTP parts because
of their nature.

If anyone else is interested in starting something similar in Elixir just ping
me :)

