feat: Initial commit via docker-compose.

This commit is contained in:
Laur Ivan 2022-12-20 12:28:29 +01:00
parent e11ec3ed0d
commit b411b2d2c9
15 changed files with 484 additions and 80 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
*.retry
*/__pycache__
*.pyc
.cache
.venv
.env.yml
docker-compose.yml

View File

@ -1,38 +1,51 @@
Role Name
=========
A brief description of the role goes here.
Launch the KNX monitor.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
None
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
```yml
knx_monitor:
docker_version: "latest"
gateway_ip: "localhost"
topology_file: "{{ \".\" | | expanduser | realpath }}/topology.csv"
influx:
url: "http://localhost:8086"
bucket: "my_bucket"
org: "example.com"
token: "change_me"
```
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
You need to have docker installed on the target machine and influxdb installed somewhere to collect data.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
```yml
- hosts: servers
roles:
- "laurivan.knx_monitor"
```
License
-------
BSD
MIT
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
This role was created in 2022 by [Laur Ivan](https://www.laurivan.com).

View File

@ -1,2 +1,13 @@
---
# defaults file for ansible_role
knx_monitor:
docker_version: "latest"
gateway_ip: "localhost"
config_path: "~/knx-monitor"
topology_source: "./topology.csv"
influx:
url: "http://localhost:8086"
bucket: "my_bucket"
org: "example.com"
token: "change_me"

222
files/topology.csv Normal file
View File

@ -0,0 +1,222 @@
"Group name";"Address";"Central";"Unfiltered";"Description";"DatapointType";"Security"
"Cellar - HVAC";"0/-/-";"";"";"";"";"Auto"
"Media - HVAC";"0/3/-";"";"";"";"";"Auto"
"Valve1-1 Media [CTEMP 1.3.10]";"0/3/6";"";"";"Wellness Lounge H";"DPST-9-1";"Auto"
"Valve1-1 Media [SETPOINT TEMP]";"0/3/7";"";"";"Wellness Lounge H";"DPST-9-1";"Auto"
"Valve1-1 Media [CMD]";"0/3/8";"";"";"Wellness Lounge H";"DPST-5-1";"Auto"
"Valve1-1 Media [OP]";"0/3/9";"";"";"Wellness Lounge H";"DPST-20-102";"Auto"
"Wellness - HVAC";"0/5/-";"";"";"";"";"Auto"
"Valve1-2 Lounge [CTEMP 2.3.1]";"0/5/2";"";"";"Wellness HVAC - Lounge";"DPST-9-1";"Auto"
"Valve1-2 Lounge [SETPOINT TEMP]";"0/5/3";"";"";"Wellness HVAC - Lounge";"DPST-9-1";"Auto"
"Valve1-2 Lounge [CMD]";"0/5/4";"";"";"Wellness HVAC - Lounge";"DPST-5-1";"Auto"
"Valve1-2 Lounge [OP]";"0/5/5";"";"";"Wellness HVAC - Lounge";"DPST-20-102";"Auto"
"Ground floor";"2/-/-";"";"";"";"";"Auto"
"Dining";"2/3/-";"";"";"";"";"Auto"
"Lights1-1[78] Dining all lights [SW]";"2/3/4";"";"";"Dining room All";"DPST-1-1";"Auto"
"Lights1-1[78] Dining all lights [FB]";"2/3/5";"";"";"Dining room All";"DPST-1-1";"Auto"
"Living";"2/6/-";"";"";"";"";"Auto"
"Lights1-[16,18,20,21] Living all [SW]";"2/6/8";"";"";"Living room All";"DPST-1-1";"Auto"
"Lights1-[16,18,20,21] Living all [FB]";"2/6/9";"";"";"Living room All";"DPST-1-1";"Auto"
"First floor - HVAC";"3/-/-";"";"";"";"";"Auto"
"Master bed - HVAC";"3/1/-";"";"";"";"";"Auto"
"Valve2-2 Master bed [CTEMP 2.2.1]";"3/1/14";"";"";"Master HVAC";"DPST-9-1";"Auto"
"Valve2-2 Master bed [SETPOINT TEMP]";"3/1/15";"";"";"Master HVAC";"DPST-9-1";"Auto"
"Valve2-2 Master bed [CMD]";"3/1/16";"";"";"Master HVAC";"DPST-5-1";"Auto"
"Valve2-2 Master bed [OP]";"3/1/17";"";"";"Master HVAC";"DPST-20-102";"Auto"
"Bathroom - HVAC";"3/2/-";"";"";"";"";"Auto"
"Valve2-1 Bathroom [CTEMP 2.2.3]";"3/2/6";"";"";"Bathroom HVAC Bath";"DPST-9-1";"Auto"
"Valve2-1 Bathroom [SETPOINT TEMP]";"3/2/7";"";"";"Bathroom HVAC Bath";"DPST-9-1";"Auto"
"Valve2-1 Bathroom [CMD]";"3/2/8";"";"";"Bathroom HVAC Bath";"DPST-5-1";"Auto"
"Valve2-1 Bathroom [OP]";"3/2/9";"";"";"Bathroom HVAC Bath";"DPST-20-102";"Auto"
"Child - HVAC";"3/3/-";"";"";"";"";"Auto"
"Valve2-4 Child [CTEMP 2.2.2]";"3/3/6";"";"";"Child HVAC Child";"DPST-9-1";"Auto"
"Valve2-4 Child [SETPOINT TEMP]";"3/3/7";"";"";"Child HVAC Child";"DPST-9-1";"Auto"
"Valve2-4 Child [CMD]";"3/3/8";"";"";"Child HVAC Child";"DPST-5-1";"Auto"
"Valve2-4 Child [OP]";"3/3/9";"";"";"Child HVAC Child";"DPST-20-102";"Auto"
"Study - HVAC";"3/5/-";"";"";"";"";"Auto"
"Valve2-3 Study [CTEMP 2.2.4]";"3/5/6";"";"";"Study HVAC";"DPST-9-1";"Auto"
"Valve2-3 Study [SETPOINT TEMP]";"3/5/7";"";"";"Study HVAC";"DPST-9-1";"Auto"
"Valve2-3 Study [CMD]";"3/5/8";"";"";"Study HVAC";"DPST-5-1";"Auto"
"Valve2-3 Study [OP]";"3/5/9";"";"";"Study HVAC";"DPST-20-102";"Auto"
"HVAC";"4/-/-";"";"";"";"";"Auto"
"Media Room";"4/0/-";"";"";"";"";"Auto"
"In house";"4/0/0";"";"";"";"DPST-20-102";"Auto"
"21 degrees rooms";"4/0/1";"";"";"";"DPST-9-1";"Auto"
"23 degrees bathrooms";"4/0/2";"";"";"";"DPST-9-1";"Auto"
"Presence led";"4/0/3";"";"";"";"DPST-1-1";"Auto"
"UG Media";"4/0/4";"";"";"";"DPST-5-1";"Auto"
"UG Lounge";"4/0/5";"";"";"";"DPST-5-1";"Auto"
"GF - Shower";"4/0/6";"";"";"";"DPST-5-1";"Auto"
"GF - Dining";"4/0/7";"";"";"";"DPST-5-1";"Auto"
"GF - Living";"4/0/8";"";"";"";"DPST-5-1";"Auto"
"GF - Guest";"4/0/9";"";"";"";"DPST-5-1";"Auto"
"All valves";"4/0/101";"";"";"";"DPST-5-1";"Auto"
"Setpoint temperature";"4/2/-";"";"";"";"";"Auto"
"UG Media";"4/2/0";"";"";"";"DPST-9-1";"Auto"
"UG Lounge";"4/2/1";"";"";"";"DPST-9-1";"Auto"
"GF - Shower";"4/2/2";"";"";"";"DPST-9-1";"Auto"
"GF - Dining";"4/2/3";"";"";"";"DPST-9-1";"Auto"
"GF - Living";"4/2/4";"";"";"";"DPST-9-1";"Auto"
"GF - Guest";"4/2/5";"";"";"";"DPST-9-1";"Auto"
"FF - Master bed";"4/2/6";"";"";"";"DPST-9-1";"Auto"
"FF - Child";"4/2/7";"";"";"";"DPST-9-1";"Auto"
"Valve position";"4/3/-";"";"";"";"";"Auto"
"UG Media";"4/3/0";"";"";"";"DPST-5-1";"Auto"
"UG Lounge";"4/3/1";"";"";"";"DPST-5-1";"Auto"
"GF - Shower";"4/3/2";"";"";"";"DPST-5-1";"Auto"
"GF - Dining";"4/3/3";"";"";"";"DPST-5-1";"Auto"
"GF - Living";"4/3/4";"";"";"";"DPST-5-1";"Auto"
"GF - Guest";"4/3/5";"";"";"";"DPST-5-1";"Auto"
"FF - Master bed";"4/3/6";"";"";"";"DPST-5-1";"Auto"
"FF - Child";"4/3/7";"";"";"";"DPST-5-1";"Auto"
"UG - Building based";"5/-/-";"";"";"";"";"Auto"
"Scene";"5/0/-";"";"";"";"";"Auto"
"Lights1-[567] - Media all lights SW";"5/0/0";"";"";"Media all lamps switching feedback";"DPST-1-1";"Auto"
"Lights1-[567] - Media all lights FB";"5/0/1";"";"";"Media all lamps switching feedback
Sender done via NodeRed.";"DPST-1-1";"Auto"
"Lighting";"5/1/-";"";"";"";"";"Auto"
"Lights1-1 Tech room SW";"5/1/0";"";"";"";"DPST-1-1";"Auto"
"Lights1-1 Tech room FB";"5/1/1";"";"";"";"DPST-1-1";"Auto"
"Lights1-2 Storage SW";"5/1/2";"";"";"";"DPST-1-1";"Auto"
"Lights1-2 Storage FB";"5/1/3";"";"";"";"DPST-1-1";"Auto"
"Lights1-3 Server SW";"5/1/4";"";"";"";"DPST-1-1";"Auto"
"Lights1-3 Server FB";"5/1/5";"";"";"";"DPST-1-1";"Auto"
"Lights1-4 Hall SW";"5/1/6";"";"";"";"DPST-1-1";"Auto"
"Lights1-4 Hall FB";"5/1/7";"";"";"";"DPST-1-1";"Auto"
"Lights1-5 Media back SW";"5/1/8";"";"";"";"DPST-1-1";"Auto"
"Lights1-5 Media back FB";"5/1/9";"";"";"";"DPST-1-1";"Auto"
"Lights1-6 Media mid SW";"5/1/10";"";"";"";"DPST-1-1";"Auto"
"Lights1-6 Media mid FB";"5/1/11";"";"";"";"DPST-1-1";"Auto"
"Lights1-7 Media front SW";"5/1/12";"";"";"";"DPST-1-1";"Auto"
"Lights1-7 Media front FB";"5/1/13";"";"";"";"DPST-1-1";"Auto"
"Shutter";"5/2/-";"";"";"";"";"Auto"
"Heating";"5/3/-";"";"";"";"";"Auto"
"Timers";"5/4/-";"";"";"";"";"Auto"
"GF - Building Based";"6/-/-";"";"";"";"";"Auto"
"Scene";"6/0/-";"";"";"";"";"Auto"
"Lights1-2[34] Shower, all lights [SW]";"6/0/0";"";"";"Shower both lamps switching";"DPST-1-1";"Auto"
"Lights1-2[34] Shower, all lights [FB]";"6/0/1";"";"";"Shower both lamps switching feedback
Feedback received via NodeRed";"DPST-1-1";"Auto"
"Lights1-1[45] Kitchen, all lights [SW]";"6/0/2";"";"";"";"DPST-1-1";"Auto"
"Lights1-1[45] Kitchen, all lights [FB]";"6/0/3";"";"";"";"DPST-1-1";"Auto"
"Lights[1-13,2-13] Hallway [SW]";"6/0/4";"";"";"";"DPST-1-1";"Auto"
"Lights[1-13,2-13] Hallway [FB]";"6/0/5";"";"";"";"DPST-1-1";"Auto"
"Lighting";"6/1/-";"";"";"";"";"Auto"
"Lights1-8 Guest, Ceiling lamp [SW]";"6/1/0";"";"";"Guest ceiling lamp switching";"DPST-1-1";"Auto"
"Lights1-8 Guest, Ceiling lamp [FB]";"6/1/1";"";"";"Guest ceiling lamp switching feedback";"DPST-1-1";"Auto"
"Lights1-23 Shower, Ceiling lamp [SW]";"6/1/2";"";"";"Shower ceiling lamp switching";"DPST-1-1";"Auto"
"Lights1-23 Shower, Ceiling lamp [FB]";"6/1/3";"";"";"Shower ceiling lamp switching feedback";"DPST-1-1";"Auto"
"Lights1-24 Shower, Mirror lamp [SW]";"6/1/4";"";"";"Shower mirror lamp switching";"DPST-1-1";"Auto"
"Lights1-24 Shower, Mirror lamp [FB]";"6/1/5";"";"";"Shower mirror lamp switching";"DPST-1-1";"Auto"
"Lights1-9 Storage, Ceiling lamp [SW]";"6/1/6";"";"";"Storage ceiling lamps switching";"DPST-1-1";"Auto"
"Lights1-9 Storage, Ceiling lamp [FB]";"6/1/7";"";"";"Storage ceiling lamps feedback";"DPST-1-1";"Auto"
"Lights1-14 Kitchen ceiling [SW]";"6/1/8";"";"";"";"DPST-1-1";"Auto"
"Lights1-14 Kitchen ceiling [FB]";"6/1/9";"";"";"";"DPST-1-1";"Auto"
"Lights1-22 Staircase [SW]";"6/1/10";"";"";"";"DPST-1-1";"Auto"
"Lights1-22 Staircase [FB]";"6/1/11";"";"";"";"DPST-1-1";"Auto"
"Light1-14 Kitchen rail [SW]";"6/1/12";"";"";"";"DPST-1-1";"Auto"
"Light1-14 Kitchen rail [FB]";"6/1/13";"";"";"";"DPST-1-1";"Auto"
"Lights1-17 Dining rail [SW]";"6/1/14";"";"";"Dining room Beam";"DPST-1-1";"Auto"
"Lights1-17 Dining rail [FB]";"6/1/15";"";"";"Dining room Beam";"DPST-1-1";"Auto"
"Lights1-18 Dining top [SW]";"6/1/16";"";"";"Dining room Top";"DPST-1-1";"Auto"
"Lights1-18 Dining top [FB]";"6/1/17";"";"";"Dining room Top";"DPST-1-1";"Auto"
"Lights1-16 Living hall [SW]";"6/1/18";"";"";"Living room Living hall";"DPST-1-1";"Auto"
"Lights1-16 Living hall [FB]";"6/1/19";"";"";"Living room Living hall";"DPST-1-1";"Auto"
"Lights1-19 Living main [SW]";"6/1/20";"";"";"Living room Living main";"DPST-1-1";"Auto"
"Lights1-19 Living main [FB]";"6/1/21";"";"";"Living room Living main";"DPST-1-1";"Auto"
"Lights1-20 Living beam [SW]";"6/1/22";"";"";"Living room Living rail";"DPST-1-1";"Auto"
"Lights1-20 Living beam [FB]";"6/1/23";"";"";"Living room Living rail";"DPST-1-1";"Auto"
"Lights1-21 Living back [SW]";"6/1/24";"";"";"Living room Living accent";"DPST-1-1";"Auto"
"Lights1-21 Living back [FB]";"6/1/25";"";"";"Living room Living accent";"DPST-1-1";"Auto"
"Shutter";"6/2/-";"";"";"";"";"Auto"
"HVAC";"6/3/-";"";"";"";"";"Auto"
"Valve1 - 6 Living heating [CTEMP 2.1.11]";"6/3/0";"";"";"Living accents";"DPST-9-1";"Auto"
"Valve1 - 6 Living heating [CTEMP 2.1.13]";"6/3/1";"";"";"Living stairs";"DPST-9-1";"Auto"
"Valve1 - 6 Living heating [CTEMP 2.1.10]";"6/3/2";"";"";"Living main";"DPST-9-1";"Auto"
"Valve1 - 6 Living heating [CMD]";"6/3/3";"";"";"Living room HVAC";"DPST-5-1";"Auto"
"Valve1 - 6 Living heating [SETPOINT TEMP]";"6/3/4";"";"";"Living room HVAC";"DPST-9-1";"Auto"
"Valve1 - 6 Living heating [OP]";"6/3/5";"";"";"Living room HVAC";"DPST-20-102";"Auto"
"Valve1 - 5 Dining heating [CTEMP 2.1.8]";"6/3/6";"";"";"Dining thermo";"DPST-9-1";"Auto"
"Valve1 - 5 Dining heating [CTEMP 2.1.9]";"6/3/7";"";"";"Dining door";"DPST-9-1";"Auto"
"Valve1 - 5 Dining heating [CMD]";"6/3/8";"";"";"Dining room HVAC";"DPST-5-1";"Auto"
"Valve1 - 5 Dining heating [SETPOINT TEMP]";"6/3/9";"";"";"Dining room HVAC";"DPST-9-1";"Auto"
"Valve1 - 5 Dining heating [OP]";"6/3/10";"";"";"Dining room HVAC";"DPST-20-102";"Auto"
"Valve1-4 Shower [CTEMP 2.1.7]";"6/3/11";"";"";"Shower";"DPST-9-1";"Auto"
"Valve1-4 Shower [CMD]";"6/3/12";"";"";"Shower HVAC";"DPST-5-1";"Auto"
"Valve1-4 Shower [STEPOINT TEMP]";"6/3/13";"";"";"Shower HVAC";"DPST-9-1";"Auto"
"Valve1-4 Shower [OP]";"6/3/14";"";"";"Shower HVAC";"DPST-20-102";"Auto"
"Valve1-3 Guest [CTEMP 2.1.1]";"6/3/15";"";"";"Guest room";"DPST-9-1";"Auto"
"Valve1-3 Guest [STEPOINT TEMP]";"6/3/16";"";"";"Guest room HVAC - Guest";"DPST-9-1";"Auto"
"Valve1-3 Guest [CMD]";"6/3/17";"";"";"Guest room HVAC - Guest";"DPST-5-1";"Auto"
"Valve1-3 Guest [OP]";"6/3/18";"";"";"Guest room HVAC - Guest";"DPST-20-102";"Auto"
"Valve1-X Entrance [CTEMP 2.1.2]";"6/3/19";"";"";"Entrance";"DPST-9-1";"Auto"
"Valve1-X Entrance [CTEMP 2.1.3]";"6/3/20";"";"";"Hallway";"DPST-9-1";"Auto"
"Valve1-X Storage [CTEMP 2.1.4]";"6/3/21";"";"";"Storage";"DPST-9-1";"Auto"
"Valve1-X Kitchen [CTEMP 2.1.5]";"6/3/22";"";"";"Kitchen entrance";"DPST-9-1";"Auto"
"Valve1-X Stairway [CTEMP 2.1.6]";"6/3/23";"";"";"Stairway GF";"DPST-9-1";"Auto"
"Valve1-X Slider [CTEMP 2.1.12]";"6/3/24";"";"";"Slider";"DPST-9-1";"Auto"
"Valve1-X Kitchen front [CTEMP 2.1.14]";"6/3/25";"";"";"Kitchen front";"DPST-9-1";"Auto"
"Timers";"6/4/-";"";"";"";"";"Auto"
"Current Time";"6/4/0";"";"";"";"DPST-10-1";"Auto"
"Led night reduction - Guest";"6/4/1";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Hallway";"6/4/2";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Shower";"6/4/3";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Kitchen";"6/4/4";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Dining";"6/4/5";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Living";"6/4/6";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Stairs";"6/4/7";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Storage";"6/4/8";"";"";"";"DPST-1-1";"Auto"
"FF - Building Based";"7/-/-";"";"";"";"";"Auto"
"Scene";"7/0/-";"";"";"";"";"Auto"
"Lights2-[567] Master bed, all lights SW";"7/0/0";"";"";"Master bedroom all lamps switching feedback";"DPST-1-1";"Auto"
"Lights2-[567] Master bed, all lights FB";"7/0/1";"";"";"Master bedroom all lamps switching feedback
Feedback received via NodeRed";"DPST-1-1";"Auto"
"Lights2-[4,11] Study all lights SW";"7/0/2";"";"";"";"DPST-1-1";"Auto"
"Lights2-[4,11] Study all lights FB";"7/0/3";"";"";"";"DPST-1-1";"Auto"
"Lighting";"7/1/-";"";"";"";"";"Auto"
"Lights2-7 Master bed Ceiling 1 SW";"7/1/0";"";"";"";"DPST-1-1";"Auto"
"Lights2-7 Master bed Ceiling 1 FB";"7/1/1";"";"";"";"DPST-1-1";"Auto"
"Lights2-6 Master bed Ceiling 2 SW";"7/1/2";"";"";"";"DPST-1-1";"Auto"
"Lights2-6 Master bed Ceiling 2 FB";"7/1/3";"";"";"";"DPST-1-1";"Auto"
"Lights2-5 Master bed Beam SW";"7/1/4";"";"";"";"DPST-1-1";"Auto"
"Lights2-5 Master bed Beam FB";"7/1/5";"";"";"";"DPST-1-1";"Auto"
"Lights2-8 Storage SW";"7/1/6";"";"";"";"DPST-1-1";"Auto"
"Lights2-8 Storage FB";"7/1/7";"";"";"";"DPST-1-1";"Auto"
"Lights2-15 Bath Rail SW";"7/1/8";"";"";"";"DPST-1-1";"Auto"
"Lights2-15 Bath Rail FB";"7/1/9";"";"";"";"DPST-1-1";"Auto"
"Lights2-15 Bath mirror backlit SW";"7/1/10";"";"";"";"DPST-1-1";"Auto"
"Lights2-15 Bath mirror backlit FB";"7/1/11";"";"";"";"DPST-1-1";"Auto"
"Lights2-15 Bath focus SW";"7/1/12";"";"";"";"DPST-1-1";"Auto"
"Lights2-15 Bath focus FB";"7/1/13";"";"";"";"DPST-1-1";"Auto"
"Lights2-1 Kid rail SW";"7/1/14";"";"";"";"DPST-1-1";"Auto"
"Lights2-1 Kid rail FB";"7/1/15";"";"";"";"DPST-1-1";"Auto"
"Lights2-1 Kid ceiling SW";"7/1/16";"";"";"";"DPST-1-1";"Auto"
"Lights2-1 Kid ceiling FB";"7/1/17";"";"";"";"DPST-1-1";"Auto"
"Lights2-1 Kid wall SW";"7/1/18";"";"";"";"DPST-1-1";"Auto"
"Lights2-1 Kid wall FB";"7/1/19";"";"";"";"DPST-1-1";"Auto"
"Lights2-12 Hallway SW";"7/1/20";"";"";"";"DPST-1-1";"Auto"
"Lights2-12 Hallway FB";"7/1/21";"";"";"";"DPST-1-1";"Auto"
"Light2-4 Study rail SW";"7/1/22";"";"";"";"DPST-1-1";"Auto"
"Light2-4 Study rail FB";"7/1/23";"";"";"";"DPST-1-1";"Auto"
"Light11-4 Study stairs SW";"7/1/24";"";"";"";"DPST-1-1";"Auto"
"Light11-4 Study stairs FB";"7/1/25";"";"";"";"DPST-1-1";"Auto"
"Shutter";"7/2/-";"";"";"";"";"Auto"
"Heating";"7/3/-";"";"";"";"";"Auto"
"Timers";"7/4/-";"";"";"";"";"Auto"
"Led night reduction - Master bed";"7/4/0";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Child bed";"7/4/1";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Open space";"7/4/2";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Bathroom";"7/4/3";"";"";"";"DPST-1-1";"Auto"
"Led night reduction - Storage";"7/4/4";"";"";"";"DPST-1-1";"Auto"
"Outside - Building based";"8/-/-";"";"";"";"";"Auto"
"Scene";"8/0/-";"";"";"";"";"Auto"
"Lighting";"8/1/-";"";"";"";"";"Auto"
"Lights1-10 Out left SW";"8/1/0";"";"";"";"DPST-1-1";"Auto"
"Lights1-10 Out left FB";"8/1/1";"";"";"";"DPST-1-1";"Auto"
"Lights2-14 Out entrance SW";"8/1/2";"";"";"";"DPST-1-1";"Auto"
"Lights2-14 Out entrance FB";"8/1/3";"";"";"";"DPST-1-1";"Auto"
"Lights1-10,2-14 Out SW";"8/1/4";"";"";"";"DPST-1-1";"Auto"
"Lights1-10,2-14 Out FB";"8/1/5";"";"";"";"DPST-1-1";"Auto"
"Shutter";"8/2/-";"";"";"";"";"Auto"
"Heating";"8/3/-";"";"";"";"";"Auto"
"Timers";"8/4/-";"";"";"";"";"Auto"
1 Group name Address Central Unfiltered Description DatapointType Security
2 Cellar - HVAC 0/-/- Auto
3 Media - HVAC 0/3/- Auto
4 Valve1-1 Media [CTEMP 1.3.10] 0/3/6 Wellness Lounge H DPST-9-1 Auto
5 Valve1-1 Media [SETPOINT TEMP] 0/3/7 Wellness Lounge H DPST-9-1 Auto
6 Valve1-1 Media [CMD] 0/3/8 Wellness Lounge H DPST-5-1 Auto
7 Valve1-1 Media [OP] 0/3/9 Wellness Lounge H DPST-20-102 Auto
8 Wellness - HVAC 0/5/- Auto
9 Valve1-2 Lounge [CTEMP 2.3.1] 0/5/2 Wellness HVAC - Lounge DPST-9-1 Auto
10 Valve1-2 Lounge [SETPOINT TEMP] 0/5/3 Wellness HVAC - Lounge DPST-9-1 Auto
11 Valve1-2 Lounge [CMD] 0/5/4 Wellness HVAC - Lounge DPST-5-1 Auto
12 Valve1-2 Lounge [OP] 0/5/5 Wellness HVAC - Lounge DPST-20-102 Auto
13 Ground floor 2/-/- Auto
14 Dining 2/3/- Auto
15 Lights1-1[78] Dining all lights [SW] 2/3/4 Dining room All DPST-1-1 Auto
16 Lights1-1[78] Dining all lights [FB] 2/3/5 Dining room All DPST-1-1 Auto
17 Living 2/6/- Auto
18 Lights1-[16,18,20,21] Living all [SW] 2/6/8 Living room All DPST-1-1 Auto
19 Lights1-[16,18,20,21] Living all [FB] 2/6/9 Living room All DPST-1-1 Auto
20 First floor - HVAC 3/-/- Auto
21 Master bed - HVAC 3/1/- Auto
22 Valve2-2 Master bed [CTEMP 2.2.1] 3/1/14 Master HVAC DPST-9-1 Auto
23 Valve2-2 Master bed [SETPOINT TEMP] 3/1/15 Master HVAC DPST-9-1 Auto
24 Valve2-2 Master bed [CMD] 3/1/16 Master HVAC DPST-5-1 Auto
25 Valve2-2 Master bed [OP] 3/1/17 Master HVAC DPST-20-102 Auto
26 Bathroom - HVAC 3/2/- Auto
27 Valve2-1 Bathroom [CTEMP 2.2.3] 3/2/6 Bathroom HVAC Bath DPST-9-1 Auto
28 Valve2-1 Bathroom [SETPOINT TEMP] 3/2/7 Bathroom HVAC Bath DPST-9-1 Auto
29 Valve2-1 Bathroom [CMD] 3/2/8 Bathroom HVAC Bath DPST-5-1 Auto
30 Valve2-1 Bathroom [OP] 3/2/9 Bathroom HVAC Bath DPST-20-102 Auto
31 Child - HVAC 3/3/- Auto
32 Valve2-4 Child [CTEMP 2.2.2] 3/3/6 Child HVAC Child DPST-9-1 Auto
33 Valve2-4 Child [SETPOINT TEMP] 3/3/7 Child HVAC Child DPST-9-1 Auto
34 Valve2-4 Child [CMD] 3/3/8 Child HVAC Child DPST-5-1 Auto
35 Valve2-4 Child [OP] 3/3/9 Child HVAC Child DPST-20-102 Auto
36 Study - HVAC 3/5/- Auto
37 Valve2-3 Study [CTEMP 2.2.4] 3/5/6 Study HVAC DPST-9-1 Auto
38 Valve2-3 Study [SETPOINT TEMP] 3/5/7 Study HVAC DPST-9-1 Auto
39 Valve2-3 Study [CMD] 3/5/8 Study HVAC DPST-5-1 Auto
40 Valve2-3 Study [OP] 3/5/9 Study HVAC DPST-20-102 Auto
41 HVAC 4/-/- Auto
42 Media Room 4/0/- Auto
43 In house 4/0/0 DPST-20-102 Auto
44 21 degrees rooms 4/0/1 DPST-9-1 Auto
45 23 degrees bathrooms 4/0/2 DPST-9-1 Auto
46 Presence led 4/0/3 DPST-1-1 Auto
47 UG Media 4/0/4 DPST-5-1 Auto
48 UG Lounge 4/0/5 DPST-5-1 Auto
49 GF - Shower 4/0/6 DPST-5-1 Auto
50 GF - Dining 4/0/7 DPST-5-1 Auto
51 GF - Living 4/0/8 DPST-5-1 Auto
52 GF - Guest 4/0/9 DPST-5-1 Auto
53 All valves 4/0/101 DPST-5-1 Auto
54 Setpoint temperature 4/2/- Auto
55 UG Media 4/2/0 DPST-9-1 Auto
56 UG Lounge 4/2/1 DPST-9-1 Auto
57 GF - Shower 4/2/2 DPST-9-1 Auto
58 GF - Dining 4/2/3 DPST-9-1 Auto
59 GF - Living 4/2/4 DPST-9-1 Auto
60 GF - Guest 4/2/5 DPST-9-1 Auto
61 FF - Master bed 4/2/6 DPST-9-1 Auto
62 FF - Child 4/2/7 DPST-9-1 Auto
63 Valve position 4/3/- Auto
64 UG Media 4/3/0 DPST-5-1 Auto
65 UG Lounge 4/3/1 DPST-5-1 Auto
66 GF - Shower 4/3/2 DPST-5-1 Auto
67 GF - Dining 4/3/3 DPST-5-1 Auto
68 GF - Living 4/3/4 DPST-5-1 Auto
69 GF - Guest 4/3/5 DPST-5-1 Auto
70 FF - Master bed 4/3/6 DPST-5-1 Auto
71 FF - Child 4/3/7 DPST-5-1 Auto
72 UG - Building based 5/-/- Auto
73 Scene 5/0/- Auto
74 Lights1-[567] - Media all lights SW 5/0/0 Media all lamps switching feedback DPST-1-1 Auto
75 Lights1-[567] - Media all lights FB 5/0/1 Media all lamps switching feedback Sender done via NodeRed. DPST-1-1 Auto
76 Lighting 5/1/- Auto
77 Lights1-1 Tech room SW 5/1/0 DPST-1-1 Auto
78 Lights1-1 Tech room FB 5/1/1 DPST-1-1 Auto
79 Lights1-2 Storage SW 5/1/2 DPST-1-1 Auto
80 Lights1-2 Storage FB 5/1/3 DPST-1-1 Auto
81 Lights1-3 Server SW 5/1/4 DPST-1-1 Auto
82 Lights1-3 Server FB 5/1/5 DPST-1-1 Auto
83 Lights1-4 Hall SW 5/1/6 DPST-1-1 Auto
84 Lights1-4 Hall FB 5/1/7 DPST-1-1 Auto
85 Lights1-5 Media back SW 5/1/8 DPST-1-1 Auto
86 Lights1-5 Media back FB 5/1/9 DPST-1-1 Auto
87 Lights1-6 Media mid SW 5/1/10 DPST-1-1 Auto
88 Lights1-6 Media mid FB 5/1/11 DPST-1-1 Auto
89 Lights1-7 Media front SW 5/1/12 DPST-1-1 Auto
90 Lights1-7 Media front FB 5/1/13 DPST-1-1 Auto
91 Shutter 5/2/- Auto
92 Heating 5/3/- Auto
93 Timers 5/4/- Auto
94 GF - Building Based 6/-/- Auto
95 Scene 6/0/- Auto
96 Lights1-2[34] Shower, all lights [SW] 6/0/0 Shower both lamps switching DPST-1-1 Auto
97 Lights1-2[34] Shower, all lights [FB] 6/0/1 Shower both lamps switching feedback Feedback received via NodeRed DPST-1-1 Auto
98 Lights1-1[45] Kitchen, all lights [SW] 6/0/2 DPST-1-1 Auto
99 Lights1-1[45] Kitchen, all lights [FB] 6/0/3 DPST-1-1 Auto
100 Lights[1-13,2-13] Hallway [SW] 6/0/4 DPST-1-1 Auto
101 Lights[1-13,2-13] Hallway [FB] 6/0/5 DPST-1-1 Auto
102 Lighting 6/1/- Auto
103 Lights1-8 Guest, Ceiling lamp [SW] 6/1/0 Guest ceiling lamp switching DPST-1-1 Auto
104 Lights1-8 Guest, Ceiling lamp [FB] 6/1/1 Guest ceiling lamp switching feedback DPST-1-1 Auto
105 Lights1-23 Shower, Ceiling lamp [SW] 6/1/2 Shower ceiling lamp switching DPST-1-1 Auto
106 Lights1-23 Shower, Ceiling lamp [FB] 6/1/3 Shower ceiling lamp switching feedback DPST-1-1 Auto
107 Lights1-24 Shower, Mirror lamp [SW] 6/1/4 Shower mirror lamp switching DPST-1-1 Auto
108 Lights1-24 Shower, Mirror lamp [FB] 6/1/5 Shower mirror lamp switching DPST-1-1 Auto
109 Lights1-9 Storage, Ceiling lamp [SW] 6/1/6 Storage ceiling lamps switching DPST-1-1 Auto
110 Lights1-9 Storage, Ceiling lamp [FB] 6/1/7 Storage ceiling lamps feedback DPST-1-1 Auto
111 Lights1-14 Kitchen ceiling [SW] 6/1/8 DPST-1-1 Auto
112 Lights1-14 Kitchen ceiling [FB] 6/1/9 DPST-1-1 Auto
113 Lights1-22 Staircase [SW] 6/1/10 DPST-1-1 Auto
114 Lights1-22 Staircase [FB] 6/1/11 DPST-1-1 Auto
115 Light1-14 Kitchen rail [SW] 6/1/12 DPST-1-1 Auto
116 Light1-14 Kitchen rail [FB] 6/1/13 DPST-1-1 Auto
117 Lights1-17 Dining rail [SW] 6/1/14 Dining room Beam DPST-1-1 Auto
118 Lights1-17 Dining rail [FB] 6/1/15 Dining room Beam DPST-1-1 Auto
119 Lights1-18 Dining top [SW] 6/1/16 Dining room Top DPST-1-1 Auto
120 Lights1-18 Dining top [FB] 6/1/17 Dining room Top DPST-1-1 Auto
121 Lights1-16 Living hall [SW] 6/1/18 Living room Living hall DPST-1-1 Auto
122 Lights1-16 Living hall [FB] 6/1/19 Living room Living hall DPST-1-1 Auto
123 Lights1-19 Living main [SW] 6/1/20 Living room Living main DPST-1-1 Auto
124 Lights1-19 Living main [FB] 6/1/21 Living room Living main DPST-1-1 Auto
125 Lights1-20 Living beam [SW] 6/1/22 Living room Living rail DPST-1-1 Auto
126 Lights1-20 Living beam [FB] 6/1/23 Living room Living rail DPST-1-1 Auto
127 Lights1-21 Living back [SW] 6/1/24 Living room Living accent DPST-1-1 Auto
128 Lights1-21 Living back [FB] 6/1/25 Living room Living accent DPST-1-1 Auto
129 Shutter 6/2/- Auto
130 HVAC 6/3/- Auto
131 Valve1 - 6 Living heating [CTEMP 2.1.11] 6/3/0 Living accents DPST-9-1 Auto
132 Valve1 - 6 Living heating [CTEMP 2.1.13] 6/3/1 Living stairs DPST-9-1 Auto
133 Valve1 - 6 Living heating [CTEMP 2.1.10] 6/3/2 Living main DPST-9-1 Auto
134 Valve1 - 6 Living heating [CMD] 6/3/3 Living room HVAC DPST-5-1 Auto
135 Valve1 - 6 Living heating [SETPOINT TEMP] 6/3/4 Living room HVAC DPST-9-1 Auto
136 Valve1 - 6 Living heating [OP] 6/3/5 Living room HVAC DPST-20-102 Auto
137 Valve1 - 5 Dining heating [CTEMP 2.1.8] 6/3/6 Dining thermo DPST-9-1 Auto
138 Valve1 - 5 Dining heating [CTEMP 2.1.9] 6/3/7 Dining door DPST-9-1 Auto
139 Valve1 - 5 Dining heating [CMD] 6/3/8 Dining room HVAC DPST-5-1 Auto
140 Valve1 - 5 Dining heating [SETPOINT TEMP] 6/3/9 Dining room HVAC DPST-9-1 Auto
141 Valve1 - 5 Dining heating [OP] 6/3/10 Dining room HVAC DPST-20-102 Auto
142 Valve1-4 Shower [CTEMP 2.1.7] 6/3/11 Shower DPST-9-1 Auto
143 Valve1-4 Shower [CMD] 6/3/12 Shower HVAC DPST-5-1 Auto
144 Valve1-4 Shower [STEPOINT TEMP] 6/3/13 Shower HVAC DPST-9-1 Auto
145 Valve1-4 Shower [OP] 6/3/14 Shower HVAC DPST-20-102 Auto
146 Valve1-3 Guest [CTEMP 2.1.1] 6/3/15 Guest room DPST-9-1 Auto
147 Valve1-3 Guest [STEPOINT TEMP] 6/3/16 Guest room HVAC - Guest DPST-9-1 Auto
148 Valve1-3 Guest [CMD] 6/3/17 Guest room HVAC - Guest DPST-5-1 Auto
149 Valve1-3 Guest [OP] 6/3/18 Guest room HVAC - Guest DPST-20-102 Auto
150 Valve1-X Entrance [CTEMP 2.1.2] 6/3/19 Entrance DPST-9-1 Auto
151 Valve1-X Entrance [CTEMP 2.1.3] 6/3/20 Hallway DPST-9-1 Auto
152 Valve1-X Storage [CTEMP 2.1.4] 6/3/21 Storage DPST-9-1 Auto
153 Valve1-X Kitchen [CTEMP 2.1.5] 6/3/22 Kitchen entrance DPST-9-1 Auto
154 Valve1-X Stairway [CTEMP 2.1.6] 6/3/23 Stairway GF DPST-9-1 Auto
155 Valve1-X Slider [CTEMP 2.1.12] 6/3/24 Slider DPST-9-1 Auto
156 Valve1-X Kitchen front [CTEMP 2.1.14] 6/3/25 Kitchen front DPST-9-1 Auto
157 Timers 6/4/- Auto
158 Current Time 6/4/0 DPST-10-1 Auto
159 Led night reduction - Guest 6/4/1 DPST-1-1 Auto
160 Led night reduction - Hallway 6/4/2 DPST-1-1 Auto
161 Led night reduction - Shower 6/4/3 DPST-1-1 Auto
162 Led night reduction - Kitchen 6/4/4 DPST-1-1 Auto
163 Led night reduction - Dining 6/4/5 DPST-1-1 Auto
164 Led night reduction - Living 6/4/6 DPST-1-1 Auto
165 Led night reduction - Stairs 6/4/7 DPST-1-1 Auto
166 Led night reduction - Storage 6/4/8 DPST-1-1 Auto
167 FF - Building Based 7/-/- Auto
168 Scene 7/0/- Auto
169 Lights2-[567] Master bed, all lights SW 7/0/0 Master bedroom all lamps switching feedback DPST-1-1 Auto
170 Lights2-[567] Master bed, all lights FB 7/0/1 Master bedroom all lamps switching feedback Feedback received via NodeRed DPST-1-1 Auto
171 Lights2-[4,11] Study all lights SW 7/0/2 DPST-1-1 Auto
172 Lights2-[4,11] Study all lights FB 7/0/3 DPST-1-1 Auto
173 Lighting 7/1/- Auto
174 Lights2-7 Master bed Ceiling 1 SW 7/1/0 DPST-1-1 Auto
175 Lights2-7 Master bed Ceiling 1 FB 7/1/1 DPST-1-1 Auto
176 Lights2-6 Master bed Ceiling 2 SW 7/1/2 DPST-1-1 Auto
177 Lights2-6 Master bed Ceiling 2 FB 7/1/3 DPST-1-1 Auto
178 Lights2-5 Master bed Beam SW 7/1/4 DPST-1-1 Auto
179 Lights2-5 Master bed Beam FB 7/1/5 DPST-1-1 Auto
180 Lights2-8 Storage SW 7/1/6 DPST-1-1 Auto
181 Lights2-8 Storage FB 7/1/7 DPST-1-1 Auto
182 Lights2-15 Bath Rail SW 7/1/8 DPST-1-1 Auto
183 Lights2-15 Bath Rail FB 7/1/9 DPST-1-1 Auto
184 Lights2-15 Bath mirror backlit SW 7/1/10 DPST-1-1 Auto
185 Lights2-15 Bath mirror backlit FB 7/1/11 DPST-1-1 Auto
186 Lights2-15 Bath focus SW 7/1/12 DPST-1-1 Auto
187 Lights2-15 Bath focus FB 7/1/13 DPST-1-1 Auto
188 Lights2-1 Kid rail SW 7/1/14 DPST-1-1 Auto
189 Lights2-1 Kid rail FB 7/1/15 DPST-1-1 Auto
190 Lights2-1 Kid ceiling SW 7/1/16 DPST-1-1 Auto
191 Lights2-1 Kid ceiling FB 7/1/17 DPST-1-1 Auto
192 Lights2-1 Kid wall SW 7/1/18 DPST-1-1 Auto
193 Lights2-1 Kid wall FB 7/1/19 DPST-1-1 Auto
194 Lights2-12 Hallway SW 7/1/20 DPST-1-1 Auto
195 Lights2-12 Hallway FB 7/1/21 DPST-1-1 Auto
196 Light2-4 Study rail SW 7/1/22 DPST-1-1 Auto
197 Light2-4 Study rail FB 7/1/23 DPST-1-1 Auto
198 Light11-4 Study stairs SW 7/1/24 DPST-1-1 Auto
199 Light11-4 Study stairs FB 7/1/25 DPST-1-1 Auto
200 Shutter 7/2/- Auto
201 Heating 7/3/- Auto
202 Timers 7/4/- Auto
203 Led night reduction - Master bed 7/4/0 DPST-1-1 Auto
204 Led night reduction - Child bed 7/4/1 DPST-1-1 Auto
205 Led night reduction - Open space 7/4/2 DPST-1-1 Auto
206 Led night reduction - Bathroom 7/4/3 DPST-1-1 Auto
207 Led night reduction - Storage 7/4/4 DPST-1-1 Auto
208 Outside - Building based 8/-/- Auto
209 Scene 8/0/- Auto
210 Lighting 8/1/- Auto
211 Lights1-10 Out left SW 8/1/0 DPST-1-1 Auto
212 Lights1-10 Out left FB 8/1/1 DPST-1-1 Auto
213 Lights2-14 Out entrance SW 8/1/2 DPST-1-1 Auto
214 Lights2-14 Out entrance FB 8/1/3 DPST-1-1 Auto
215 Lights1-10,2-14 Out SW 8/1/4 DPST-1-1 Auto
216 Lights1-10,2-14 Out FB 8/1/5 DPST-1-1 Auto
217 Shutter 8/2/- Auto
218 Heating 8/3/- Auto
219 Timers 8/4/- Auto

View File

@ -1,2 +1,9 @@
---
# handlers file for ansible_role
- name: Restart knx-monitor
community.docker.docker_compose:
project_src: "{{ knx_monitor.config_path | expanduser | realpath }}"
build: false
restarted: true
become: false

View File

@ -1,56 +1,35 @@
galaxy_info:
author: Laur Ivan
description: Dev
company: laurivan.com
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
namespace: laurivan
role_name: knx_monitor
description: KNX Monitor Docker
license: MIT
min_ansible_version: 2.1
min_ansible_version: "2.4"
min_ansible_container_version: "2.4"
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
platforms:
- name: ubuntu
- name: Debian
versions:
- 20.04
- buster
- bullseye
- name: Ubuntu
versions:
- bionic
- focal
- jammy
- name: Alpine
version:
- all
- name: ArchLinux
versions:
- all
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
galaxy_tags:
- knx
- monitor
- influxdb
- flux
- docker
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View File

@ -0,0 +1,23 @@
---
- name: Clean up
hosts: all
gather_facts: true
tasks:
- name: Check if the docker-compose file exists.
ansible.builtin.stat:
path: "~/knx-monitor/docker-compose.yml"
register: docker_compose_file
- name: Remove authentik docker-compose.
community.docker.docker_compose:
project_src: ~/knx-monitor/
build: false
state: absent
when: docker_compose_file.stat.exists
become: false
- name: Remove the docker-compose file
ansible.builtin.file:
path: "~/knx-monitor/docker-compose.yml"
state: absent
when: docker_compose_file.stat.exists

View File

@ -1,7 +1,13 @@
---
- name: Converge
hosts: all
# gather_facts: false
pre_tasks:
- name: "Include necessary variables"
ansible.builtin.include_vars:
file: "../../.env.yml"
tasks:
- name: "Include ansible_role"
- name: "Include knx_monitor"
include_role:
name: "ansible_role"
name: "laurivan.knx_monitor"

View File

@ -0,0 +1,28 @@
---
- name: Destroy
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
# Developer must implement.
- name: Remove the docker image
community.docker.docker_container:
name: instance-grafana
state: absent
# Mandatory configuration for Molecule to function.
- name: Populate instance config
ansible.builtin.set_fact:
instance_conf: {}
- name: Dump instance config
ansible.builtin.copy:
content: |
# Molecule managed
{{ instance_conf | to_json | from_json | to_yaml }}
dest: "{{ molecule_instance_config }}"
mode: 0600
when: server.changed | default(false) | bool

View File

@ -1,35 +1,30 @@
---
role_name_check: 1
dependency:
name: galaxy
options:
ignore-certs: true
ignore-errors: true
role-file: molecule/requirements.yml
requirements-file: molecule/requirements.yml
driver:
name: docker
platforms:
- name: ansible_role_test
# image: "kilip/molecule-${MOLECULE_DIST:-ubuntu:20.04}"
# image: "docker.io/pycontribs/centos:8"
image: "geerlingguy/docker-ubuntu2004-ansible"
pre_build_image: true
privileged: true
# command: ${MOLECULE_DOCKER_COMMAND:-""}
#published_ports:
# - "0.0.0.0:1880:1880/tcp"
capabilities:
- SYS_ADMIN
security_opts:
- seccomp=unconfined
tmpfs:
- /tmp
- /run
- name: instance-knx-monitor
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos8}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/ansible_role_data:/tmp/ansible_role_data
command: "/lib/systemd/systemd"
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/run/docker.sock:/tmp/docker_mounted.sock
privileged: true
pre_build_image: true
provisioner:
name: ansible
playbooks:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
verifier:
name: ansible
lint: |
set -e
yamllint .
ansible-lint .
ansible-lint .

View File

@ -0,0 +1,35 @@
---
- name: Setup the test machine
hosts: instance-knx-monitor
tasks:
- name: Check if /var/run/docker.sock already exists
ansible.builtin.stat:
path: "/var/run/docker.sock"
register: docker_sock_stat
- name: Create docker.sock
raw: touch /var/run/docker.sock
become: true
changed_when: false
when: not docker_sock_stat.stat.exists
- name: Move docker.sock from tmp
raw: mount --move /tmp/docker_mounted.sock /var/run/docker.sock
become: true
changed_when: false
when: not docker_sock_stat.stat.exists
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian'
- name: Install python requests
pip:
name:
- requests
- docker
- docker-compose
- name: Install docker
vars:
docker_service_manage: false
include_role:
name: geerlingguy.docker

View File

@ -0,0 +1,4 @@
---
roles:
- geerlingguy.docker
collections: []

View File

@ -1,2 +1,56 @@
---
# tasks file for ansible_role
# tasks file for knx monitor
- name: Create configuration directory
ansible.builtin.file:
state: directory
path: "{{ item }}"
owner: "{{ ansible_effective_user_id }}"
group: "{{ ansible_effective_group_id }}"
mode: "0750"
with_items:
- "{{ knx_monitor.config_path | expanduser | realpath }}"
tags:
- configuration
- name: Print the gateway for each host when defined
ansible.builtin.debug:
msg: Source {{ knx_monitor.topology_source }} to {{ knx_monitor.config_path | expanduser | realpath }}/export-addresses.csv
- name: Copy knx-monitor docker-compose template.
ansible.builtin.template:
src: templates/docker-compose.yml.j2
dest: "{{ knx_monitor.config_path | expanduser | realpath }}/docker-compose.yml"
mode: '0640'
become: false
notify: Restart knx-monitor
tags:
- configuration
- name: Copy topology file
ansible.builtin.copy:
src: "{{ knx_monitor.topology_source }}"
dest: "{{ knx_monitor.config_path | expanduser | realpath }}/export-addresses.csv"
owner: "{{ ansible_effective_user_id }}"
group: "{{ ansible_effective_group_id }}"
mode: '0644'
tags:
- configuration
- name: Copy knx-monitor configuration.
ansible.builtin.template:
src: templates/env.knx-monitor.conf.j2
dest: "{{ knx_monitor.config_path | expanduser | realpath }}/env.knx-monitor.conf"
mode: '0640'
become: false
notify: Restart knx-monitor
tags:
- configuration
- name: Ensure knx-monitor is running.
community.docker.docker_compose:
project_src: "{{ knx_monitor.config_path | expanduser | realpath }}"
build: false
become: false

View File

@ -0,0 +1,14 @@
---
version: '3.4'
services:
knx-monitor:
image: laurivan/knx:{{ knx_monitor.docker_version }}
restart: unless-stopped
volumes:
# - {{ knx_monitor.config_path | expanduser | realpath }}/export-addresses.csv:/code/knx/export-addresses.csv:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
env_file:
- {{ knx_monitor.config_path | expanduser | realpath }}/env.knx-monitor.conf

View File

@ -0,0 +1,6 @@
KNX_GATEWAY_IP={{ knx_monitor.gateway_ip }}
INFLUX_BUCKET={{ knx_monitor.influx.bucket }}
INFLUX_ORG={{ knx_monitor.influx.org }}
INFLUX_TOKEN={{ knx_monitor.influx.token }}
INFLUX_URL={{ knx_monitor.influx.url }}