├── .devcontainer └── devcontainer.json ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ └── ha-lint.yml ├── .gitignore ├── .vscode └── tasks.json ├── .vscodeignore ├── README.md ├── diyhue ├── CHANGELOG.md ├── DOCS.md ├── Dockerfile ├── LICENSE.md ├── README.md ├── build.json ├── config.json ├── icon.png ├── logo.png └── rootfs │ ├── run.sh │ └── select.sh ├── images ├── diyHue-logo-dev.svg ├── diyhue-hassio.png └── logo-small.svg └── repository.json /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Example devcontainer for add-on repositories", 3 | "image": "ghcr.io/home-assistant/devcontainer:addons", 4 | "appPort": ["7123:8123", "7357:4357"], 5 | "postStartCommand": "bash devcontainer_bootstrap", 6 | "runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"], 7 | "containerEnv": { 8 | "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}" 9 | }, 10 | "customizations": { 11 | "vscode": { 12 | "extensions": ["timonwong.shellcheck", "esbenp.prettier-vscode"], 13 | "settings": { 14 | "terminal.integrated.profiles.linux": { 15 | "zsh": { 16 | "path": "/usr/bin/zsh" 17 | } 18 | }, 19 | "terminal.integrated.defaultProfile.linux": "zsh", 20 | "editor.formatOnPaste": false, 21 | "editor.formatOnSave": true, 22 | "editor.formatOnType": true, 23 | "files.trimTrailingWhitespace": true 24 | } 25 | } 26 | }, 27 | "mounts": ["type=volume,target=/var/lib/docker"] 28 | } 29 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: diyhue 2 | 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | -------------------------------------------------------------------------------- /.github/workflows/ha-lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | on: [push, pull_request] 3 | jobs: 4 | build: 5 | name: Add-on configuration 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: ⤵️ Check out code from GitHub 9 | uses: actions/checkout@v2.3.4 10 | - name: 🚀 Run Home Assistant Add-on Lint 11 | uses: frenck/action-addon-linter@v2.2 12 | with: 13 | path: "./diyhue" 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Own custom entries ### 2 | *.vsix 3 | *.todo 4 | *.zip 5 | **/out 6 | 7 | ### General generated List 8 | 9 | # Created by https://www.gitignore.io/api/node,linux,macos,windows,visualstudiocode 10 | # Edit at https://www.gitignore.io/?templates=node,linux,macos,windows,visualstudiocode 11 | 12 | ### Linux ### 13 | *~ 14 | 15 | # temporary files which can be created if a process still has a handle open of a deleted file 16 | .fuse_hidden* 17 | 18 | # KDE directory preferences 19 | .directory 20 | 21 | # Linux trash folder which might appear on any partition or disk 22 | .Trash-* 23 | 24 | # .nfs files are created when an open file is removed but is still being accessed 25 | .nfs* 26 | 27 | ### macOS ### 28 | # General 29 | .DS_Store 30 | .AppleDouble 31 | .LSOverride 32 | 33 | # Icon must end with two \r 34 | Icon 35 | 36 | # Thumbnails 37 | ._* 38 | 39 | # Files that might appear in the root of a volume 40 | .DocumentRevisions-V100 41 | .fseventsd 42 | .Spotlight-V100 43 | .TemporaryItems 44 | .Trashes 45 | .VolumeIcon.icns 46 | .com.apple.timemachine.donotpresent 47 | 48 | # Directories potentially created on remote AFP share 49 | .AppleDB 50 | .AppleDesktop 51 | Network Trash Folder 52 | Temporary Items 53 | .apdisk 54 | 55 | ### Node ### 56 | # Logs 57 | logs 58 | *.log 59 | npm-debug.log* 60 | yarn-debug.log* 61 | yarn-error.log* 62 | lerna-debug.log* 63 | 64 | # Diagnostic reports (https://nodejs.org/api/report.html) 65 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 66 | 67 | # Runtime data 68 | pids 69 | *.pid 70 | *.seed 71 | *.pid.lock 72 | 73 | # Directory for instrumented libs generated by jscoverage/JSCover 74 | lib-cov 75 | 76 | # Coverage directory used by tools like istanbul 77 | coverage 78 | *.lcov 79 | 80 | # nyc test coverage 81 | .nyc_output 82 | 83 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 84 | .grunt 85 | 86 | # Bower dependency directory (https://bower.io/) 87 | bower_components 88 | 89 | # node-waf configuration 90 | .lock-wscript 91 | 92 | # Compiled binary addons (https://nodejs.org/api/addons.html) 93 | build/Release 94 | 95 | # Dependency directories 96 | **/node_modules/ 97 | jspm_packages/ 98 | 99 | # TypeScript v1 declaration files 100 | typings/ 101 | 102 | # TypeScript cache 103 | *.tsbuildinfo 104 | 105 | # Optional npm cache directory 106 | .npm 107 | 108 | # Optional eslint cache 109 | .eslintcache 110 | 111 | # Optional REPL history 112 | .node_repl_history 113 | 114 | # Output of 'npm pack' 115 | *.tgz 116 | 117 | # Yarn Integrity file 118 | .yarn-integrity 119 | 120 | # dotenv environment variables file 121 | .env 122 | .env.test 123 | 124 | # parcel-bundler cache (https://parceljs.org/) 125 | .cache 126 | 127 | # next.js build output 128 | .next 129 | 130 | # nuxt.js build output 131 | .nuxt 132 | 133 | # react / gatsby 134 | public/ 135 | 136 | # vuepress build output 137 | .vuepress/dist 138 | 139 | # Serverless directories 140 | .serverless/ 141 | 142 | # FuseBox cache 143 | .fusebox/ 144 | 145 | # DynamoDB Local files 146 | .dynamodb/ 147 | 148 | ### VisualStudioCode ### 149 | .vscode/* 150 | !.vscode/settings.json 151 | !.vscode/tasks.json 152 | !.vscode/launch.json 153 | !.vscode/extensions.json 154 | 155 | ### VisualStudioCode Patch ### 156 | # Ignore all local history of files 157 | .history 158 | 159 | ### Windows ### 160 | # Windows thumbnail cache files 161 | Thumbs.db 162 | Thumbs.db:encryptable 163 | ehthumbs.db 164 | ehthumbs_vista.db 165 | 166 | # Dump file 167 | *.stackdump 168 | 169 | # Folder config file 170 | [Dd]esktop.ini 171 | 172 | # Recycle Bin used on file shares 173 | $RECYCLE.BIN/ 174 | 175 | # Windows Installer files 176 | *.cab 177 | *.msi 178 | *.msix 179 | *.msm 180 | *.msp 181 | 182 | # Windows shortcuts 183 | *.lnk 184 | 185 | # End of https://www.gitignore.io/api/node,linux,macos,windows,visualstudiocode -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Start Home Assistant", 6 | "type": "shell", 7 | "command": "supervisor_run", 8 | "group": { 9 | "kind": "test", 10 | "isDefault": true 11 | }, 12 | "presentation": { 13 | "reveal": "always", 14 | "panel": "new" 15 | }, 16 | "problemMatcher": [] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | src/** 5 | .gitignore 6 | vsc-extension-quickstart.md 7 | **/tsconfig.json 8 | **/tslint.json 9 | **/*.map 10 | **/*.ts 11 | ._* 12 | **/*.map 13 | ISSUE_TEMPLATE.md 14 | CONTRIBUTING.md 15 | LICENSE.md 16 | AUTHORS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
8 | 9 | ## About 10 | 11 | diyHue provides a Ecosystem for several Smart Home Solutions, eliminating the need for vendor specific Bridges and Hardware. Written in Python and Open Source, you are now able to import and control all your Lights and Sensors into one System. Lightweight and resource friendly, to run on small 12 | devices like the RPi .... 24/7 13 | 14 | The Best part? No Cloud connection by Design! 15 | 16 | Enjoy your diyHue enlighted Home. 17 | 18 | If you've found the Add-on helpful or useful, then please consider throwing a coffee my way to help support my work. As i am a student and would like to invest more time and effort in this project this would really help me: 19 | 20 | [](https://ko-fi.com/diyhue) 21 | 22 | ![diyHue ecosystem][img-ecosystem] 23 | 24 | ## Installation 25 | 26 | The installation process is pretty easy and straight forward, like for any other third-party Home Assistang Add-on. 27 | 28 | Add the repository URL under **Supervisor → Add-on store → ⋮ → Manage add-on repositories**: 29 | 30 | https://github.com/diyhue/hassio-addon 31 | 32 | To use the Dev bransh add `#dev` to the url, before using the dev bransh you need to remove your current config files to prevent errors, also when moving back to master you need to remove your dev config, be aware this is still in development and problems may occur. 33 | 34 | https://github.com/diyhue/hassio-addon#dev 35 | 36 | ## Changelog 37 | 38 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). 39 | 40 | All notable changes to this project will be documented in the [CHANGELOG.md][changelog] file. 41 | 42 | Version for releases is based on [diyHue](https://github.com/diyhue/diyHue) format: `X.Y.Z`. 43 | 44 | Any changes on the addon that do not require a new version of [diyHue](https://github.com/diyhue/diyHue) will use the format: `X.Y.Z.A` where `X.Y.Z` is fixed on the diyHue release version and `A` is related to the addon. 45 | 46 | Edge version will not maintain a CHANGELOG and doesn't have a version. 47 | 48 | ## Issues 49 | 50 | If you find any issues with the add-on, please check the [issue tracker](https://github.com/MaxBec/hassio-diyHue/issues) for similar issues before creating one. If your issue is regarding specific devices or, more generally, an issue that arises after diyHue has successfully started, it should 51 | likely be reported in the [diyHue issue tracker](https://github.com/diyhue/diyHue/issues). 52 | 53 | Feel free to create a PR for fixes and enhancements. 54 | 55 | ## Support 56 | 57 | All documentation and instructions can be found over at [diyhue.readthedocs.io](https://diyhue.readthedocs.io/) 58 | 59 | If you need help with diyHue you can get support from other users, aswell as the maintainer. 60 | 61 | Please use GitHub, Slack or Discourse, other platforms are not checked by the maintainers. 62 | 63 | ### Slack [](https://diyhue.slack.com/) [](https://slackinvite.squishedmooo.com/) 64 | 65 | Use Slack for a general chat or fast live support. 66 | 67 | However: Since Slack is faster at providing live Support but not as good when it comes to save and show known Issues, we kindly ask you to open a Topic at our Discourse group. This will provide Help for others in the future. 68 | 69 | ### Discourse [](https://diyhue.discourse.group) 70 | 71 | Our Board might already have your fix and answer ready. Have a look! 72 | 73 | > General Note: Please provide some Logs to make it easier for all of us. Enable Debug by manually starting diyHue with additional `--debug true` argument. 74 | 75 | 84 | 85 | 86 | 87 | 88 | Please post on our [Slack team](https://slackinvite.squishedmooo.com/) any other device/application that you find to work with this emulator. 89 | 90 | 97 | 98 | ## Contribute 99 | 100 | diyHue is Opensource and maintained by volunteers in their free time. You are welcome to contribute and become a recognised member of the diyHue community. Feel free to add PR and Commits to our Dev Branch. If you are experienced in 101 | 102 | - Webdesign 103 | - Python 104 | - Arduino 105 | - Coding in general 106 | 107 | We highly appreciate your support, making diyHue even better! 108 | 109 | ## Credits 110 | 111 | - The Addon code was originally written by Max ([@Maxbec](https://github.com/maxbec)) and has been adopted into the diyhue project officially. Thank you very much Max for your contribution! 112 | 113 | - Ben ([@cheesemarathon](https://github.com/cheesemarathon)) All fancy github integrations 114 | - [Stephan van Rooij](https://github.com/svrooij) - zigbee2mqtt integration 115 | - [@avinashraja98](https://github.com/avinashraja98) - Hue Entertainment server 116 | - Federico Zivolo ([@FezVrasta](https://github.com/FezVrasta)) Internal WebGUI 117 | - [@J3n50m4t](https://github.com/J3n50m4t) - Yeelight integration 118 | - Martin Černý ([@mcer12](https://github.com/mcer12)) - Yeelight color bulb 119 | - probonopd https://github.com/probonopd/ESP8266HueEmulator 120 | - sidoh https://github.com/sidoh/esp8266_milight_hub 121 | - StefanBruens https://github.com/StefanBruens/ESP8266_new_pwm 122 | - Cédric @ticed35 for linkbutton implementation 123 | - [@cheesemarathon](https://github.com/cheesemarathon) - Help with Docker images 124 | - [@Mevel](https://github.com/Mevel) - 433Mhz devices 125 | - [@Nikfinn99](https://github.com/Nikfinn99) - PCB designs 126 | - [@crankyoldgit](https://github.com/crankyoldgit) - IR Remote library 127 | 128 | ## Additional Projects and Ideas 129 | 130 | Hue living color light project for 3D printing: [Thingiverse 2773413](https://www.thingiverse.com/thing:2773413) 131 | 132 | ## License 133 | 134 | [](https://github.com/diyhue/diyHue/blob/master/LICENSE.md) 135 | 136 | [changelog]: https://github.com/MaxBec/hassio-diyHue/blob/master/diyhue/CHANGELOG.md 137 | [img-ecosystem]: https://raw.githubusercontent.com/diyhue/diyhue.github.io/master/assets/images/hue-map.png 138 | -------------------------------------------------------------------------------- /diyhue/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 4 | 5 | ## [2.0.31 - 10.1.2025] 6 | ### update 7 | - update gradient lights. 8 | 9 | ## [2.0.30 - 17.12.2024] 10 | ### fix 11 | - Fix FPS counter in entertainment. 12 | - Fix non udp lights in entertainment.https://github.com/diyhue/diyHue/issues/1057 13 | - Exclude entertainment groups from scripts. 14 | ### add 15 | - Add `LightGroup` as Zone. https://github.com/diyhue/diyHue/issues/1059 16 | 17 | ## [2.0.29 - 3.12.2024] 18 | ### update 19 | - update 1 non udp light per frame. 20 | 21 | ## [2.0.28 - 1.12.2024] 22 | ### update 23 | - update wled 24 | ### info 25 | - rescan lights if error during entertainment `Entertainment Service was syncing and has timed out, stopping server and clearing state'segment_start'` 26 | - see main repo for more info 27 | - disable backup if you get a error "Unsuccessful websocket message" 28 | 29 | ## [2.0.27 - 1.12.2024] 30 | ### add 31 | - Add dummy 32 | - Add ip setting to config 33 | ### update 34 | - update wled 35 | ### info 36 | - see main repo for more info 37 | - disable backup if you get a error "Unsuccessful websocket message" 38 | 39 | ## [2.0.26 - 24.11.2024] 40 | ### add 41 | - Add effect_v2 42 | - Add effects to mqtt 43 | ### info 44 | - disable backup if you get a error "Unsuccessful websocket message" 45 | 46 | ## [2.0.25 - 18.11.2024] 47 | ### fix 48 | - fix addon install 49 | 50 | ## [2.0.24 - 18.11.2024] 51 | ### fix 52 | - fix addon install 53 | 54 | ## [2.0.23 - 18.11.2024] 55 | ### fix 56 | - fix addon install 57 | 58 | ## [2.0.22 - 18.11.2024] 59 | ### fix 60 | - fix addon install 61 | 62 | ## [2.0.21 - 18.11.2024] 63 | ### remove 64 | - remove deconz from options, setup via webui, see main repo for more info 65 | ### update 66 | - move to vite, see main repo for more info 67 | 68 | ## [2.0.20 - 26.10.2024] 69 | ### Fix 70 | - fix unsupported operand type(s) for /: 'NoneType' and 'int' 71 | ### Add 72 | - Add XY light 73 | 74 | ## [2.0.19 - 1.10.2024] 75 | ### Fix 76 | - fix AttributeError: 'list' object has no attribute 'name', see main repo for more info 77 | 78 | ## [2.0.18 - 27.9.2024] 79 | ### Fix 80 | - fix ZeroDivisionError: division by zero, see main repo for more info 81 | 82 | ## [2.0.17 - 21.9.2024] 83 | ### Fix 84 | - Allot of fixes, see main repo for more info 85 | 86 | ## [2.0.16 - 2.9.2024] 87 | ### Fix 88 | - Allot of fixes, see main repo for more info 89 | 90 | ## [2.0.15 - 10.8.2024] 91 | ### Fix 92 | - fix grouped_light owner missing 93 | 94 | ## [2.0.14 - 24.3.2024] 95 | ### Fix 96 | - fix libfaketime install error 97 | 98 | ## [2.0.13 - 10.3.2024] 99 | ### add 100 | - add update service 101 | 102 | ## [2.0.12 - 28.2.2024] 103 | ### update 104 | - fix install issue 105 | 106 | ## [2.0.11 - 18.2.2024] 107 | ### add 108 | - Updated webUi 109 | 110 | ## [2.0.9 - 17.06.2023] 111 | ### Update 112 | - Emulated Hue SW Version and API Version updated 113 | 114 | ### Add 115 | - Elgato Protocol (Elgato Key Light) 116 | - RDM002 Support added (Hue Tap Dial) 117 | 118 | ### Fix 119 | - HA Error (invalid LightMode) 120 | - State only Battery output when not Null 121 | 122 | 123 | 124 | ## [2.0.8 - 17.03.2023] 125 | ### Fix 126 | - Hue Sync issues 127 | - improve minor bugs 128 | 129 | 130 | ## [2.0.7 - 15.10.2022] 131 | ### Fix 132 | - Connection to Hue APP failed on certain systems because Certificate could not be saved into missing Directory. 133 | 134 | 135 | ## [2.0.6 - 09.10.2022] 136 | ### Fix 137 | - Bug in MQTT fixed when using zigbee2mqtt. BRI Change now reflects Hue API behavior. 138 | 139 | 140 | ## [2.0.5 - 29.9.2022] 141 | ### Update 142 | - Update Emulated Software Version to "1953188020" 143 | - Minor Fixes 144 | 145 | 146 | ## [2.0.4 - 01.7.2022] 147 | 148 | ### Update 149 | - Fixed Home Assistant lights weren't detected with the correct type 150 | - Fixed Home Assistant brightness didn't work 151 | 152 | 153 | ## [2.0.3 - 29.6.2022] 154 | 155 | ### Update 156 | - update swversion to 1952086020 157 | 158 | 159 | ## [2.0.2 - 24.6.2022] 160 | 161 | ### Update 162 | - Update Config options 163 | - Enable "No Serve HTTPS" 164 | - minor Ui fixes 165 | 166 | ## [2.0.1 - 11.05.2022] 167 | 168 | ### Added 169 | 170 | - Add Sidepanel Topic in Docs 171 | 172 | 173 | ## [2.0.0 - 05.05.2022] 174 | 175 | Official diyHue Hassio Addon Release 176 | 177 | This addon is only compatible with the "BETA" of the initial addon Release by Max. 178 | At this point we would like to thank Max for his great work upon we will continue this Addon. 179 | Max and diyhue agreed to make this Addon official. 180 | 181 | ### Changed 182 | - Repo URL to https://github.com/diyhue/hassio-addon 183 | - Build upon latest diyHue Master Release 184 | 185 | 186 | ## [1.4.1 - 05.04.2021] 187 | 188 | ### Changed 189 | 190 | - Deleted the host_network entry in the config.json. #16 191 | 192 | ### Fixed 193 | - Added changes from the diyhue flask repo. web-ui is now flaskUI. 194 | 195 | ## [1.4.0 - 25.3.2021] 196 | 197 | ### Added 198 | 199 | - Updated the diyhue version to the latest master branch. 200 | 201 | ## [1.3.2 - 8.02.2021] 202 | 203 | ### Fixed 204 | 205 | - Issue with alpine apk commands. Results in docker build error. 206 | 207 | ## [1.3.1 - 18.01.2021] 208 | 209 | ### Fixed 210 | 211 | - Issue with https connection. Hassio doesn't allow to use SSL with websocket at the moment. 212 | 213 | ### Added 214 | 215 | - Option to force no https usage with `no-serve-https: true` 216 | 217 | ## [1.2.0 - 30.12.2020 218 | 219 | Changes to the config.json creation and saving procedure. 220 | 221 | ### Fixed 222 | 223 | - Correct creation of the config.json 224 | - Correct path of the config.json 225 | 226 | ## [1.1.0] - 26.12.2020 227 | 228 | Big update for the Add-on. diyHue moved there default branch from master-refactor to master. With this change there is a completely new folder structure. So there was the need do adapt this Add-on as well. 229 | 230 | ### Fixed 231 | 232 | - Minor fixes for the final release of the Add-on. 233 | 234 | ### Added 235 | 236 | - Merged the whole Add-on to the new master branch of diyhue. 237 | - New Readme file for the repository and the Add-on 238 | - New logo specifically for the hassio Add-on 239 | -------------------------------------------------------------------------------- /diyhue/DOCS.md: -------------------------------------------------------------------------------- 1 | # Home Assistant Add-on: diyHue 2 | 3 | The Home Assistant diyHue Add-on allows users to run a fully working diyHue instance right inside Home Assistant. With this Add-on you can manage all your Genuine Hue Lightbulbs, Sensors and Switches aswell as add third-party devices right from inside Home Assistant. 4 | 5 | ## Installation 6 | 7 | ### NOTE: Installation will take some Minutes! Be Patience =) 8 | 9 | The installation process is pretty easy and straight forward, like for any other third-party Home Assistang Add-on. 10 | 11 | Add the repository URL under **Supervisor → Add-on store → ⋮ → Manage add-on repositories**: 12 | 13 | https://github.com/diyhue/hassio-addon 14 | 15 | 16 | **Important** After Install & before starting diyHue, edit the Config according to the Docs below. If you start diyHue with the default MAC or a wrong MAC the Certificate for Linking Official Apps is generated wrong and you get a error upon linking. 17 | In that case: 18 | 19 | - Stop diyHue 20 | - delete cert.pem in _/config/diyhue_ dir 21 | - edit mac 22 | - restart diyHue 23 | 24 | ## Configuration 25 | 26 | **Note**: _Remember to restart the add-on when the configuration is changed._ 27 | 28 | Example add-on configuration: 29 | 30 | ```yaml 31 | config_path: /config/diyhue 32 | mac: "XX:XX:XX:XX:XX:XX" 33 | debug: true 34 | no-serve-https: false 35 | ``` 36 | 37 | **Note**: _This is just an example, don't copy and paste it! Create your own!_ 38 | 39 | ### Option: `config_path` 40 | 41 | The `config_path` option controls the folder where your diyHue config gets stored. It has to start with **/config** and i highly recommend to name the folder **/config/diyhue**. 42 | 43 | ### Option: `mac` 44 | 45 | The mac-address of your interface (device) you use to connect to you network. 46 | **You can not fake a Mac here, since it is used for original software (APP) to authenticate the Emulated Bridge!** 47 | 48 | **Note**: You have to stick to this format `XX:XX:XX:XX:XX:XX`. 49 | 50 | ### Option: `debug` 51 | 52 | If you turn the debug option to true you will get extended logs in the output section of the add-on. 53 | 54 | Valid values: `false`, `true`. 55 | 56 | ### Option: `no-serve-https` 57 | 58 | You have to set this value to true if you are running hassio under https. Hassio doesn't allow the usage of SSL on the websocket at the moment. So you have to force diyhue to not use https. 59 | 60 | Valid values: `false`, `true`. 61 | 62 | 63 | ## Sidepanel Link 64 | 65 | Go to settings > Dashboards > Add Dashboards > Webpage 66 | For url enter `http://homeassistant.local:80` 67 | Hit next. 68 | For Title enter `diyHue` 69 | For Icon enter `mdi:home-lightbulb` 70 | Hit create. 71 | 72 | 73 | ## Known issues and limitations 74 | 75 | - No special limitations at the moment. ;) 76 | 77 | ## Changelog & Releases 78 | 79 | This repository keeps a change log using [GitHub's releases][releases] functionality. The format of the log is based on [Keep a Changelog][keepchangelog]. 80 | 81 | Releases are based on [Semantic Versioning][semver], and use the format of `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented based on the following: 82 | 83 | - `MAJOR`: Incompatible or major changes. 84 | - `MINOR`: Backwards-compatible new features and enhancements. 85 | - `PATCH`: Backwards-compatible bugfixes and package updates. 86 | 87 | ## Support 88 | 89 | Got questions? 90 | 91 | Please use GitHub, Slack or Discourse, other platforms are not checked by the maintainers. 92 | 93 | You have several options to get them answered: 94 | 95 | - The [Home Assistant Discord chat server][discord-ha] for general Home Assistant discussions and questions. 96 | - The Home Assistant [Community Forum][forum]. 97 | - The diyHue Discord Channel [diyHue Discord](https://diyhue.discourse.group) 98 | - The diyHue Slack Channel [diyHue Slack](https://diyhue.slack.com/) 99 | 100 | You could also open an issue here: 101 | [For HA related issues](https://github.com/diyhue/hassio-addon/issues). 102 | [For DiyHue related issues](https://github.com/diyhue/diyHue/issues). 103 | 104 | 105 | ## Authors & contributors 106 | 107 | The original setup of this repository is by Max Beckenbauer. 108 | diyHue adopted his work and is now releasing the official addon upon his work. 109 | **Thank you Max** 110 | 111 | For a full list of all authors and contributors, check credits section of the main README.md. 112 | 113 | [discord-ha]: https://discord.gg/c5DvZ4e 114 | [forum]: https://community.home-assistant.io 115 | [releases]: https://github.com/diyhue/diyHue/releases 116 | 117 | -------------------------------------------------------------------------------- /diyhue/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM=hassioaddons/base-python:5.3.4 2 | # hadolint ignore=DL3006 3 | FROM ${BUILD_FROM} 4 | 5 | # Set shell 6 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 7 | 8 | # Set the build architecture and convert it from hassio to diyhue style 9 | # armhf, armv7, aarch64, amd64, i386 10 | ARG BUILD_ARCH=aarch64 11 | ENV BUILD_ARCHI = ${BUILD_ARCH} 12 | 13 | # Other settings 14 | ENV LANG C.UTF-8 15 | ENV DIYHUE_VERSION=master 16 | ENV DIYHUE_COMMIT=a0f1584732b6eca3ae1ff7497c9a1039b9d396e6 17 | ENV DIYHUE_UI_VERSION=v2.0.2 18 | ENV WORKING_DIR=/opt/hue-emulator 19 | 20 | # Create the needed folders 21 | RUN mkdir diyhue config ${WORKING_DIR} 22 | 23 | # Install all needed dependencies 24 | RUN apk add -q -u python3 openssl nmap psmisc iproute2 alpine-sdk build-base 25 | RUN apk add --no-cache bluez 26 | 27 | # Download diyhue and unzip it 28 | RUN curl -sL -o diyhue.zip https://github.com/diyhue/diyHue/archive/${DIYHUE_COMMIT}.zip 29 | RUN unzip -qo diyhue.zip 30 | RUN rm diyhue.zip 31 | RUN pip3 install -r /diyHue-${DIYHUE_COMMIT}/requirements.txt --no-cache-dir 32 | 33 | # Install diyHue 34 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/flaskUI /opt/hue-emulator/ 35 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/functions /opt/hue-emulator/ 36 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/lights /opt/hue-emulator/ 37 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/sensors /opt/hue-emulator/ 38 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/HueObjects /opt/hue-emulator/ 39 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/services /opt/hue-emulator/ 40 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/configManager /opt/hue-emulator/ 41 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/logManager /opt/hue-emulator/ 42 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/HueEmulator3.py /opt/hue-emulator/ 43 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/githubInstall.sh /opt/hue-emulator/ 44 | RUN cp -r /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/genCert.sh /diyHue-${DIYHUE_COMMIT}/BridgeEmulator/openssl.conf /opt/hue-emulator/ 45 | 46 | 47 | RUN curl -sL -o diyHueUI.zip https://github.com/diyhue/diyHueUI/releases/download/${DIYHUE_UI_VERSION}/DiyHueUI-release.zip 48 | RUN mkdir /diyhueUI 49 | RUN unzip -qo diyHueUI.zip -d /diyhueUI 50 | RUN rm diyHueUI.zip 51 | RUN cp -r /diyhueUI/dist/index.html /opt/hue-emulator/flaskUI/templates/ 52 | RUN cp -r /diyhueUI/dist/assets /opt/hue-emulator/flaskUI/ 53 | RUN rm -r /diyhueUI 54 | RUN rm -r /diyHue-${DIYHUE_COMMIT} 55 | 56 | RUN apk --no-cache add --virtual build-deps gcc git make musl-dev \ 57 | && git clone https://github.com/wolfcw/libfaketime \ 58 | && cd libfaketime \ 59 | && git checkout v0.9.10 \ 60 | && make \ 61 | && mv src/*.so* /lib && mv src/faketime /bin \ 62 | && cd - \ 63 | && rm -rf libfaketime \ 64 | && apk del build-deps 65 | 66 | # Set working directory to the Archive folder 67 | WORKDIR /opt/hue-emulator 68 | 69 | # Copy additional local build files 70 | COPY rootfs ./ 71 | 72 | # Modify user rights of additional files 73 | RUN chmod +x ./select.sh ./genCert.sh && chmod a+x ./run.sh 74 | 75 | # Sleect the right binaries depending on the arch 76 | RUN ./select.sh 77 | 78 | # Build arguments 79 | ARG BUILD_DATE 80 | ARG BUILD_REF 81 | ARG BUILD_VERSION 82 | 83 | ## Document volume 84 | VOLUME ["/config"] 85 | 86 | # Labels 87 | LABEL \ 88 | io.hass.name="diyHue" \ 89 | io.hass.description="Fully configurable diyHue Emulator" \ 90 | io.hass.arch="${BUILD_ARCH}" \ 91 | io.hass.type="addon" \ 92 | io.hass.version=${BUILD_VERSION} \ 93 | maintainer="diyHue