Rocking our baby daughter to sleep on the blockchain powered cradle rocker.

in #steemhacks6 years ago

Birth of the Steem Blockchain Baby Rocking Cradle

A while ago I was hacking on the Bluetooth enabled Duplo train of my son. As our (now about half a year old daughter) is almost outgrowing her baby cradle I still wanted to give this other Bluetooth hack one more shot!

Screenshot 2019-04-04 at 18.19.56.png

A couple of months ago we bought this E-Leon automatic rocking device. A nice invention for lazy parents like ourselves. Intended to be used for baby strollers, but we mostly use it for rocking the good old family owned cradle instead on a makeshift, but totally secure setup as you can see :) The E-leon rocking device is a battery powered slider, controlled using Bluetooth Low Energy through an accompanying app in which you can pick several rocking modes, sliding speed and so on.

Now when I see Bluetooth, I think 'let's try to hack this thing!'. So I thought, what would it take to turn this device into a Blockchain Powered Baby Rocking Cradle, to showcase the diversity of use cases of the Steem chain once more :)

I picked the Steem chain, because of it's abundance of developer tools, one can simply use basic REST API's to query the chain, the chain has fast blocktimes of 3 seconds and I am a huge fan of the diverse community.

Scroll down for the video if you want to skip all the technical mumbo jumbo!

Here is how I got it all working:

Step 1. Reverse engineer the accompanying Baby rocking app from the E-leon device. I simply pulled the app's APK package from my phone and unzipped it to explore its contents. It happened to be a cordova hybrid HTML app which had it's source code unencrypted so I could quickly discover the needed Bluetooth UUID's for the rocking slider's so-called services and characteristics and the appropriate values to call.

Step 2. Get the Bluetooth working with my computer instead of the E-leon app. Using a node package for Bluetooth callednobe, I discovered the Bluetooth UUID of the E-leon rocking slide. Then I fumbled around by using the services and characteristic's UUIDs found in the app's source and explored the app's source code some more to learn about the possibilities and appropriate values of the baby rocking slide.

Step 3. Hook up the Steem chain and interpret the data. For this project I could use two data points: Amount of transactions per block and whenever I (the daddy) signed a block (Randomly, but roughly at least every minute). Using the dsteem node package I got this working in a flash and before I knew it the Steem Blockchain Baby Rocking Cradle was born!

Walkthrough of the demo-video:

  1. Launching the script on the computer.
  2. Put the baby in the cradle.
  3. Enabling bluetooth discovery on the rocker
  4. Computer and rocker pair.
  5. Steem chain is being connected.
  6. Blocks start streaming in.
  7. Speed of the rocker gets adjusted based on the amount of transactions per block versus the average amount of transactions per block.
  8. Whenevery "Daddy" signs a block the Rocking mode changes.
  9. Theoretically the Baby falls asleep dreaming of a decentralised world.

DEMO-VIDEO


The node script (dependencies are dsteem and noble package) are available on my github and the E-leon device can be bought here. (page in dutch :().

Ps. our daughter just slept 2 hours straight on the Steem Blockchain :) - while I was editing the demo-video haha.

Other Steemprojects by me:

If you like what I do, consider supporting my witness @roelandp

See you on the chain, @roelandp

Sort:  

The same thing on the EOS blockchain, with a block produced every 0.5 second:

image.gif

It's definitly safer to stay on Steem!

Now that's funny right there.

Posted using Partiko Android

rolfmao hahha

hahahahah OMG! i cant stop laughing here, im dying hahahaha

LoooooooL !
#steem ♨ On ♩♬

Posted using Partiko Android

Ahahah good one!

Posted using Partiko Android

Lol OMG i hope its just a doll

Not sure whether this Steem Baby Rocking Cradle or BTC trading on Steem Engine is today's coolest new Steem application. :-)

hahahah best post of the day! this is superb and your little babe is just adorable!

First SteemWhale, now SteemRocker? Just don't add a live stream, people will do bets how long it takes for the baby to throw up.
:P

A Rube Goldberg cradle rocker! Why didn't I think of that? ;-)

When steem moons again she is gonna get quite a rocking ... maybe need a seat belt for that genius contraption!! Well done Roeland :)

Fantastic idea 😅🤟

Congratulations @roelandp!
Your post was mentioned in the Steem Hit Parade in the following category:

  • Pending payout - Ranked 9 with $ 100,07

This is so damn cool and even funny.

So, the Daddy has to get a !BEER for his wonderful work and his "hopefully" now sleeping daughter!

Your @detlev

Roelandp. This was brilliant and innovative!

Posted using Partiko Android