<html> <h1>Steempi is talking!</h1> <p>One of the smarthome like features that would be nice to have is that Steempi could talk, once this feature is integrated it can notify "New upvote", "New comment" "New transfer" and it could even read replies for us. and possible do other things in the future.</p> <p>i have played around a bit with speech to text before on my other Raspberry Pi robotic project, and using and integrating speech to text to a project is not that difficult, and easy to install.</p> <p>It would be nice if STEEMPI beside blinking the notification LED also can give spoken notifications.</p> <p>In this update i will share the struggle and results of the past few days to try and make those things work and hope you have some feedback to solve the issues.</p> <p>(im not a good programmer but have big passion for technology and want to make this work for all of us)</p> <h2>https://steemitimages.com/DQmPVgFkpCHzCW6o43hRionaWouTiB6i9WYWLoYfTQZwmJE/coding-01.jpg </h2> <h2>Making Steempi talk</h2> <p>To make Steempi talk its first few words, sentences and commands i used a program called "<em>festival</em>"</p> <h2>How does it work</h2> <p>Instead of echo the results to the screen we can use echo to <em>Festival</em>, and <em>Festival</em> will use text to speech to read the results which can be heard on the connected speakers. </p> <p>(on TV speakers over HDMI or speakers connected to the 3,5mm jack)<br> </p> <p>Installing festival:<strong><br> </strong><code>sudo apt-get install festival</code></p> <p>Example command to speak a sentence:<br> <code>echo Just what do you think youre doing, Dave? | festival --tts</code> </p> <p>Example command to speak out the IP address of the Pi:<br> <code>hostname -I | festival --tts</code></p> <h2>https://steemitimages.com/DQmW4n37BrX94Dv1YNSArxqBVij5zpEeJHr2ssrcuVdZxbf/image.png</h2> <h2>Progress on blinking the led on new upvotes / replies and transfers</h2> <p>The best way probably is to use the Steemit api, SteemSQL or Steemdata. i have looked into the tutorials here on Steemit and have asked around and try implement them but i could not adjust the given methods so i searched for a work around.</p> <p>The first work around i tried to get information from Steemit.com was to use a website called IFTTT to forward the new replies to my email. but this approach updates to slow to be useable for this project.</p> <p>The other work around i tried is with Curl, Curl can check a website for changes and it should be possible to compare 2 websites.</p> <p>If the website changes, it could run a command (the LED on command.)</p> <p>This would be more preferable than the first work around because it is more pure and running on the PI instead of a external website.</p> <p>Found this Curl Bash script that had good ratings:</p> <p><code>#!/bin/bash<br> while [ 1 ];<br> do<br> count=`curl -s "www.nba.com" | grep -c "Basketball"`<br> if [ "$count" != "0" ]<br> then<br> echo "www.nba.com updated!"<br> exit 0 <br> fi<br> sleep 600 <br> done</code></p> <p><br></p> <p>And changed it to:</p> <p><code>#!/bin/bash<br> while [ 1 ];<br> do<br> count=`curl -s "https://steemit.com/@techtek/comments" | grep -c "RE:"`<br> if [ "$count" != "0" ]<br> then<br> echo "New Reply to your account"<br> exit 0 <br> fi<br> sleep 600 <br> done</code></p> <p>It runs but i think it doesn't work because of the https://steemit.com/@techtek/comments website doesn't have a preloaded end, and counting "RE:" will always result in the same result for that reason .(?)</p> <h2>Other options</h2> <p>Other software beside <em>Curl</em> that can maybe solve the problem and check steemit.com for changes and possibly blink the LED on website changes are: <em>urlwatch, Specto and Newsbeuter</em>. a other and probably more prefurable way would be with <em>SteemSQL</em> and <em>PHP</em>.<br> <br> To control the LED from within PHP i made this simple PHP example to blink the LED that is connected to the Raspberry Pi board:</p> <h3>PHP LED Example:<br> </h3> <p><code><?php<br> // make pin 0 a output pin<br> exec('gpio mode 0 out');</code></p> <p><code>// turn pin 0 on and off (blink x3 with one second interval)<br> exec('gpio write 0 1');<br> sleep(1);<br> exec('gpio write 0 0');<br> sleep(1);<br> exec('gpio write 0 1');<br> sleep(1);<br> exec('gpio write 0 0');<br> sleep(1);<br> exec('gpio write 0 1');<br> sleep(1);<br> exec('gpio write 0 0');<br> ?></code></p> <p><br></p> <p>Having automated Steemit LED notification is come closer and a few first options are available to play around with, can you make it work and make it become a reality Do you know how to connect with for example SteemSQL and make the LED blink on new upvotes, replies and transfers ?</p> <h2>Do you know how to light up this project , (and literally my day)</h2> <p>it should be possible with some simple but smart solution, and a few lines of code, in a Bash script or from within PHP with SteemSQL.<br> </p> <h2>Let's get in touch and work together !</h2> <p>The Steempi project as well as my other projects are time consuming and I always try to provide some unique things to the community. What keeps me going is your feedback, comments and support. For that reason I would very much like to get some feedback from you, and please feel free to contact me.<br> <br> Please help and participate, what solution can you implement or suggest to blink the LED, and make SteemPi (Festival) be more informative and dynamic with her notifications?<br> <br> More about this project:<br> <a href="https://steemit.com/steemit/@techtek/introducing-steempi-steem-notifications-on-your-tv">"Introducing STEEMPI"</a><br> "<a href="https://steemit.com/steemit/@techtek/diy-steempi-case-with-3d-printed-side-panel-and-steem-logo-that-can-light-up">3d printed case with Steemit logo"</a> <br> </p> <p><br> https://steemitimages.com/0x0/https://steemitimages.com/DQmVBUmEbFwZ9ts6H8HtW2PwBUJdGAEPxc6ARHXU1M9aEEM/intro%20case-2-01.jpg</p> <p><br></p> </html>
author | techtek |
---|---|
permlink | steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php |
category | steemdev |
json_metadata | {"tags":["steemdev","programming","technology","linux","php"],"image":["https://steemitimages.com/DQmPVgFkpCHzCW6o43hRionaWouTiB6i9WYWLoYfTQZwmJE/coding-01.jpg","https://steemitimages.com/DQmW4n37BrX94Dv1YNSArxqBVij5zpEeJHr2ssrcuVdZxbf/image.png","https://steemitimages.com/0x0/https://steemitimages.com/DQmVBUmEbFwZ9ts6H8HtW2PwBUJdGAEPxc6ARHXU1M9aEEM/intro%20case-2-01.jpg"],"links":["https://steemit.com/@techtek/comments","https://steemit.com/steemit/@techtek/introducing-steempi-steem-notifications-on-your-tv","https://steemit.com/steemit/@techtek/diy-steempi-case-with-3d-printed-side-panel-and-steem-logo-that-can-light-up"],"app":"steemit/0.1","format":"html"} |
created | 2017-08-13 18:56:27 |
last_update | 2017-08-13 20:34:30 |
depth | 0 |
children | 13 |
last_payout | 2017-08-20 18:56:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 75.008 HBD |
curator_payout_value | 24.541 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 6,499 |
author_reputation | 28,283,249,927,543 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,712,376 |
net_rshares | 30,584,076,027,190 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
berkah | 0 | 50,035,496,631 | 8% | ||
team | 0 | 81,645,314,951 | 10% | ||
pnc | 0 | 25,356,462,410 | 8% | ||
teamsteem | 0 | 1,203,590,886,140 | 8% | ||
cheftony | 0 | 6,928,014,745 | 3% | ||
lauralemons | 0 | 2,610,563,680 | 4% | ||
hitmeasap | 0 | 1,640,871,560 | 8% | ||
ausbitbank | 0 | 1,769,553,752,235 | 16% | ||
transisto | 0 | 11,482,947,724,338 | 100% | ||
magicmonk | 0 | 21,516,471,081 | 100% | ||
azizbd | 0 | 367,352,059 | 25% | ||
lamech-m | 0 | 1,396,936,564 | 8% | ||
samstonehill | 0 | 37,896,459,811 | 25% | ||
runridefly | 0 | 16,103,366,736 | 3% | ||
holoz0r | 0 | 1,999,468,415 | 5% | ||
swisswatcher | 0 | 14,114,756,484 | 8% | ||
blhz | 0 | 5,947,441,342 | 100% | ||
chaifm | 0 | 545,534,192 | 100% | ||
discordia | 0 | 243,804,777,511 | 21.78% | ||
edje | 0 | 26,243,465,000 | 25% | ||
banjo | 0 | 275,268,104 | 1% | ||
businesswri | 0 | 8,537,557,286 | 25% | ||
gogumacat | 0 | 1,106,784,682,091 | 30% | ||
awesomianist | 0 | 1,075,644,483 | 2.4% | ||
greenstar | 0 | 6,265,716,111 | 8% | ||
siddartha | 0 | 355,014,543 | 8% | ||
goodmorning | 0 | 17,865,562,850 | 100% | ||
nerdylab | 0 | 2,168,660,100 | 100% | ||
newsflash | 0 | 14,060,819,754,326 | 100% | ||
orionsbelt | 0 | 3,400,024,221 | 20% | ||
khairulmuammar | 0 | 337,196,221 | 100% | ||
davidk | 0 | 2,491,854,029 | 100% | ||
booster | 0 | 251,503,867,537 | 0.97% | ||
drakos | 0 | 51,601,740,946 | 100% | ||
stresskiller | 0 | 3,045,799,840 | 100% | ||
samuelsunday | 0 | 155,550,991 | 100% | ||
pilcrow | 0 | 24,347,353,924 | 50% | ||
funfacts | 0 | 469,752,582 | 25% | ||
oregonpop | 0 | 24,733,557,848 | 25% | ||
boucaron | 0 | 518,092,203 | 100% | ||
znaffe | 0 | 5,277,700,407 | 25% | ||
steemmeupscotty | 0 | 2,060,721,274 | 8% | ||
alexandruionescu | 0 | 380,285,875 | 25% | ||
fiftyeleven | 0 | 188,953,600 | 100% | ||
followforupvotes | 0 | 6,990,065,432 | 61% | ||
ronnybat | 0 | 142,727,087 | 25% | ||
aek081969 | 0 | 62,944,484 | 100% | ||
charline | 0 | 374,809,600 | 100% | ||
beet | 0 | 1,029,586,374 | 5% | ||
techtek | 0 | 956,490,978 | 100% | ||
steemhoops99 | 0 | 101,750,190 | 100% | ||
nazarul | 0 | 69,017,939 | 100% | ||
bokeh | 0 | 413,159,217 | 100% | ||
carmenhk | 0 | 585,446,400 | 100% | ||
chillimilli786 | 0 | 1,527,337,541 | 100% | ||
randyw | 0 | 932,565,474 | 100% | ||
maxxx | 0 | 1,160,648,258 | 100% | ||
arsen131976 | 0 | 824,050,939 | 100% |
<p>This post has received a 0.98 % upvote from @booster thanks to: @techtek.</p>
author | booster |
---|---|
permlink | re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170813t221145664z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"drotto/0.0.1"} |
created | 2017-08-13 22:12:00 |
last_update | 2017-08-13 22:12:00 |
depth | 1 |
children | 0 |
last_payout | 2017-08-20 22:12:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 81 |
author_reputation | 68,767,115,776,562 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,724,994 |
net_rshares | 0 |
May be you can have a look to [piston-cli](http://cli.piston.rocks/en/develop/), it will probably help you to prototype a few things. Follows the link to the [commands](http://cli.piston.rocks/en/develop/app.html#available-commands).
author | boucaron |
---|---|
permlink | re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170813t202819470z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"links":["http://cli.piston.rocks/en/develop/","http://cli.piston.rocks/en/develop/app.html#available-commands"],"app":"steemit/0.1"} |
created | 2017-08-13 20:28:18 |
last_update | 2017-08-13 20:28:18 |
depth | 1 |
children | 8 |
last_payout | 2017-08-20 20:28:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 233 |
author_reputation | 3,973,467,197,811 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,718,293 |
net_rshares | 859,767,171 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
techtek | 0 | 859,767,171 | 100% |
Example: **piston read "@techtek/steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php" --comments**
author | boucaron |
---|---|
permlink | re-boucaron-re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170813t203243391z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-13 20:32:42 |
last_update | 2017-08-13 20:32:42 |
depth | 2 |
children | 7 |
last_payout | 2017-08-20 20:32:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 164 |
author_reputation | 3,973,467,197,811 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,718,572 |
net_rshares | 838,272,992 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
techtek | 0 | 838,272,992 | 100% |
Thanks for your reply, installation went ok "pip3 install --user steem-piston" but when i try to do "piston addkey" it gives this error pi@raspberrypi:~ $ piston addkey Traceback (most recent call last): File "/usr/local/bin/piston", line 5, in module from pkg_resources import load_entry_point File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2876, in module working_set = WorkingSet._build_master() File "/usr/lib/python3/dist-packages/pkg_resources.py", line 449, in _build_master ws.require(__requires__) File "/usr/lib/python3/dist-packages/pkg_resources.py", line 745, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3/dist-packages/pkg_resources.py", line 639, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: pycrypto>=2.6.1 When i check the python version its 2.7.9 When i tr to install python 3 it says latest version already installed
author | techtek |
---|---|
permlink | re-boucaron-re-boucaron-re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170813t212023672z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-13 21:20:42 |
last_update | 2017-08-13 21:39:30 |
depth | 3 |
children | 6 |
last_payout | 2017-08-20 21:20:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 963 |
author_reputation | 28,283,249,927,543 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,721,713 |
net_rshares | 784,537,544 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
techtek | 0 | 784,537,544 | 100% |
thank you for information friend
author | khairulmuammar |
---|---|
permlink | re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170813t222802792z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-13 22:28:06 |
last_update | 2017-08-13 22:28:06 |
depth | 1 |
children | 0 |
last_payout | 2017-08-20 22:28:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 32 |
author_reputation | 39,565,193,840,277 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,725,951 |
net_rshares | 526,607,392 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
techtek | 0 | 526,607,392 | 100% |
my first experience with text to speech was on an amiga 500 :) back in 1987 i think it was. it looks like a fun project , good luck
author | stresskiller |
---|---|
permlink | re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170815t162007720z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-08-15 16:20:06 |
last_update | 2017-08-15 16:20:06 |
depth | 1 |
children | 0 |
last_payout | 2017-08-22 16:20:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 132 |
author_reputation | 110,298,241,051,603 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,894,485 |
net_rshares | 0 |
Just found this new tutorial in the Steemit chat "steemsql channel" The tutorial has a example code to connect to SteemSQL and this works, now again a bit more close to making the notification work! Thanks @magicmonk ! https://steemit.com/cn/@magicmonk/php-steemsql-using-php-to-connect-to-the-steemsql-database
author | techtek |
---|---|
permlink | re-techtek-steempi-is-talking-a-few-possible-solutions-for-blinking-the-led-on-updates-help-needed-curl-steemsql-bash-script-php-20170814t035314453z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"users":["magicmonk"],"app":"steemit/0.1","links":["https://steemit.com/cn/@magicmonk/php-steemsql-using-php-to-connect-to-the-steemsql-database"]} |
created | 2017-08-14 03:53:33 |
last_update | 2017-08-14 03:54:24 |
depth | 1 |
children | 0 |
last_payout | 2017-08-21 03:53:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 316 |
author_reputation | 28,283,249,927,543 |
root_title | "STEEMPI is Talking! + a few possible solutions for blinking the LED on updates (Help needed Curl/Steemsql/Bash script/PHP)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 11,744,571 |
net_rshares | 343,906,868 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
techtek | 0 | 343,906,868 | 100% |