├── .editorconfig ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── README.md ├── app ├── assets │ └── images │ │ ├── icons │ │ ├── button │ │ │ ├── pressed.png │ │ │ └── released.png │ │ ├── buzzer │ │ │ ├── off.png │ │ │ └── on.png │ │ ├── common │ │ │ └── unknown.png │ │ ├── condition │ │ │ ├── clear-day.png │ │ │ ├── clear-night.png │ │ │ ├── cloudy.png │ │ │ ├── fog.png │ │ │ ├── partly-cloudy-day.png │ │ │ ├── partly-cloudy-night.png │ │ │ ├── rain.png │ │ │ ├── sleet.png │ │ │ ├── snow.png │ │ │ └── wind.png │ │ ├── door │ │ │ ├── door-close.png │ │ │ └── door-open.png │ │ ├── heater │ │ │ ├── anti-freeze.png │ │ │ ├── comfort.png │ │ │ ├── heater_off.png │ │ │ └── night.png │ │ ├── humidity │ │ │ └── drop.png │ │ ├── light │ │ │ ├── light-off.png │ │ │ └── light-on.png │ │ ├── lock │ │ │ ├── closed.png │ │ │ └── open.png │ │ ├── luminosity │ │ │ └── sensor.png │ │ ├── motion │ │ │ ├── movement.png │ │ │ └── none.png │ │ ├── psd │ │ │ ├── heater.psd │ │ │ ├── homie.psd │ │ │ ├── light.psd │ │ │ └── shutters.psd │ │ ├── shutters │ │ │ ├── 0.png │ │ │ ├── 10.png │ │ │ ├── 100.png │ │ │ ├── 20.png │ │ │ ├── 30.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 60.png │ │ │ ├── 70.png │ │ │ ├── 80.png │ │ │ └── 90.png │ │ ├── sound │ │ │ └── wave.png │ │ ├── switch │ │ │ ├── switch-off.png │ │ │ └── switch-on.png │ │ ├── temperature │ │ │ └── thermometer.png │ │ └── window │ │ │ ├── window-close.png │ │ │ └── window-open.png │ │ └── logo_white.png ├── components │ ├── App.vue │ ├── devices │ │ ├── Button.vue │ │ ├── Buzzer.vue │ │ ├── Door.vue │ │ ├── Heater.vue │ │ ├── Humidity.vue │ │ ├── Light.vue │ │ ├── Lock.vue │ │ ├── Luminosity.vue │ │ ├── Motion.vue │ │ ├── Node.js │ │ ├── NodeComponent.vue │ │ ├── Shutters.vue │ │ ├── Sound.vue │ │ ├── Statistics.vue │ │ ├── Switch.vue │ │ ├── Temperature.vue │ │ └── Window.vue │ ├── help │ │ ├── Automation.vue │ │ ├── Devices.vue │ │ ├── Help.vue │ │ ├── Overview.vue │ │ └── Settings.vue │ ├── pages │ │ ├── Automation.vue │ │ ├── Devices.vue │ │ ├── Overview.vue │ │ └── Settings.vue │ ├── partials │ │ ├── Footer.vue │ │ └── Header.vue │ └── standalones │ │ ├── AddDevice.vue │ │ └── Authentication.vue ├── constants.js ├── helpers │ ├── conversions.js │ └── ws-request.js ├── index.html ├── index.js ├── lib │ └── websocket.js ├── services │ └── api.js ├── static │ ├── 3rd │ │ └── blockly │ │ │ ├── blockly_compressed.js │ │ │ ├── blocks_compressed.js │ │ │ ├── fr.js │ │ │ └── javascript_compressed.js │ └── favicon.ico └── store │ └── app.js ├── banner.png ├── common ├── events.js ├── node-types.js ├── statistics.js └── ws-messages.js ├── dev.bat ├── emulator └── index.js ├── package.json ├── server ├── bin │ └── cli.js ├── bindings │ ├── aqara.js │ └── yeelight.js ├── index.js ├── lib │ ├── automator.js │ ├── bridges │ │ ├── infrastructure-database.js │ │ ├── infrastructure-websocket.js │ │ └── mqtt-infrastructure.js │ ├── client.js │ ├── database.js │ ├── hash.js │ ├── homie-topic-parser.js │ ├── infrastructure │ │ ├── device.js │ │ ├── floor.js │ │ ├── infrastructure.js │ │ ├── node.js │ │ ├── property.js │ │ ├── room.js │ │ └── tag.js │ ├── log.js │ ├── mqtt-client.js │ ├── settings.js │ ├── statistics.js │ ├── validators │ │ ├── schemas │ │ │ └── settings.js │ │ └── settings.js │ └── websocket-server.js ├── migrations │ ├── 20161219145339_initial.js │ ├── 20161219151706_tags.js │ ├── 20161219152015_house-modelization.js │ ├── 20170116152739_automation.js │ └── 20170119120420_settings.js ├── models │ ├── Device.js │ ├── Floor.js │ ├── Node.js │ ├── Property.js │ ├── Room.js │ ├── Tag.js │ ├── auth-token.js │ ├── automation-script.js │ ├── device.js │ ├── floor.js │ ├── node.js │ ├── property-history.js │ ├── property.js │ ├── room.js │ ├── setting.js │ └── tag.js ├── services │ └── database.js └── start.js ├── settings.toml ├── test ├── homie-topic-parser.js └── ws-messages.js ├── vue.config.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | npm-debug.log* 3 | yarn-error.log* 4 | 5 | # Databases 6 | *.db 7 | *.db-journal 8 | 9 | # Build 10 | dist-server 11 | dist-app 12 | 13 | # Dependency directories 14 | node_modules 15 | 16 | # Coverage 17 | coverage 18 | .nyc_output 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 7 4 | 5 | cache: yarn 6 | 7 | env: 8 | - SIDE=server 9 | - SIDE=app 10 | 11 | # Yarn automatically installed and launched at install step 12 | 13 | script: 14 | - | 15 | if [[ "$SIDE" == "server" ]]; then 16 | npm run server-lint 17 | npm run server-test 18 | npm run server-build 19 | fi 20 | - | 21 | if [[ "$SIDE" == "app" ]]; then 22 | npm run app-build 23 | fi 24 | 25 | after_success: 26 | - | 27 | if [[ "$SIDE" == "server" ]]; then 28 | ./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls 29 | fi 30 | 31 | before_deploy: 32 | - cd dist-server 33 | 34 | deploy: 35 | skip_cleanup: true 36 | on: 37 | branch: master 38 | tags: true 39 | node: 7 40 | condition: "$SIDE == server" 41 | provider: npm 42 | email: "$NPM_EMAIL" 43 | api_key: "$NPM_TOKEN" 44 | 45 | after_deploy: 46 | - | 47 | body='{ 48 | "request": { 49 | "branch": "master", 50 | "config": { 51 | "env": { 52 | "global": ["HOMIE_DASHBOARD_VERSION=\"'"$TRAVIS_TAG"'\""] 53 | } 54 | } 55 | } 56 | }' 57 | 58 | curl -s -X POST \ 59 | -H "Content-Type: application/json" \ 60 | -H "Accept: application/json" \ 61 | -H "Travis-API-Version: 3" \ 62 | -H "Authorization: token $TRAVIS_TOKEN" \ 63 | -d "$body" \ 64 | https://api.travis-ci.org/repo/INTECH-RGB%2Fhomie-dashboard-docker/requests 65 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Homie Dashboard code 2 | 3 | ## Styleguides 4 | 5 | ### Git Commit Messages 6 | 7 | * Use the present tense ("Add feature" not "Added feature") 8 | * Use the imperative mood ("Move cursor to..." not "Moves cursor to...") 9 | * Limit the first line to 72 characters or less 10 | * Reference issues and pull requests liberally 11 | * When only changing documentation, include `[ci skip]` in the commit description 12 | * Consider starting the commit message with an applicable emoji: 13 | * :bookmark: `:bookmark:` when bumping version 14 | * :sparkles: `:sparkles:` when adding a new feature 15 | * :art: `:art:` when improving the format/structure of the code 16 | * :racehorse: `:racehorse:` when improving performance 17 | * :non-potable_water: `:non-potable_water:` when plugging memory leaks 18 | * :memo: `:memo:` when writing docs 19 | * :penguin: `:penguin:` when fixing something on Linux 20 | * :apple: `:apple:` when fixing something on macOS 21 | * :checkered_flag: `:checkered_flag:` when fixing something on Windows 22 | * :bug: `:bug:` when fixing a bug 23 | * :fire: `:fire:` when removing code or files 24 | * :green_heart: `:green_heart:` when fixing the CI build 25 | * :white_check_mark: `:white_check_mark:` when adding tests 26 | * :lock: `:lock:` when dealing with security 27 | * :arrow_up: `:arrow_up:` when upgrading dependencies 28 | * :arrow_down: `:arrow_down:` when downgrading dependencies 29 | * :shirt: `:shirt:` when removing linter warnings 30 | 31 | ### JavaScript Styleguide 32 | 33 | All JavaScript must adhere to [JavaScript Standard Style](http://standardjs.com/). 34 | 35 | * Prefer the object spread operator (`{...anotherObj}`) to `Object.assign()` 36 | * Inline `export`s with expressions whenever possible 37 | ```js 38 | // Use this: 39 | export default class ClassName { 40 | 41 | } 42 | 43 | // Instead of: 44 | class ClassName { 45 | 46 | } 47 | export default ClassName 48 | ``` 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |  2 | 3 |
11 | 12 | {{ nodeData.properties.pressed.value === '1' ? 'Pressé' : 'Relâché' }} 13 | 14 | 15 | ? 16 | 17 |
18 |11 | 12 | {{ nodeData.properties.buzzing.value === '1' ? 'Actif' : 'Inactif' }} 13 | 14 | 15 | ? 16 | 17 |
18 |11 | 12 | {{ nodeData.properties.open.value === '1' ? 'Ouverte' : 'Fermée' }} 13 | 14 | 15 | ? 16 | 17 |
18 |14 | 15 | {{ nodeData.properties.degrees.value }} °C 16 | 17 | 18 | ? 19 | 20 |
21 |9 | 10 | {{ nodeData.properties.percentage.value }} % 11 | 12 | 13 | ? 14 | 15 |
16 |13 | 14 | {{ nodeData.properties.intensity.value }} % 15 | 16 | 17 | ? 18 | 19 |
20 | 21 |12 | 13 | {{ nodeData.properties.open.value === '1' ? 'Déverrouillé' : 'Verrouillé' }} 14 | 15 | 16 | ? 17 | 18 |
19 |9 | 10 | {{ nodeData.properties.lux.value }} lx 11 | 12 | 13 | ? 14 | 15 |
16 |11 | 12 | {{ nodeData.properties.motion.value === '1' ? 'Mouvement détecté' : 'Aucun mouvement' }} 13 | 14 | 15 | ? 16 | 17 |
18 |20 | 21 | {{ nodeData.properties.percentage.value }} % 22 | 23 | 24 | ? 25 | 26 |
27 |9 | 10 | {{ nodeData.properties.intensity.value }} dB 11 | 12 | 13 | ? 14 | 15 |
16 |11 | 12 | {{ nodeData.properties.on.value === '1' ? 'ON' : 'OFF' }} 13 | 14 | 15 | ? 16 | 17 |
18 |13 | 14 | {{ this.nodeData.properties.degrees.value }} °C 15 | 16 | 17 | ? 18 | 19 |
20 |12 | 13 | {{ nodeData.properties.open.value === '1' ? 'Ouverte' : 'Fermée' }} 14 | 15 | 16 | ? 17 | 18 |
19 |Pour créer une automatisation : 5 |
Note : Vous pouvez insérer un bloc « et » dans le bloc « si » pour pouvoir définir deux conditions.
13 |Il suffit de déplacer vos blocs sur la partie gauche de l’écran pour qu’ils disparaissent puis appuyer sur le bouton « enregistrer » pour sauvegarder vos modifications.
15 |Lorsque vous écrivez quelque chose dans la barre de recherche en dessous du descriptif de la page, un bouton « créer le tag » apparaît, il suffit de cliquer dessus.
6 |Lorsque vous cliquez sur la barre de recherche, la liste de tous vos tags et de toutes vos pièces apparaît, il suffit de cliquer sur ceux par lesquels vous voulez filtrer la recherche.
8 |Pour cela, cliquez sur l’écrou dans le coin haut-droite de votre périphérique. La page des options du périphérique s’affiche. Un bouton « modifier » est présent à droite du nom de votre périphérique, cliquez dessus, entrez le nom voulu et appuyez ensuite sur « enregistrer ». Le tour est joué.
10 |Commencez par afficher les options de votre périphérique en cliquant sur l’écrou dans le coin haut-droite de celui-ci. Ici, vous pouvez voir deux sous-titres, tag et pièces. Il vous suffit de cliquer sur le nom de la salle ou du tag. Ce dernier va s’afficher en vert et sera donc assigné. (Vous pouvez assigner un périphérique à plusieurs tags/pièces si vous le désirez)
12 |Dans le coin haut-gauche de votre périphérique, à gauche de l’écrou, l’icône statistique est présente. En cliquant dessus, un graphe avec les différentes statistiques possibles s’affichera.
14 |A droite de la page, vous pouvez voir trois boutons : en ligne, tous ou hors ligne. Ces boutons correspondent à l’affichage des périphériques. En cliquant sur « en ligne » seuls les périphériques en ligne s’afficheront. C’est le même fonctionnement pour les deux autres options.
16 |Aide
7 | 8 |Cliquez donc sur « ajouter un étage » situé sur la droite de votre page.
12 |Lorsque vous disposez d’un étage, il apparaît dans l’onglet à gauche du bouton « ajouter une salle ». Pour le supprimer, il suffit de cliquer sur la croix située dans le coin haut droite de votre étage.
14 |Pour cela, il faut au préalable avoir un étage existant. Ensuite, il vous suffit de cliquer sur votre étage qui est apparu et à ce moment-là, le bouton « ajouter une salle » apparaît à droite du bouton « ajouter un étage ».
16 |Une fois votre salle présente sur votre plan, il suffit de cliquer sur la croix située dans le coin haut-gauche de votre salle pour la supprimer.
18 |Bien sûr, et pour cela il suffit de maintenir votre souris enfoncée sur votre salle et la déplacer où vous souhaitez la voir apparaître. Vous pouvez aussi changer la taille de vos salles. Pour cela, placez votre souris dans le coin bas-droite de votre salle, maintenez votre souris enfoncée et vous pourrez agrandir ou réduire la taille de votre salle.
20 |Cette ampoule est associée à un nombre à sa droite. Ce nombre indique combien de périphériques sont associés à votre salle. En cliquant dessus, vous serez directement redirigé vers ces périphériques.
22 |Pour cela, dirigez-vous vers la rubrique Aide de la page "périphériques".
24 |Pour cela, il vous suffit de cliquer sur "modifier" situé à droite de votre mot de passe actuel. 5 | Il ne vous reste plus qu'à entrer le nouveau mot de passe et d'appuyer sur "enregistrer"
6 | 7 |Il va vous permettre d'obtenir le deuxième mot de passe nécessaire à votre connexion. Pour l'utiliser, 9 | il faut télécharger l'application "Google Authenticator" sur votre téléphone puis scanner le QR code. 10 | Ainsi vous pourrez voir le second mot de passe qui change toutes les 30 secondes présent pour plus de sécurité.
11 | 12 |