Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
661 changes: 661 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ the local network via ArtNet - ArtPoll.

## Features

- Uses [pymvr](https://pypi.org/project/pymvr/) to read fixtures from MVR
files
- Uses [pymvr](https://pypi.org/project/pymvr/) to read/write fixtures from/to
MVR files
- Uses [Uptime Kuma](https://uptime.kuma.pet/)
[API](https://github.com/lucasheld/uptime-kuma-api)
[API](https://github.com/lucasheld/uptime-kuma-api) for programmatic access
- Provides Graphical [Terminal User Interface](https://textual.textualize.io/)
- Uses ArtPoll based device network discovery, to create and/or autoimport an
- Uses ArtPoll based device network discovery to create and/or auto-import an
MVR file with list of devices discovered on the network
- Creates tags from scene Layers and from fixture Classes and Positions
- Creates monitors, marked with the above mentioned tags, allowing grouping in
Uptime Kuma
- Provides an MVR Merging tool, allowing to merge IP address from one MVR file
(for example created by the Network Discovery) with another scene file -
- Creates Kuma tags from scene Layers and from fixture Classes and Positions
- Creates Kuma monitors, marked with the above mentioned tags, allowing
grouping in Uptime Kuma
- Provides an MVR Merging tool, allowing to merge IP addresses from one MVR
file (for example created by the Network Discovery) with another scene file -
typically the main planning file. The fixture matching is based on fixture
UUIDs or on DMX Universe + Address
- Bulk delete of Uptime Kuma, monitors and tags - all, or only those matching
Expand Down Expand Up @@ -64,7 +64,7 @@ Hub](https://gdtf.eu/).

## Quick Start

- Start the MVRtoKuma, configure settings for Uptime Kuma server
- Start the MVRtoKuma, configure settings for your Uptime Kuma server
- Use the `Get Server Data` to get data from Uptime Kuma
- Use `MVR Files - Import MVR`to import an MVR file with fixtures. Make sure
the MVR contains data with IPv4 addresses.
Expand Down
16 changes: 16 additions & 0 deletions agpl3-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Copyright (C) {{attrs.git_file_created_year}} {{ attrs.git_authors | join(", ") }}

This file is part of {{props["projectName"]}}.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Binary file removed discovered_devices.mvr
Binary file not shown.
15 changes: 15 additions & 0 deletions licenserc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
headerPath = "agpl3-header.txt"

excludes = [
".github/",
"*.toml",
]

[git]
attrs = 'auto'
ignore = 'auto'

[properties]
inceptionYear = 2025
projectName = "MVRtoKuma"

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "MVRtoKuma"
version = "0.1.0"
version = "0.5.0"
description = "A tool to quickly create monitors in [Uptime Kuma](https://uptime.kuma.pet/), from fixtures defined in a [MVR](https://gdtf-share.com/) (My Virtual Rig) scene file"
readme = "README.md"
requires-python = ">=3.13"
Expand Down
17 changes: 17 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Copyright (C) 2025 vanous
#
# This file is part of MVRtoKuma.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from tui.app import MVRtoKuma

if __name__ == "__main__":
Expand Down
19 changes: 19 additions & 0 deletions tui/add_monitors_screen.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2025 vanous
*
* This file is part of MVRtoKuma.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


AddMonitorsScreen {
align: center middle;
Expand Down
34 changes: 27 additions & 7 deletions tui/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2025 vanous
*
* This file is part of MVRtoKuma.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

ListDisplay {
height: 50%;
overflow-y: scroll;
Expand All @@ -24,14 +43,10 @@ DictListDisplay {
border: none;
}

#action_buttons {
margin-left:1;
height: auto;
}

.small_button {
MVRtoKuma .small_button {
height: 1;
margin-left: 0;
margin-left: 1;
margin-right: 1;
margin-top:0;
margin-bottom: 0;
Expand All @@ -40,9 +55,14 @@ DictListDisplay {
background: blue;
}

.big_button {
MVRtoKuma .big_button {
height: 3;
margin-left: 1;
margin-right: 1;
margin-top:0;
margin-bottom: 0;
background: blue;
border: blue
}

#frame {
Expand Down
27 changes: 22 additions & 5 deletions tui/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Copyright (C) 2025 vanous
#
# This file is part of MVRtoKuma.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import functools
import json
import os
Expand Down Expand Up @@ -183,15 +200,15 @@ def on_mount(self) -> None:
self.details_toggle = data.get("details_toggle", False)
self.singleline_ui_toggle = data.get("singleline_ui_toggle", True)

if not data.get("singleline_ui_toggle", False):
if self.singleline_ui_toggle:
for button in self.query("Button"):
button.remove_class("small_button")
button.add_class("big_button")
button.remove_class("big_button")
button.add_class("small_button")
button.refresh(layout=True) # Force refresh if needed
else:
for button in self.query("Button"):
button.remove_class("big_button")
button.add_class("small_button")
button.remove_class("small_button")
button.add_class("big_button")
button.refresh(layout=True) # Force refresh if needed
self.query_one("#json_output").update(
f"{f'Configuration loaded, Server: [blue]{self.url}[/blue]' if self.url else 'Ready... make sure to Configure Uptime Kuma address and credentials'}"
Expand Down
17 changes: 17 additions & 0 deletions tui/artnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Copyright (C) 2025 vanous
#
# This file is part of MVRtoKuma.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import socket
import struct
import time
Expand Down
41 changes: 36 additions & 5 deletions tui/artnet_screen.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2025 vanous
*
* This file is part of MVRtoKuma.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


ArtNetScreen #question {
content-align: center middle;
Expand All @@ -12,13 +31,24 @@ ArtNetScreen #network {
width: 100%;
background: $panel;
}
ArtNetScreen Button {
height: 1;
ArtNetScreen .small_button {
width: 1fr;
margin: 1;
padding: 1;
height: 1;
margin-left: 1;
margin-right: 1;
margin-top:0;
margin-bottom: 0;
padding: 0;
border: none;
background: red;
background: blue;
}

ArtNetScreen .big_button {
height: 3;
width: 1fr;
margin-right: 1;
margin-left: 1;
background: blue;
}
ArtNetScreen #results{
height: 100%;
Expand All @@ -29,4 +59,5 @@ ArtNetScreen #results{

ArtNetScreen #row2 {
margin-bottom:1;
height: auto;
}
30 changes: 28 additions & 2 deletions tui/config_screen.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2025 vanous
*
* This file is part of MVRtoKuma.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


ConfigScreen {
align: center middle;
Expand Down Expand Up @@ -45,14 +64,21 @@ ConfigScreen #config_dialog {
padding-top: 1;
}

#config_buttons Button {
ConfigScreen .small_button {
height: 1;
margin-left: 6;
margin-left: 0;
margin-right: 1;
margin-top:0;
margin-bottom: 0;
padding: 0;
border: none;
}

ConfigScreen .big_button {
height: 3;
border: none;
margin-right: 1;
}
#details_checkbox_container {
height: 1;
margin-left: 6;
Expand Down
17 changes: 17 additions & 0 deletions tui/create_mvr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Copyright (C) 2025 vanous
#
# This file is part of MVRtoKuma.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import pymvr
from pathlib import Path

Expand Down
19 changes: 19 additions & 0 deletions tui/delete_screen.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Copyright (C) 2025 vanous
*
* This file is part of MVRtoKuma.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


DeleteScreen {
align: center middle;
Expand Down
Loading