{"id":23085023,"url":"https://github.com/denschu/home.pi","last_synced_at":"2025-08-16T04:30:58.712Z","repository":{"id":7331046,"uuid":"8652430","full_name":"denschu/home.pi","owner":"denschu","description":"Home Automation with AngularJS and MQTT on a Raspberry Pi","archived":false,"fork":false,"pushed_at":"2015-04-08T08:28:47.000Z","size":4321,"stargazers_count":193,"open_issues_count":6,"forks_count":63,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-04-20T13:42:44.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denschu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-08T14:28:30.000Z","updated_at":"2022-05-01T03:38:53.000Z","dependencies_parsed_at":"2022-09-22T12:41:15.868Z","dependency_job_id":null,"html_url":"https://github.com/denschu/home.pi","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denschu%2Fhome.pi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denschu%2Fhome.pi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denschu%2Fhome.pi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denschu%2Fhome.pi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denschu","download_url":"https://codeload.github.com/denschu/home.pi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230004166,"owners_count":18158245,"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-12-16T17:48:31.360Z","updated_at":"2024-12-16T17:48:31.969Z","avatar_url":"https://github.com/denschu.png","language":"JavaScript","funding_links":[],"categories":["Interfaces","Home Automation"],"sub_categories":["Smart Home Integration Software","Android Things"],"readme":"# Home.Pi\n\n[![Build Status](https://travis-ci.org/denschu/home.pi.png)](https://travis-ci.org/denschu/home.pi)\n\nSimple Home Automation solution with MQTT\n\n## Facts\n\n* Home Automation with MQTT\n* Cloud-based Micro Service Architecture (only the bindings to control the devices are running locally)\n* Completely independent from the used technology (btw. most bindings are actually written in node.js)\n\n## Screenshot\n\n![Screenshot](screenshot.png)\n\n## System Architecture\n\n![System Architecture](sys_arch_homepi.jpg)\n\n## Installation\n\n* Install and start a MQTT Broker with Websocket Support, e.g.\n\t* [HiveMQ](http://www.hivemq.com/)\n\t* [Mosquitto](http://mosquitto.org/) with [https://github.com/stylpen/WSS]\n\t* [Mosca](http://www.mosca.io/)\n\n* Clone the repository and install the dependencies with NPM\n\n```shell\n\tgit clone https://github.com/denschu/homepi\n\tcd homepi\n\tsudo npm install -g cordova ionic gulp\n\tnpm install\n\tgulp install\n```\n\n* Publish your configuration to MQTT with the topic \"username/home/config\" (see publish-config.sh)\n\nExample configuration:\n\n```json\n{\n\t\"id\" : \"ceiling_light\",\n\t\"type\" : \"on_off\",\n\t\"value\" : false,\n\t\"name\" : \"Ceiling Light\",\n\t\"topic\" : \"denschu/home/devices/livingroom/ceiling_light/value\"\n}\n```\n\n* Run with local HTTP Server\n\n```shell\ncd www\npython -m SimpleHTTPServer 8080\nmosca --http-port 8000 --http-bundle --verbose | bunyan\n```\nOpen http://localhost:8080 in a webbrowser and provide your credentials to connect to the MQTT Broker.\n\n* Run it as native app\n\n```shell\nsudo npm install -g cordova ionic\nionic platform add ios\nionic build ios\nionic emulate ios\n```\n\n* Run the complete stack with Docker\n\n```shell\ndocker run -p 1883:1883 -p 8000:8000 -v /var/db/mosca:/db denschu/mosca-secure\ndocker run -d -p 80:80 denschu/homepi\n```\n\n\n\n## MQTT topic conventions\n\nWhen you create the above device configuration for the GUI then you always define the topics it will subscribe to.\n\n\t\u003cusername\u003e/home/devices/\u003croom\u003e/\u003cdevice-name\u003e/value\n\tdenschu/home/devices/living_room/light1/value\n\nThe GUI application will always add a \"/set\" to the topicname from above when it publishes a message. The payload of the message contains the value to set on the device.\n\n\t\u003cusername\u003e/home/devices/\u003croom\u003e/\u003cdevice-name\u003e/value/set \u003cvalue\u003e\n\tdenschu/home/devices/living_room/light1/value/set true\n\n## Available MQTT Bindings (separate git-Repositories)\n\nTake a look at my [puppet manifests](https://github.com/denschu/homepi-puppet) to setup the Raspberry Pi very easily with puppet. You also get some help for the manual setup.\n\nAt the moment the following \"experimental\" MQTT bindings are available:\n\n* [mqtt-exec](https://npmjs.org/package/mqtt-exec) Execute shell commands like \"sudo shutdown -h now\"\n* [mqtt-zway](https://npmjs.org/package/mqtt-zway) Connect to the Z-Wave RaZBerry Server Z-Way\n* [mqtt-google-calendar](https://npmjs.org/package/mqtt-google-calendar) Use Google Calendar as a scheduling engine\n* [mqtt-rules](https://github.com/denschu/mqtt-rules) Create rules and execute them on incoming MQTT messages\n* [mqtt-temperature](https://github.com/denschu/mqtt-temperature) Log temperature to MQTT\n* [mqtt-lirc](https://github.com/denschu/mqtt-lirc) Control infrared devices\n\n## Technologies/Frameworks\n\n* MQTT\n* Ionic Framework (with AngularJS)\n* node.js\n\nFor further informations please refer to my [blog posts](https://blog.codecentric.de/en/author/dsc/):\n* [Home.Pi Reloaded – Home Automation with Ionic and MQTT](https://blog.codecentric.de/en/2014/09/home-pi-reloaded-home-automation-ionic-mqtt)\n* [Home Automation with AngularJS and node.js on a Raspberry Pi](https://blog.codecentric.de/en/2013/03/home-automation-with-angularjs-and-node-js-on-a-raspberry-pi/)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenschu%2Fhome.pi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenschu%2Fhome.pi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenschu%2Fhome.pi/lists"}