Irrighino and Yun Rev.2

by luca

Irrighino has been one of my most appreciated projects: it’s a automatic irrigation system – based on Arduino Yun – with a web-based interface, optimized for smartphones.

After having published the project on this blog, it was reviewed by Open Electronics and a dedicated shield was also produced. The shield is still sold on Futurashop:


When it was launched the new Arduino Yun (named Rev.2) and the Yun Shield, the Linux distribution running on the board, OpenWrt, was updated as well. In particular, a key component for Irrighino has been replaced with its newer version, the php engine.

If you own a “first generation” Arduino Yun and you’d like to test the new functionalities shipped with Rev.2, in this post I explain how you can update the operating system of your board!

The commands you have to issue on your Yun to install all the required components for Irrighino now are:

install php with cgi and cli

opkg install php7 php7-cgi php7-cli

install curl, json and sqlite modules

opkg install php7-mod-curl php7-mod-json php7-mod-pdo php7-mod-pdo-sqlite

install zoneinfo

opkg install zoneinfo-core zoneinfo-europe

(replace zoneinfo-europe with the one related to your continent)

Final step is to configure the uhttpd webserver to run the php engine.

Edit the /etc/config/uhttpd file adding the following line (pay attention to its position!):


then restart the webserver with:


Now the Yun is ready to run Irrighino!

Related Posts


Andrea Monday July 15th, 2019 - 03:06 PM

Ciao Luca,
complimenti per il progetto!
Premetto che sono nuovo nel mondo di Arduino, ma sarebbe possibile aumentare il numero di elettrovalvole comandate da 4 a 8?

luca Wednesday July 17th, 2019 - 09:59 AM

Ciao Andrea, si mettendo mano al codice è fattibile… so che altri utenti lo hanno personalizzato per aggiungere anche più elettrovalvole (diventa forse un po’ scomoda la pagina per schedulare i tempi con tante colonne ma si può fare)

Pellumb Saturday May 30th, 2020 - 05:43 PM

Hello Luca! sorry to interrupt your day with an old topic but after few years of using it in my garden i now get this error: Unable to change output status: Unable to call Arduino to manually turn ON output 0, error code: KO_MANUAL
Also have you noticed that there seam to be a bug in your updated github sketch ? This bug makes it impossible to compile the sketch unless quoting out the related error lines: ‘switch4Position’ was not declared in this scope.

luca Monday June 1st, 2020 - 10:53 AM

Hi! Regarding the “KO_MANUAL” error, it means that the physical switch is turned off… Thanks for the comment about the error in the sketch, I’m fixing it.

Alberto Thursday June 11th, 2020 - 03:36 PM

hi Luca, my fun rev2 concert but in the web slider when pulse on / off the warning is Unable to call irrighino? where is the problem? thaksssss

luca Monday June 15th, 2020 - 10:48 AM

Hi Alberto: is the sketch running on Yun? Did you change the default password?

fernando Wednesday June 3rd, 2020 - 06:02 PM

hi Luca, thank for your work, a question please, where is the file for Add the following 3 lines to the crontab (“crontab -e” or through the web interface):

* * * * * /usr/bin/php-cli /www/sd/irrighino/php/irrighinoTask.php
05 00 * * * /usr/bin/php-cli /www/sd/irrighino/php/purgeOldEvents.php
10 00 * * * /usr/bin/php-cli /www/sd/irrighino/php/purgeOldLogs.php


Fernando Thursday June 4th, 2020 - 02:19 PM

sorry, now i locate the file, but now the error is Warning unable to connect irrihino, i change the default password but too in the file include.php

Fernando Friday June 5th, 2020 - 11:18 AM

Hi Luca I still have the problem of warning unable to connect irrighino, I want to use irrighuino only via the web without the physical buttons or the rain sensor, to override the switches in the config.h file “#define USE_SWITCHES false” is correct? and to disable the rain sensor ??? Thank you so much for everything

fernando Sunday June 7th, 2020 - 06:23 PM

sorry the warning is unable to call irrighino, thanks


Leave a Comment

thirteen − 8 =