{"id":16989736,"url":"https://github.com/nicofilips/smarthome-openhab","last_synced_at":"2025-04-15T13:09:10.998Z","repository":{"id":218250334,"uuid":"745941209","full_name":"NicoFilips/smarthome-openhab","owner":"NicoFilips","description":"My SmartHome configuration - running on a Raspberry Pi 3b 🏡","archived":false,"fork":false,"pushed_at":"2024-01-23T13:48:33.000Z","size":703,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-15T03:07:38.000Z","etag":null,"topics":["docker","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicoFilips.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-20T16:04:06.000Z","updated_at":"2024-02-04T17:28:34.000Z","dependencies_parsed_at":"2024-01-20T19:04:17.341Z","dependency_job_id":"24bb1010-6702-4178-8107-080541ebbe54","html_url":"https://github.com/NicoFilips/smarthome-openhab","commit_stats":null,"previous_names":["nicofilips/smarthome-openhab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fsmarthome-openhab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fsmarthome-openhab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fsmarthome-openhab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fsmarthome-openhab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicoFilips","download_url":"https://codeload.github.com/NicoFilips/smarthome-openhab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226910643,"owners_count":17701848,"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":["docker","python"],"created_at":"2024-10-14T03:07:41.700Z","updated_at":"2024-11-28T12:14:30.541Z","avatar_url":"https://github.com/NicoFilips.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/NicoFilips/ByteBrusher/\"\u003e\n  \u003cimg src=\"https://github.com/NicoFilips/smarthome-openhab/assets/35654361/4c3803b8-46f1-432f-83a9-aa9663745b57\" alt=\"Logo\" width=\"200\" height=\"200\"\u003e\n\u003c/a\u003e\n\n\u003cblockquote\u003e\n  \u003cp\u003eSource: DALL-E 3\u003c/p\u003e\n\u003c/blockquote\u003e\n\n [![Build](https://github.com/NicoFilips/smarthome-openhab/actions/workflows/docker-image.yml/badge.svg)](https://github.com/NicoFilips/smarthome-openhab/actions/workflows/docker-image.yml)\n\n\n# :rocket: My Smarthome configuration April-2022 :house:\n\nThis Repository shows the configuration of my SmartHome. \nIt also helps me to review Changes or revert my current state back. This configuration is running on a Raspberry Pi 3b with 4GB and an attached SSD. \nThis Setup is also running in the cloud so I have access to all those features without beeing in my own network or having to set up a VPN.\n\n## Quick Summary of my Environment and Devices:\n- a lot of LED Strips\n- Yeelights RGB Bulbs\n- 2 yeelight ceiling lights\n- Zigbee door, window sensors\n- Zigbee Temperature, humidity Sensors\n- 2 Amazon Alexas\n- Wake-On-Lan on several IP Based devices\n- A vacuum robot\n- some sonoffs (flashed with Tasmota)\n- DECT FritzBox radiator thermostat\n- Miflora to monitor my plants\n- IP based printer\n- 3D Printer with Octoprint (Raspbi App)\n- IR Remote (controlling sound system and TV)\n- Kodi Mediaserver on a raspberry\n\n## Services I coded:\n- Alarmclock (activates Amazon Alexa and lights in the morning)\n- discolights (LED strips, smart bulbs and ceiling light) synced to music\n- Serverlogs stored in things to view them on the UI\n- local weather data grabbed of a public API\n- server stats (cpu temp etc.)\n- telegram bot\n- whatsapp bot (based on yowsup) controlling my smarthome via whatsapp bot\n- todo list\n- Tankerkönig - an API to get the cheapest gas prices in the near area\n- Speedtest - measure current upload and download speeds\n\nChanges are made in a seperate envrionment. Those changes are tested and validated. As soon as it's safe to say that they work accordingly and don't have any sideeffects on other domains, their pushed to the 'production' -\u003e therefore the real image of my raspberry pi. \n\n```mermaid\nflowchart LR\nA[GitHub Repo] --\u003e|Quelltext| B(stable)\nB --\u003e C{Dists}\nC --\u003e|TestEnv| D[Result 1]\nC --\u003e|RealEnv| E[Result 2]\n```\n\nBenefits:\n- safeguarding against failure\n- Keeping the production code tidy\n- Test without effecting real devices\n- Learn to use Git!\n\n\n## My Setup roughly contains:\n```mermaid\npie\n\"Configs\" : 45\n\"HTML Views\" : 5\n\"Jython scripts\" : 50\n\"Rulesengine scripts\" : 10\n```\n\n## Usuall process of shipping a feature:\nCommon scenario: A parcel arrived and I received a new smarthome device!\nAt first we need to create a feature branche, to ensure we're not working on our main branche and production setup. So we connect our devices, code some stuff, do some magic. You know how it works.\nWhen tested succesfully, we commit and push our awesome changes to the feature branche. \nNow we create a pull request to merch our changes and the ability to handle the new devices into our develop branche.\nAs soon as everything works and and the changes can be merged, we go for it!\n\n```\n$ git clone https://github.com/NicoFilips/OpenHAB\n```\nIve you use my configuration, and decide to ship changes as well, you can achieve this with these commands:\n```\ngit status\ngit add .\ngit commit\ngit push origin main\n```\nIts recommended to put a feature into a feature branche.\nKeep in mind tho, that your configuration will likely have different devices. So use this as a template and change the important ids to match your devices.\nAnd don't forget to have doing it!\n\n## Ecosystem:\nThis Smarthome setup isnt my only running server. This Server implements a REST-API. I'm also working on a node.js Frontend with Typescript and React. With this setup I can control my Smarthome Server Backend, by changing the states of my devices.\nIt works pretty much like this:\n\n```mermaid\nsequenceDiagram\n    autonumber\n    Note right of User: User: I need to learn!\n    User-\u003e\u003eReact Frontend: Turn on all lights!\n    React Frontend-\u003e\u003eOpenHAB Rest API: Request: Lights: ON\n    OpenHAB Rest API--\u003e\u003eReact Frontend: Response: Lights are now ON\n    React Frontend--\u003e\u003eUser: Here you have it!\n    loop learn your vocabulary\n        User-\u003e\u003eUser: Do your Duolingo lessons \n    end\n```\nIn conclusion, the way of communication is often the same. It doesnt make a difference if connected to the REST API or with the SmartHome View des Smarthome Servers directly, it aufs selbe raus. \nThe state of my Smarthome.\n```mermaid\ngraph TD;\n    User--\u003eOpenHAB-HTML-View;\n    User--\u003eReactFrontend;\n    ReactFrontend--\u003eOpenHAB-Rest;\n    OpenHAB-Rest--\u003eOSGI-Framework;\n    OpenHAB-HTML-View--\u003eOSGI-Framework;\n    OSGI-Framework--\u003eYeelight;\n```\n\n## Deployment:\n\nThis Repository is automatically build into a docker image. Having an isolated docker image makes the deployment simpler and fast.\nThe magic is happening in the deployment pipeline. You can explore the pipeline yourself in the .github/workflow folder.\nThe generated container is stored in the ghcr. (github container registry)\nWhen it's time to ship a new feature or fix a bug, one just needs to push the changes into main. The Pipeline will then do its Job and build a docker image on top of your changes.\nKeep in mind that the pipeline can take some time to generate the docker image. \nWhen built, just grab it off the container registry and deploy it onto your device.\n\n## Contact:\nIf you have any questions regarding this repository, just feel free to contact me.\n\n## Disclaimer:\nI've checked every id. Don't even think about investing time to do anything harmful with those.\nSave the time - it won't work.\n\n## Note:\nI also have an ender 3 with octopi running. I flashed the mainboard of the 3d printer with an arduino uno. (let me tell you, it was a mess!) But so I could install octopi on a seperate Raspberry Pi.\nThanks to flashing the board, I could access the printers data over the USB Port. Octopi also implements a REST API and I'm able to control it with my SmartHome.\nI even coded some scripts on my 3d-printer to adjust the start up, level the bed (I've installed a bl-touch) or preheat the bed before a print. I also installed a webcam to monitor my prints! \nAlso, connecting octopi to the cloud, I could monitor the status of my prints or even cancel failed prints on the go.\n\n### Powered by: \u003cimg src=\"https://user-images.githubusercontent.com/22525368/31583533-1b60a0fa-b19e-11e7-931d-ede1c4c6e924.png\" width=3% height=3%\u003e \u003cimg src=\"https://www.vlinde.de/wp-content/uploads/2019/06/1024px-Git_icon.svg1_.png\" width=3% height=3%\u003e \u003cimg src=\"https://upload.wikimedia.org/wikipedia/de/thumb/c/cb/Raspberry_Pi_Logo.svg/1024px-Raspberry_Pi_Logo.svg.png\" width=2% height=2%\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicofilips%2Fsmarthome-openhab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicofilips%2Fsmarthome-openhab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicofilips%2Fsmarthome-openhab/lists"}