Hacker News new | past | comments | ask | show | jobs | submit login
PiBakery – a blocks based, easy to use setup tool for Raspberry Pi (pibakery.org)
291 points by trueduke on Sept 7, 2016 | hide | past | favorite | 62 comments



Well known story from Art School:

1) Develop your art installation on Raspberry Pi

2) Test it thoroughly so you know it will be robust

3) Install it in the gallery. Works great. Start organising wine for the private view

4) Come back to find Pi has turned off

5) Start debugging up a step ladder or inside a plinth, with an hour before people start arriving

Turns out the standard install goes to sleep if you don't interact with it for 20 mins, something you'd never think of testing for.

Removing this setting, especially for scripts that run as sudo on boot turns out to be tricky, especially with a keyboard balanced on your knee.

Pi Bakery is a welcome addition to the Pi Ecosystem!

Also, very interested in using this to make hardware dev more accessible to those familiar with web development:

http://webiopi.trouch.com/


> Turns out the standard install goes to sleep if you don't interact with it for 20 mins

Can you cite a source for this? I've used several differnt Pi's for various different purposes, and have never ran into this. In fact up until a couple weeks ago I had one plugged in sitting on my desk that I was using to test something periodically, and it would sometimes sit idle for a couple weeks between connections - but never had a problem with it.

I can find a stackoverflow question filled with people pointing out there is no sleep mode[0], but nothing else about it.


It's been a while, but when I first set up OctoPi, I'd run into the same thing. Would disappear from Wifi after a short amount of time. At the time, I searched and found a directive to prevent something from going to sleep: wireless, USB (wifi dongle), the whole Pi. Endlessly frustrating. But I think/thought this has been resolved for some time.

Exciting project nonetheless and look forward to using it!


I think the Edimax Nano WiFi dongle driver goes to sleep after a while under the default settings.

https://www.raspberrypi.org/forums/viewtopic.php?t=61665


Bingo, that was it!


I had the same thing happen to me with a wifi adapter. I was using the Pi as a server to host ouimeaux (which creates a REST API to toggle Belkin wifi light switches). It worked great, except after an hour of inactivity it would take 1-2 minutes to register an action, before becoming responsive again for the next hour.

Until I properly found out how to disable wifi power saving, I worked around it by just pinging it from another device every 30 minutes to keep it awake.


Presumably the X11 / HDMI interface going to sleep, not the whole thing.


That's correct, it's the display that goes to sleep.


Screen blanking is a very common problem on the default Pi install. I wrote up some fixes here a while ago: https://shutdownscanner.com/blog/posts/raspberry-pi-digital-...

These days you're probably better off using something like Screenly: https://www.screenly.io/ose

I have a fork that I hacked some basic auth into here: https://github.com/jpsingleton/screenly-ose


Totally deserved, because they failed to '2) Test it thoroughly so you know it will be robust'.


Cool project! I also developed a tool for Pi's called Bakery for configuring a Pi from a user interface :). The difference was that it was focused on setting up the Pi as a Gateway device for IoT. I took it down though because our Knight Prototype Grant funding ran out and we didn't have time to maintain it. In case you're interested, our approach was to generate a bash script from input in a web form, then put that script on a USB drive and plug it into a Pi. We rolled our own Pi distro that then looked for new USB drives containing an `autorun.sh` file. We now just teach people how to use the command line to pipe data from devices to the Internet. All of our device and database drivers are actually just CLI so no fancy UI needed... But using these CLIs we made in PiBakery would be really cool way to lower that barrier to entry! If you're interested in taking this tool an IoT direction, check out our wiki at http://openpipekit.github.io/. We do a monthly first Thursday hangout at 8pm (link to hangout at the bottom of the Wiki).


You've actually almost exactly described how PiBakery works - except that PiBakery obviously can write the image as well. Once the image is written, PiBakery just writes some scripts into the /boot/PiBakery/ directory, which is checked by a systemd startup script, and executed.

And if you want to create custom blocks to add in to PiBakery for your own tools/scripts, you're welcome to do that! I have a guide on the PiBakery website - www.pibakery.org/docs/contribute.html - that describes this process that you can look at if you want.


Great idea and the screen shots look great. I love that it is so reminiscent of scratch, which my kids use on the Raspberry Pi now, will be great for helping them set up their own Pis.


Thanks, and yes, the whole ideas was to make it that anyone who's used Scratch (which covers a lot of the Pi community) would be able to instantly use PiBakery.


If anyone has any feedback on PiBakery, I'd love to hear it!


Are there any plans to support different versions of Raspbian (ie. Jessie Light)? Setting up headless pis with only a WiFi dongle (for other people to then use) is something I've often had to do, and setting up that initial connection with a PSK and SSID can be a pain - this would be great for that, though I suspect you'd need some sort of compatibility information added to the block json files.


Having support for Raspbian Lite is possibly the most requested feature right now (along with a block for static IP), and I'm working on that right now. Follow @PiBakery on twitter to get notified of when that update is released!


I have none, except that I felt surprisingly happy while seeing the screenshot on your website. If OSes have been like this from start, many people would be "power users" instead of locked down consumers.


Really nice idea & well executed. I might have to look into this one as I have an art project (for want of a better word) to execute on the pi. I want to make it so that anyone can setup a timelapse, upload it to youtube and then post the link to an aggregating site. TimeLapse the world ;) ... I have it working for me, but it wants more ;)

I see it's not possible to allow user-configuration when the block is being installed, is that something on your road map? Is it possible to have any sort of periphery checking (e.g. does the pi have a camera attached).

Not that it'll matter much either way, I mean you can just set the block up and have it fail gracefully, but I thought I'd ask.

Nice work though - looks really great!


Originally I wanted to have "if" blocks and reporters for whether the Pi had a camera or not, whether it was connected to the internet, etc., but I decided fairly on that this would overcomplicate PiBakery considerably, and so I went with the blocks failing (hopefully gracefully!) instead.

If I have some free time, I may experiment with adding "if" blocks in - although the main disadvantage is that this wouldn't be backwards compatible with previous PiBakery versions, and that's fairly important to me. But I'll see how things go.


Curious, why is backwards compatibility more important to you for this project?


Currently there is no way for me to push updates for the code to PiBakery, but there is a way for me to push block updates. I guess I just don't want the 1500+ people that have downloaded PiBakery to have to redownload PiBakery to get new blocks, if it's possible.

That said, I am looking into an "if" block and then reporter blocks for it, and it may happen in the future.


I take you start from the raspbian base image and customize your rootfs from there.

Maybe take a look at the various debian bootstrap methods then you can create minimal sd-images and even apply some changes to the root fs and partition table before booting the rpi.

This way you could implement encryption of the root partition or specification of partition size etc.

Here is one of the many bootstrap methods: http://liw.fi/vmdebootstrap/


Exactly, I start with the Raspbian Full image and slightly modify it to work with PiBakery. If you want to see exactly what I have changed, I have a GitHub repo of that as well - https://github.com/davidferguson/pibakery-raspbian .

I will be doing the same process with Raspbian Lite (as having a minimal image is the most wanted feature) and allowing users to choose whether they want to use Full or Lite when writing to SD.


The problem I see is that this would work only with linux AFAIK.

Maybe cygwin can help here? Or run this stuff on a virtual system, vagrant, virtual box, qemu... I have no idea how to do this in windows/macos.

Or encourage your users to just ditch those proprietary systems ;)


I didn't find the repo for the website (I even checked for the gh-pages branches), but if I had found it I would have opened a PR to fix http://www.pibakery.org/contribute.html where there is a 200px Octocat but using an 800px image. One can actually watch it draw in as it loads. That's not only suboptimal for your mobile users, but also a pet peeve of mine. :-)

This svg Octocat is 7kb and CC-Attribution-3.0, but it's only the first one I found: https://commons.wikimedia.org/wiki/File:PEO-octocat-1.svg

Thanks so much for the hard work on PiBakery, it seems great!


I'd like to see an option to download just the PiBakery stuff, for those users who already have a Raspbian ISO. Although I do see why Raspbian is included with it (project is geared more towards non-technical users) - it would still be nice to have a O/S-less download option for people who are on metered 'net connections or are using their smartphone data plan, etc. I realize this means having to create a tool or script to combine PiBakery with a pre-existing Raspbian ISO, but I don't see that being all that difficult. Maybe a tool that outputs a bash script or something that will run on first-boot of a default Raspbian install (just spitballing ideas here)?


Sadly PiBakery uses a slightly customised version of Raspbian, so simply using the "standard" Raspberry Pi one wouldn't work. If you know how, you can make the customisations to Raspbian yourself - the changes I made are on the PiBakery-Raspbian GitHub page: https://github.com/davidferguson/pibakery-raspbian


Oh cool! I'm glad you kept that information & data logged and separated out. I can see that being incredibly useful and a great starting point for anyone looking to create some sort of script like that. I wish I had the time, it sounds like it would be interesting to try 'n do. I read further up in the thread that you will in fact soon be supporting the 'Lite' flavor of Raspbian as well -- this should ease up on the download size quite a bit for users who have bandwidth concerns. Great project by the way, thanks for creating it and putting it out there.


First, pretty cool idea! I have to try it, but it looks good at the first glance.

I think you should add a bigger "Download" button to your download documentation (i.e. here: http://www.pibakery.org/docs/install-mac.html).

It's good to have the explanation for beginners, but for people that just want to get the software (and kind of know what they're doing) there should be a bigger button in addition to the text link. :)


I'm currently waiting for my Apple and Windows code signing certificates, which will mean I can ditch the while "How to install" pages and just have the binaries install when you click on the big button on the main downloads page. Sadly this seems to be taking a while (I've been waiting on my Windows certificate over 2 weeks now) but I'm hoping I'll get them soon!


https://blogs.msdn.microsoft.com/windowsstore/2012/11/19/5-t... Microsoft probably just wants you to wait a bit longer


I was disappointed it had nothing to do with Baking ;)

Otherwise it looks good :) Anything that helps lower the barrier to entry for kids and other new comers to the rpi is a good thing in my book.


I like this but I wonder why it needs a download. This should be an as-a-service thing where I can customize my setup online, store it in local storage and then just download either the complete image or a small script that builds the image.


The image itself is customized; it's not a vanilla copy of Raspbian. So, no matter what, you'll end up downloading ~1GB of data (less, when he's got the Lite version built).

One benefit of this, over doing it online: you can download the file+program, disconnect from the net, and customize as many versions of the image as you'd like without extra bandwidth use. There are a lot of Pi users with limited internet access.

Another benefit: Doing it online implies at least a two step process. Go to the site and build a setup (with either an account system or an import/export feature to save progress and make it available for re-use), tell it to build the image, download it, and use a separate program to flash. Doing it through a native app eliminates the separate program and the question of whether or not you need to create an account on their service. Plus, when their site goes down eventually, I've still got a working, independent program. When they introduce a new version, I've got the option to stick with what I've got or upgrade (if I judge it to actually be an upgrade).

Web apps have their place. This thing is one that makes more sense as a local app to me.


I did have a concept of this at one point - but I was concerned that internet speeds would prevent that from working as well as it could.


Love the idea as well! I'm not able to test this right now, but I was wondering if there's a block for setting up an encrypted Pi? If so: awesome! If not: are there plans to implement it?


It's not a block I had previously considered, but any block can be added in!

What exactly do you mean by encrypted pi? The entire SD encrypted, one partition encrypted, or something else? If you have a script that does something like this, feel free to submit a block for it (guide at http://www.pibakery.org/docs/contribute.html) or send me the script and I can add it in for you.

Thanks for your interest in PiBakery!


Either the whole disk or the user partition, such that when the device gets stolen no useful information can be extracted from it. I don't have a script; I used berryboot to encrypt the SD card in the past. I'm not a good coder but I'll try to make something work


Will future generations of this allow you to download your own raspbian image then run it - versus having the bloat?

Great product will definitely be using this today!


Adding in your own image will (almost certainly) never be supported, but I am right now adding in Raspbian lite, as that seems to be a universally wanted feature. Follow @PiBakery on twitter for news on when I release it!


This is great! Any plans to allow for window resizing on Win10 systems (and others if not yet implemented)?


I'll be adding that in the next update - I have it nearly working in my testing version!


Nice idea, however now I am starring the download and I see PiBaekry.Setup.exe 1.0GB? Just to generate couple of scripts, which is basically what I would need!?


From the downloads page: > Please note that both the Mac and Windows version are very large, as they contain Raspbian, the Raspberry Pi operating system. Therefore these downloads may take some time to download, depending on the speed of your internet connection.

Perhaps overload, but there you go!


Makes sense for a non-technical user (One not versed in Linux-Fu) oriented software.

It could be made to download the distribution from the internet, but that introduces more failure states you'd have to handle and explain to a user in clear language.


I used it yesterday then posted the link to HN since I was so pleased and excited. https://news.ycombinator.com/item?id=12437126

I do classes on the Pi, the ability to set them up for class will make a huge difference.


Glad you like PiBakery - one of it's inspirations was actually for the Raspberry Pi club I run at school. Hopefully it'll make your life a bit easier!


Great idea! This should help in introducing kids to the idea of OS customisation, with various start up configurations for different applications.

Once they start with this, they would be in a better position to appreciate start up scripts and other OS tweaking. :-)


Reminds me of the Snap programming language: http://snap.berkeley.edu/


That would make sense, as Snap was based off Scratch, and Blockly (what I use) was also based off Scratch.


I thought it looked familiar! I briefly experimented with using Blockly to simplify testing at work.


This is exactly what I need. We have about 20 PI's for our kids coding club and need to set them up for VNC. Well done PiBakery.


This is a great idea. It strikes me that more of the Raspbian configuration ought to be done in this manner.


Such bad timing :-) Not ten minutes ago, I just ordered a USB keyboard to setup my new Raspberry Pi 3! Let me add to the others that this is a great idea.


Brilliant approach towards displaying configuration. I feel in love with the presentation. It just makes sense. Definitely "borrowing" the idea. :)


All the code is on GitHub, so feel free! http://github.com/davidferguson/pibakery


Good idea! I've been experimenting with using Blockly for ops/config management as well but focusing on raspberry pi is a much better fit.


Does this only configure Wifi or can you also setup Wired (eth0) connections and is static IP address support (wifi and wired) baked in or only DHCP?


A block for setting a static IP is in the making - follow @PiBakery on twitter to find out when I push out that update!

There is, however, a block for running custom commands (as root or pi user) so maybe you would be able to use that in the meantime?


I just use ansible to configure my raspberries :) But great tool in my opinion. Good to see windows version present.


Where was this some months ago when I had to do some ninja rpi bash scripting?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: