This connector was not updated to the new version of the API of the Zipabox.
If you like to continue the work done until now, please contact me in order to give you the rights. I am not able to maintain it in the future.
Introduction
In this page, there are two parts, the first one about the Zipabox connector to get somes graphs on open.sen.se and the second one about a virtual sensor SUN (Day/Night).
Zipabox
The goal of this project is to export data from a Zipabox to Open.Sen.se. For example to display graphics of the temperature or the electricity consumption...
I wrote a python script called Zipabox.py. It requires the file config.ini, I added a config.ini example file. This script is using some library that are included in the zip file.
I am going to explain how to use it on a raspberry pi. You can use it on a PC Windows, Linux, NAS Synology...
Pre-Requirements
Python is already installed on raspbmc. The version used is 2.7.x. Otherwise you can download python 2.7 >
You need an Open.Sen.se account, a device already configured with some feeds.
How to install
- download the zip and extract the zip that you can found on this project
- rename the file config.ini.example into config.ini
- edit the file config.ini to set-up your zipabox username, password, your Open.sen.se API key
- fill the mapping uuid = feed in the config.ini; you can find your the uuid of the device on the API page of Zipato of by running this script and watching the logs (watch for NO_FEED)
- set-up execution rights on zipabox.sh : chmod ugo+x zipabox.sh
- run zipabox.sh : ./zipabox.sh
- Your password will be encrypted with SHA1 and store in the config file. The original password will be removed automatically from the file.
- I added a shell script to include it easily in a crontab (under linux). A crontab is useful to run a command recurrently, example to run it every 30 minutes
\*/30 * * * * /home/pi/Zipabox/zipabox.sh > /tmp/zipabox.log 2>&1
- offline-feed is used to track the offline devices, as in this example:

- Is it possible to set as parameters the type of devices to send for example CUMULATIVE_CONSUMPTION.It takes a list of types separated by spaces. For example : python Zipabox.py CUMULATIVE_CONSUMPTION. In this case it is possible to run at different times the process, for example :
\*/30 * * * * /home/pi/Zipabox/zipabox.sh > /tmp/zipabox.log 2>&1
0 1 * * * /home/pi/Zipabox/zipaboxCumulativeConsumption.sh > /tmp/zipabox.log 2>&1
Sun
This part is used to have a virtual sensor that is activated or unactivated with the SUN (Sunrise and Sunset) without any external website. It is processed by the script.
Pre-Requirements
Python 2.7 (see Zipabox module)
How to install
The module is using the same config file with another part called SUN.
- download the zip and extract the zip that you can found on this project
- rename the file config.ini.example into config.ini
- create your virtual sensor on the zipabox and get the URLs
- edit the file config.ini to set-up the [SUN]
- set-up execution rights on sunsensor.sh : chmod ugo+x sunsensor.sh
- run zipabox.sh : ./sunsensor.sh
- Time zone: the list is available at http://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default value is "Europe/Paris"
- The latitude and longitude where the box is. A list is available at http://pgj.pagesperso-orange.fr/latlong.htm, use decimals. Default value is Toulouse (latitude=43.617, longitude=1.450)
- The URL to set DAY/NIGHT. On the zipabox, use a virtual sensor and display its parameters, you will find the URLs. Choose the one you want for DAY/NIGHT. I used a virtual sensor called SUN so the ON means DAY and OFF means NIGHT
- Delay (optional): This is used to delayed the SUNRISE/SUNSET, so to activate the sensor before (negative) or after (positive value) the sunrise/sunset. The value is in minutes.
- sun sensor (optional) : This is used to get the state of this sensor and send a request only if necessary. It lists the sensors if this is not defined.
- I added a shell script to include it easily in a crontab (under linux). A crontab is useful to run a command recurrently, example to run it every 5 minutes
\*/5 * * * * /home/pi/Zipabox/sunsensor.sh > /tmp/sunsensor.log 2>&1
- It is possible to optimize the crontab to run it only at the time where the sunrise/sunset can appear
\*/5 6,7,8,9,17,18,19,20,21,22 * * * /home/pi/Zipabox/sunsensor.sh > /tmp/sunsensor.log 2>&1