diff --git a/docs/MQTT_struktura.md b/docs/MQTT_struktura.md index 89b8c16..aa1bf46 100644 --- a/docs/MQTT_struktura.md +++ b/docs/MQTT_struktura.md @@ -34,5 +34,5 @@ - `set` - set the power status (`0` or `1`) - `/firanki/` - - `status` - `STATIONARY`, `MOVING_UP`, `MOVING_DOWN` - - `command` - `NONE`, `MOVE_UP`, `MOVE_DOWN` \ No newline at end of file + - `status` - `STOPPED`, `MOVING_UP`, `MOVING_DOWN` + - `move` - `STOP`, `MOVE_UP`, `MOVE_DOWN` \ No newline at end of file diff --git a/frontend/vju_display/src/App.vue b/frontend/vju_display/src/App.vue index cab6535..d2a3ee0 100644 --- a/frontend/vju_display/src/App.vue +++ b/frontend/vju_display/src/App.vue @@ -4,6 +4,7 @@ import MainPage from './components/pages/MainPage.vue'; import ProjManualPage from './components/pages/ProjManualPage.vue'; import VerticalTabs from './components/tabs/VerticalTabs.vue'; import Tab from './components/tabs/Tab.vue'; +import LightingPage from './components/pages/LightingPage.vue'; let urlParams = new URLSearchParams(window.location.search); @@ -27,7 +28,8 @@ const pageNum = ref(0) // TODO spremen na 0 Priprava Video Zvok - Servis + Lučke + Servis turbo odličen super mega kontrol panel @@ -36,6 +38,7 @@ const pageNum = ref(0) // TODO spremen na 0 + diff --git a/frontend/vju_display/src/components/pages/LightingPage.vue b/frontend/vju_display/src/components/pages/LightingPage.vue new file mode 100644 index 0000000..3f18429 --- /dev/null +++ b/frontend/vju_display/src/components/pages/LightingPage.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/tse_serial/tse_serial_controler.py b/tse_serial/tse_serial_controler.py index 758b8df..fd352b4 100644 --- a/tse_serial/tse_serial_controler.py +++ b/tse_serial/tse_serial_controler.py @@ -89,8 +89,8 @@ async def handleTseSencilo(client, cmd): rel = RelayState(shades_mapping['dol'], True) await executeAndPublish(client, topicPub, "MOVING_DOWN", rel) else: - await executeAndPublish(client, topicPub, "STATIONARY", RelayState(shades_mapping['gor'], False)) - await executeAndPublish(client, topicPub, "STATIONARY", RelayState(shades_mapping['dol'], False)) + await executeAndPublish(client, topicPub, "STOPPED", RelayState(shades_mapping['gor'], False)) + await executeAndPublish(client, topicPub, "STOPPED", RelayState(shades_mapping['dol'], False)) platnoBckgdMoving = False # mucho importante variable prav zares dedoles @@ -176,8 +176,8 @@ async def task_command2serial(controlClient: aiomqtt.Client): systype = msgTopic[2] await handleTsePower(controlClient, systype, cmnd) - elif mesg.topic.matches(f'{room}/firanki/command/#'): - await handleTseSencilo(topicVal, controlClient, cmnd) + elif mesg.topic.matches(f'{room}/firanki/move/#'): + await handleTseSencilo(controlClient, cmnd) else: continue