FOSSbot - Free Open Source Steem Voting Bot - Instructions For BeginnerssteemCreated with Sketch.

in #voting7 years ago

Intro

FOSSbot is a free, open source and highly customizable Steem voting bot anyone can run for free and adjust to automatically vote for posts they like.

In this guide I will show you step by step now how to install and start running your own FOSSbot for free in 5 - 15 minutes.

Bots are a somewhat disputed topic on Steem.

Why? 3 reasons mainly I think

1 Some argue that they are filling the blockchain with junk data.
2 Some believe they give the bot owner an unfair advantage over regular human users
3 Some people find any kind of seemingly autonomous acting robot creepy

All 3 are understandable feelings.

But lets think of the bot as an extension of the owner instead of the bot being it's own individual. Suddenly the idea seems much friendlier. Right?

The unfair advantage of running a bot can be eliminated by providing an easy to use open source bot for every Steem user.

@personz has done a great job creating FOSSbot (Free Open Source Steem bot)

You can find FOSSbot on Steemtools http://steemtools.com/ or go straight to the page on Github

https://github.com/Steem-FOSSbot/steem-fossbot-voter

FOSSbot can run as a Heroku app or you can install the docker version on your desktop, laptop, server, toaster, whatever.

Heroku is a Cloud Application Platform that provides free limited accounts. If you just want to run a voting bot or a few, then these free accounts are great.

I was not familiar with Heroku at all. The setup was a bit of a learning process and I'm sure others who have never used Heroku will be a bit confused too.

Don't worry. I'll walk you through it. :) Lets begin!

Install

Create a free Heroku account to host your bot.

https://signup.heroku.com/login

once your email is confirmed and you are signed in you can install FOSSbot.

Follow the link below.

https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/installation.md

You will see a purple button that says "Deploy to Heroku".

Screenshot from 2017-08-20 14-13-51.png

Click on it. This will automatically take you to the Heroku site and begin the installation process.

The Heroku page will look like this

heroku1.png

Here you will have to fill on basic details for your new bot.
First name it whatever you want. I'm naming mine "freshbot23" for now.
you will also need your private Steem posting key .

Find your private posting key by clicking on your Steem wallet. Then click on "permissions" and next to where it says "posting" click on "show private key" to reveal your Steem private posting key.

posting key.png

Then set your configuration details

STEEM_USER:
Your user name goes here, without the "@" symbol.

POSTING_KEY_PRV:
Your private Steem posting key goes here.

BOT_API_KEY:
You can set any alphanumeric password you like to protect your bot settings.

EMAIL_ADDRESS_TO:
Put your email address here if you want to get emails every time the bot votes. I'm leaving mine empty because I don't want the emails.

EMAIL_ADDRESS_SENDER:
You can spoof the email address of the bot but since I don't want emails I'm leaving this empty too.

SENDGRID_API_KEY:
Leave this as default 'none' for now since we are not setting up emails.

COOKIE_SECRET:
Make this a random string to secure your sessions cookies. It doesn't matter what it is but make it unique

VERBOSE_LOGGING:
Here you can set what type of error logs you want the bot to create. Leave off unless you are checking for errors. This will make your bot faster.

Once you have entered these settings you are ready to deploy your bot.

At the bottom of the page you will see a "deploy" button that looks like this:

Screenshot from 2017-08-20 14-52-40.png

Click it and the install will begin.

The install can take a few minutes. When it's done the page will look like this:

deployed.png

Once successfully deployed, click on "manage app" at the bottom of the page

The next page will look like this:

deployed2.png

Congratulations! You have just installed your Steem voting bot. Now we just have to tell it what to vote for.

Click on "Open app" in the top right corner and you will be taken to the FOSSbot configuration page.

Enter the bot API key you set earlier to unlock the configuration page and change settings.

apikey.png

You will see the configuration page unlocked.

Screenshot from 2017-08-20 15-07-13.png

Click on "Edit Algorithm"

Screenshot from 2017-08-26 13-11-42.png

Here you can add custom rules to your bot and edit whitelists or blacklists for authors, categories, keywords and more.

Creating your own algorithm requires a deeper understanding of how the FOSSbot metrics work. I suggest reading the official documentation here:

https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/algorithm.md

Luckily for us, they have also provided some pre made examples here:

https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/usage-guide.md

We will use an algorithm that votes for new "good quality" posts in English by users with "good" reputation.

Scroll down the "Edit Algorithm" page until you see the import box.

import.png

Copy the algorithm / code below into your import box.

{"weights":[{"key":"post_num_words","value":"-0.5","lower":"150","upper":"700"},{"key":"post_num_links_image","value":"10","lower":"0","upper":"5"},{"key":"post_num_links_video","value":"-25"},{"key":"author_repuation","value":"1"},{"key":"post_has_english_language_use","value":"50"}],"authorWhitelist":[],"authorBlacklist":[],"contentCategoryWhitelist":[],"contentCategoryBlacklist":[""],"contentWordWhitelist":[],"contentWordBlacklist":[],"domainWhitelist":[],"domainBlacklist":[]}

Then click on the blue "Import This Algorithm" button.

Now that your algorithm is set we will create a scheduled task to run our bot every hour. For this we will go back to the Heroku dashboard of your application.

The link would be: dashboard.heroku.com/apps/your-bot-name-here

We need to click on "Resources" in the top menu. Then towards the bottom of the next page click on "Heroku Scheduler".

Next click on "Add new job"

shedule.png

In the text box enter this line:

node bot.js

Now select the following options:

Dynosize: Free (if you are using a free plan)

Frequency: Hourly

Next Due: Choose whenever you want.

Click save and your bot will begin running once every hour.

You can track your votes on the FOSSbot dashboard's "Stats" page or visit http://steemd.com/ @ yourname to see your votes on the live blockchain.

Feel free to ask here if you have any questions. I look forward to comments about this or other bot stuff.

You can see my test bot in action here @irbot

Congratulations. You now have your very own bot that works when you sleep :)

I will be learning more about the FOSSbot algorithm and will post instructions on how to install the "docker" version of FOSSbot on your own device without Heroku soon.

I hope you liked this tutorial. You might also like my instructions on uploading videos to IPFS and Steem without having to use and pay Dtube.

https://steemit.com/steem/@camb/piglet-update-2-uploading-video-to-steem-and-ipfs-without-dtube-tutorial-instructions

Please vote @camb for witness https://steemit.com/~witnesses so that I can contribute my resources to securing the Steem network for us all.

Together we are strong!

Sort:  

Impressive! But how the bot can recognize "good quality" with those few markers in place (lenght, number of pics, etc)? In fact, the post could be as well the biggest nonsense, right?

Yes you are right. That is why the bot also uses the reputation marker to make sure the author is not a spammer.

There are a lot more markers you can ad to filter out more nonsese but you will need to learn how to create a custom algorithm or find other pre created algorithms.

You can learn more here: https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/algorithm.md

Many thanks, I will check it out.

Good luck!

how to add comments in boot like my own boot upvote any post upvote and comment but boot this time just upvote not comment any post ?

At the moment the bot does not vote for comments. @personz has said it's easy to do though. I will post instructions as soon as I have it figured out.

Join the conversation on github if you would like this feature. https://github.com/Steem-FOSSbot/steem-fossbot-voter/issues/104

Thanks!
so I have bot with my own config

But after a couple runs and success full voting and after some amendments in "Edit Algorithm" and "Edit Config" I sometimes see an Error like this:

What should I do?
How to debug this?
Test Algorithm with 5 Newest Post works fine, but "Run Bot" ands with error...

DAYS_KEEP_LOGS = 2
But when I view "Last Log" it says :

"Last log
No logs yet, please run bot for first time!"

(Free Heroku)

If you have made any deep mistakes that you can't find while editing the configuration, it might be better to just delete and reinstall your bot since it only takes a few minutes.

Glad to hear it! Good luck.

I would like to check all posts counting from 5 hours to 6 since they were created. How to achieve this on heroku, Is it possible?

You could use the metrics :

post_alive_time: Time since post, in minutes

use min 5 hours and max 6 hours. (in minutes)

Don't worry. I had the same problem.

The Heroku website will time out after 30 seconds. This is why you get the "application error" in your screenshot.

This is not a FOSSbot error really it's Heroku. Sometimes FOSSbot need more than 30 seconds.

The bot should still run and you can verify this on the "stats" page

Either way. If you are running the bot on an automatic schedule then this "application error" / timeout is nothing you need to worry about.

Try out the docker version if you have the time and then you won't even need Heroku.

https://github.com/Steem-FOSSbot/voter-docker

Let me resteem your great posting

Thank you very much! Good luck with your bot!

I will try, thank you very much for your guidance.

Share it forward. Right? As much as you can at least :)

Thanks for writing this 😊

One thing I didn't think of mentioning what that turning off verbose logging does make the bot faster. Good point! I'll add it to the docs.

Well I didn't figure that out myself. It's already in the docs somewhere. :) Thank you for reading my instructions!

@personz is the creator of Foss bot

(For those who don't know)

Oh! Maybe it is 😅 Well good to bring up anyway. Yea the instructions are really good. 😎

Thank you! I feel honored to have your approval.

Please note:

The Github instructions say that there are no instructions to install FOSSbot on desktops yet.

https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/installation.md

heroku.png

But the docker version can obviously be installed on any "toaster" :)

I didn't realize this until a few days ago and for weeks before I was hesitant to try software that required a third party like Heroku.

I have never signed up to Github. Maybe I will try and then I could submit some requests.

Either way, some people are missing out on your great software because the average user might be missing that FOSSbot can easily run locally without Heroku thanks to the docker version.

https://github.com/Steem-FOSSbot/voter-docker

Please include a link to the docker version under the desktop instructions if you find the time.

You're right, it's on the list and I will be doing that very soon. Thanks

Thank you!

Does this bot still work? I tried it and everything works except that it doesnt vote.
-I added 3 users to the whitelist.
-I deleted all minimum requirements to vote
-I got enough points in my account to vote

  • I did test algorythms but it doesn't work.
    -I put the bot on 10 min

The weirdest is that I also don't get any error messages.

Should be working still. Do you have it deployed on Heroku, or what's your platform?

Yes heroku.
MY only key rule for the bot is ''post_any_tag_whitelisted''
I have one tag ''homesteading'' should be giving allot of results fast.

I see that the bot checks every 10 minutes but never decides to vote. The tag homesteading is for sure used many times a day.

I will try my 1 bot this weekend. Please make more exemple for logik, simple follower

There are more examples here. https://github.com/Steem-FOSSbot/steem-fossbot-voter/blob/master/docs/usage-guide.md

To only vote for followed authors you would need this algorithm.

author_is_followed, weight = 1000

is that what you were looking for?

is this bot the same as having a bid bot, i want to make a bid bot that people can find on steembottracker, ive done all the steps here but i dont see how this can be a bid bot and how i can get ppl to bid on it for a vote

Well, Heroku ask me for my credit card, so. I cannot create a bot propperly. Instead, i will use kaggle...

Hey @camb ! :) I have a question. I did everything what you wrote in this post, and in this step " Copy the algorithm / code below into your import box." for you said "We will use an algorithm that votes for new "good quality" posts in English by users with "good" reputation." I did it, and I started a bot BUT the bot upvote someone post who had "37 reputation and nobody upvote him before" i was thinking when I copy the algorithm/code to the import box, my bot will upvote only these users who have "good reputation". Could you help me somehow? What i did wrong?