{"id":16700185,"url":"https://github.com/guyzmo/polluxnzcity","last_synced_at":"2025-07-05T15:03:04.300Z","repository":{"id":7398960,"uuid":"8729062","full_name":"guyzmo/polluxnzcity","owner":"guyzmo","description":"Pollux'NZ City project's repository","archived":false,"fork":false,"pushed_at":"2013-03-13T13:15:09.000Z","size":1120,"stargazers_count":4,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T00:11:16.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guyzmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-12T14:00:16.000Z","updated_at":"2022-10-15T09:24:47.000Z","dependencies_parsed_at":"2022-09-03T09:23:58.683Z","dependency_job_id":null,"html_url":"https://github.com/guyzmo/polluxnzcity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyzmo%2Fpolluxnzcity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyzmo%2Fpolluxnzcity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyzmo%2Fpolluxnzcity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyzmo%2Fpolluxnzcity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guyzmo","download_url":"https://codeload.github.com/guyzmo/polluxnzcity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254522063,"owners_count":22085028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T18:09:41.689Z","updated_at":"2025-05-16T11:32:00.311Z","avatar_url":"https://github.com/guyzmo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nPollux'NZ City Project\n======================\n\nThe pollux'NZ City project aims at creating a network of autonomous wireless network\nof sensors that uploads the measures on any data silos on Internet.\n\nThis repository contains the source code of the first prototype of the project, that\nhas been deployed  in south of France, with the participation of INRIA Sofia Antipolis,\nfor a first test run.\n\nDescription\n===========\n\nThe projects is made of two modules:\n * the 'autonomous measuring module', that is made of\n   * an arduino with a zigbee radio module ;\n   * a battery pack that powers the system ;\n   * a solar panel that charges the battery ;\n   * an i2c network of sensors.\n * the 'gateway module', that is made of\n   * a beaglebone with a zigbee radio module\n\nHow it works ?\n==============\n\nFirst, after pluging it in, the user configures the gateway module for his sensor \nnetwork and the interval time between two measures. Then he places the autonomous\nsensor module to the best sunlight exposure so the autonomous measuring module can\nkeep the battery filled up.\n\nThe gateway will wait for the given interval time, and waken up the measuring module.\nIt will then order the measuring module to run the fan, so a free air sample is taken\ninto the box and run in sequence each sensor to get the measured value. Once all the\nsensors have been interrogated, it will tell the measuring module to shut itself down.\nFinally, all the measures are given to the enabled plugins that will push the data to\nevery configured data silo.\n\nProject details\n===============\n\nStructure of the project\n------------------------\n\n * Directories\n\n\u003cpre\u003e\nPolluxNZCity\n    |-- PolluxConfig ............. Contains the configuration plugin (in python)\n    |   |-- debian ............... Helper files for package generation\n    |   |-- pollux ............... Python module\n    |-- PolluxGateway ............ Main program that interfaces with the measuring modules\n    |   |-- conf ................. Configuration files that are to be deployed in /etc\n    |   |-- extensions ........... Python plugins for uploading data to data silos\n    |   |-- include .............. Headers\n    |   |-- src .................. Sources\n    |   `-- tests ................ Tools that helps testing\n    |-- PolluxWakeupduino ........ Main firmware code for the arduino in the measuring module\n    |-- PolluxSensorBoard ........ Firmware code for the fan, temperature and noise board\n    |-- PolluxSensorDust ......... Firmware code for the dust board\n    |-- PolluxSensorSensoric ..... Firmware code for the electrochemical sensoric sensors board\n    |-- PolluxSensorTemp ......... Firmware code for the external temperature sensor board\n    `-- PolluxContribIpks ........ Helper scripts to build binary packages (for angstrom)\n\u003c/pre\u003e\n\n * Branches\n   * inria_branch: contains the source code deployed for the INRIA test run\n   * i2c_refactoring: non-tested base for a full refactoring of the i2c network\n\n * Other\n\nIn PolluxContribIpks, the package.sh script will run a build and generate the packages\n– PolluxConfig and PolluxGateway – that are embedded on the beaglebone. That generator\nis now deprecated, the recipes for generating those packages working and being accessible\nfor the angstrom build system.\n\nDescription of the main modules\n-------------------------------\n\n* _PolluxConfig_: this module is a web application based on the `bottle.py` module that\n  exposes RESTful pathes to the web interface that exposes them using `bootstrap.js`.\n  The most important parts are in the `pollux_config` module that contains all the exposed\n  routes.\n* _PolluxGateway_: this module is the main program that parses the configuration, runs \n  the radio, interrogates every sensor on the distant modules and sends the results\n  through every datastore module.\n* _PolluxWakeUpduino_: this firmware is the code executed by the embedded arduino that\n  is only a gateway between XBee and the i2c network.\n\nThe _PolluxGateway_ module has documentation embedded you can generate using `doxygen`,\nor by running `make doc` in the directory.\n\nBuild and Install\n-----------------\n\n* _PolluxConfig_\n\n\u003cpre\u003e\n % cd PolluxConfig\n % python bootstrap.py\n % bin/buildout\n % bin/pollux_config_paster\n\u003c/pre\u003e\n\n* _PolluxGateway_\n\nfirst you will need to install the arm-gcc for crosscompilation, or run it directly\non a beaglebone, using native gcc.\n\n\u003cpre\u003e\n % make\n % make doc\n % pollux\\_gateway -h\n\u003c/pre\u003e\n\nfor a more verbose version of the software, you can run `make verbose`, that will\ncreate a `pollux\\_gateway\\_verbose` executable.\n\nCaveats\n=======\n\n* The I2C model has been mis-designed. \n\nWe have implemented the i2c stack of the whole project following the way the i2c model\nhas been implemented in the Arduino and ATTiny wire library suggested ; so we followed\na function calling alike protocol.\n\nBut we rapidely found out that this kind of implementation is flawed for our use of \ni2c, as it is not flexible enough and not compatible with most of the i2c modules of\nthe market. So there's a unfinished implementation of the new i2c handling in the\n`i2c_refactoring` branch. That has been not tested at all, and not all the sensors'\nfirmware has been switched to it.\n\n* The _PolluxGateway_ modules deserves better verbosity\n\nFirst, instead of compiling two different targets, it should have the common `-v`\nswitch that makes the executable output more messages. But the verbosity shall also\nhave levels, so the output is not flooded by the messages.\n\n* The _PolluxGateway_ module shall not configure the MUX values for the xbee cape\n\nWe have implemented our first versions of the XBee Cape without the helper EEPROM\nthat helps the cape autoconfigure the MUX values of the beaglebone. With the new\nversion of the cape, all the code that configures the MUX settings shall be dropped.\nThis will finally makes the module work only in userland, and not need to start as\nroot and drop its privileges once the MUX settings are set.\n\n* The _PolluxGateway_ module and _PolluxWakeUpduino_ firmware shall configure all the zigbee settings\n\nWe rely on the manual setting of the XBee modules, to match them up and to configure\ntheir pin ports. That operation is cumbersome, does not work all the time, and needs\nto use the X-CTU application under windows.\n\nTODO\n====\n\n* finish the refactoring of the i2c stacks\n* add more verbosity to the _PolluxGateway_ module\n* remove the MUX configuration at _PolluxGateway_ start\n* add configuration of the XBee radios in the _PolluxGateway_ module and\n  _PolluxWakeUpduino_ firmware.\n\nCopyright\n=========\n\n(c)2011-2013 Lucas Fernandez and Bernard Pratz, CKAB, hackable:Devices\n\n * http://polluxnzcity.org/\n * http://ckab.com/polluxnz-city/\n * http://hackable-devices.org/projects/project/polluxnzcity/\n\nAll our original work is licensed under the GNU GPL version 3\nand all our schematics are under the Creative Commons v3.0 Attribution Share-Alike.\n\nHere are the Libraries we use in our projects, and their respective copyrights notice\n\nArduino libraries:\n * Statistics by Rob Tillaart and Gil Ross, in the Public Domain \n * usiTwiSlave, by Donald R. Blake, Jochen Toppe and Ben Galvin under GPL v2\n * circular buffer based on Akash Nath, in the Public Domain\n * Arduino, by the Arduino team, under the GPL v2\n\nFor the python web interface:\n * bottle.py under the MIT License\n * bootstrap.js under the Apache License v2.0.\n * deansi library by David Garcia Garzon, under the AGPLv3\n\nAll components symbols in the schematics are from Eagle's libraries, under Creative\nCommons v3.0 Share-Alike.\n\nLicense\n=======\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyzmo%2Fpolluxnzcity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguyzmo%2Fpolluxnzcity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyzmo%2Fpolluxnzcity/lists"}