From c763b962eefedca5099ac25ce15eebf4a44518ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Frange=C5=BE?= Date: Sat, 20 Sep 2025 13:41:12 +0200 Subject: [PATCH] P22 --- ansible_deploy/controller/inventory.yml | 33 ++++++++++++++++++++++++- ansible_deploy/controller/playbook.yaml | 13 +++++----- ansible_deploy/display/inventory.yml | 7 ++++++ config.toml | 14 ----------- controller/Pipfile | 11 --------- controller/Pipfile.lock | 20 --------------- 6 files changed, 46 insertions(+), 52 deletions(-) delete mode 100644 config.toml delete mode 100644 controller/Pipfile delete mode 100644 controller/Pipfile.lock diff --git a/ansible_deploy/controller/inventory.yml b/ansible_deploy/controller/inventory.yml index 5930903..77b9d43 100644 --- a/ansible_deploy/controller/inventory.yml +++ b/ansible_deploy/controller/inventory.yml @@ -19,7 +19,7 @@ predavalnice_pi: # Nastavitve za vse posamezne predavalnice hosts: - P01: + p01_controller: room: P01 ansible_host: 192.168.192.42 static_ip: 192.168.192.42 @@ -49,3 +49,34 @@ predavalnice_pi: url: http://192.168.190.90:8091 roomId: 1 bearer_token: 0954afe1-4111-4f89-a123-fea08a55dc46 + + p22_controller: + room: P22 + ansible_host: 192.168.192.43 + static_ip: 192.168.192.43 + + # Novi barco projektorji + barco_G62: + - position: main + model: barco_G62 + port: 3023 + ip: 192.168.192.22 + - position: side + model: barco_G62 + port: 3023 + ip: 192.168.192.23 + + tse_box: + + projector_motors: + - position: main + i2c_address: 0x42 + offset: 0 #for when using single 8 channel relay board + - position: side + i2c_address: 0x43 + offset: 4 + + lucke: + url: http://192.168.190.90:8091 + roomId: 2 + bearer_token: b44c8cdc-d848-4b49-9deb-79023a60a62a diff --git a/ansible_deploy/controller/playbook.yaml b/ansible_deploy/controller/playbook.yaml index ff3cadf..04bd8cc 100644 --- a/ansible_deploy/controller/playbook.yaml +++ b/ansible_deploy/controller/playbook.yaml @@ -1,12 +1,11 @@ - name: Test playbook vars: - # TODO: maybe don't hardcode this? - PROJECT_BASE: "../" + PROJECT_BASE: "../../" INSTALL_BASE: "/home/pi/pyServices" hosts: - - P01 - - P22 + - p01_controller + - p22_controller handlers: - name: restart NetworkManager @@ -58,8 +57,10 @@ - mosquitto - nginx state: latest + update_cache: true - name: Install Poetry + become: true pip: break_system_packages: true name: @@ -95,7 +96,7 @@ - name: Install controller scripts ansible.posix.synchronize: - src: "../controller/" + src: "{{PROJECT_BASE}}/controller/" dest: "{{INSTALL_BASE}}/" delete: true archive: false @@ -125,7 +126,7 @@ - name: Install frontend become: true ansible.posix.synchronize: - src: "../frontend/dist/" + src: "{{PROJECT_BASE}}/frontend/dist/" dest: "/var/www/html/" delete: true archive: false diff --git a/ansible_deploy/display/inventory.yml b/ansible_deploy/display/inventory.yml index a7dd4e8..d801782 100644 --- a/ansible_deploy/display/inventory.yml +++ b/ansible_deploy/display/inventory.yml @@ -18,3 +18,10 @@ predavalnice_pi: hostname: "p01_touch_display.local" kiosk_url: "http://192.168.192.42?room=P01" mqtt_host: "192.168.192.42" + + p22_touch_display: + predavalnica: p22 + static_ip: "192.168.192.112" + hostname: "p22_touch_display.local" + kiosk_url: "http://192.168.192.43?room=P22" + mqtt_host: "192.168.192.43" diff --git a/config.toml b/config.toml deleted file mode 100644 index e08fbdf..0000000 --- a/config.toml +++ /dev/null @@ -1,14 +0,0 @@ -[globals] -room = 'P01' -mqttIp = 'localhost' -mqttPort = '1883' - - -[barco.novi.glavni] -ip = '192.168.192.12' -port = '3023' - -[barco.novi.stranski] -ip = '192.168.192.16' # or smth -port = '3023' - diff --git a/controller/Pipfile b/controller/Pipfile deleted file mode 100644 index 645a67e..0000000 --- a/controller/Pipfile +++ /dev/null @@ -1,11 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] - -[dev-packages] - -[requires] -python_version = "3.12" diff --git a/controller/Pipfile.lock b/controller/Pipfile.lock deleted file mode 100644 index b6df5da..0000000 --- a/controller/Pipfile.lock +++ /dev/null @@ -1,20 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "702ad05de9bc9de99a4807c8dde1686f31e0041d7b5f6f6b74861195a52110f5" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3.12" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": {}, - "develop": {} -}