Sigve Fast
Mar 25, 2014
(5 votes)

The physical Publish Button

What do you do when you are in between projects and got nothing to do? You build a physical publish button using an Arduino of course!

The Arduino is an Open Source electronics prototyping platform ( It basically enables you to program the physical world through sensors, buttons or anything else your heart desires. So using this I am proud to announce that the gap between the physical world and EPiServer is bridged!

I recommend checking out the official arduino blog for more cool projects this wonderful platform has been used for.

See it in action!

Inspired by the “AWSOME button” at Makezine:


Communication between the Arduino and javascript

The Arduino comes with a USB to Serial converter, which means you can communicate with it through the COM port. But how to execute javascript on a webpage every time the button is pressed?

I decided to make a Chrome extension and after some googeling I found this cross platform browser plugin for serial port communication from JavaScript

Chrome Extension
So the way this works is that the background page of the extension opens a connection to the COM port to listen for commands from the Arduino. Every time a command is received it passes it on to the contentscript in the tab that is currently open. The content script receives the command, and if the command is “Publish” it finds the publish button and simulate a click.

Just having the page published was kind of boring. So to give it a little more flare I added some fireworks to celebrate the birth/rebirth of a page. The fireworks code is just an adaptation of the code I found here:

End notes
This was just the simplest and cheapest way of achieving the goal. This could have been done in many other fashions. There are Arduino boards small enough to fit inside the button or the communication could have been done with wifi, ethernet, bluetooth, infrared. You could also make it completely wireless by using batteries as a power source instead of getting power from the arduino board. Only the imagination sets a limit.

Hope you enjoyed this as much as I did making it.

Download full source code here:

For a more comprehensive walkthrough of the process download the complete guide here:

Mar 25, 2014


Petter Klang
Petter Klang Mar 25, 2014 11:03 AM


Always wanted a big red button to push for site launch!

Mar 25, 2014 11:39 AM

You might want to change the label of the button before letting a customer publish their brand new site with it ;-)

Mar 25, 2014 12:08 PM

Next step, add a second green button and connect it to the workflow

valdis Mar 25, 2014 03:44 PM

Sweet! :)

Please login to comment.
Latest blogs
Display Child Pages in Content Delivery API Response

The below example will implement an instance of IContentConverterProvider to customise the serialisation of PageData and output child pages in the...

Minesh Shah (Netcel) | Oct 4, 2022

Bring the Report Center back in Optimizely CMS 12

The Report Center has been a part of Optimizely CMS since its first debut in version 5R2 in 2008, but in CMS 12, it's removed! Don't despair! Make...

Tomas Hensrud Gulla | Oct 4, 2022 | Syndicated blog

Customizing Property Lists in Optimizely CMS

Generic property lists is a cool editorial feature that has gained a lot of popularity - in spite of still being unsupported (officially). But if y...

Allan Thraen | Oct 2, 2022 | Syndicated blog

Optimizely names Luminary Senior Developer, Ynze Nunnink, OMVP

Luminary Senior Developer and Optimizely Lead, Ynze Nunnink has secured the coveted position of Optimizely MVP. Earning a Platinum badge for his...

Ynze | Oct 2, 2022 | Syndicated blog