Skip to content

Commit 3b2cb49

Browse files
author
Sebastian Keller
committed
release 1.8.2
1 parent 28a77b4 commit 3b2cb49

39 files changed

+62
-4023
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# RealTime OpenControl (RTOC)
22

3-
### Version 1.8
3+
### Version 1.8.2
44

55
[**This README is available in GERMAN here.**](misc/README_german.md)
66

7-
[Documentation](https://github.com/Haschtl/RealTimeOpenControl/wiki)
7+
[Documentation](https://git.kellerbase.de/haschtl/kellerlogger/wikis/RealTime-OpenControl-(RTOC))
88

99
RealTime OpenControl enables simple real-time data recording, visualization and editing. The recording can be done with a local Python scripts or via TCP locally/from the network. Visualization and editing is available locally, in the network (TCP and HTML) and via Telegram on the smartphone.
1010

@@ -92,22 +92,16 @@ The following packages should also be installed
9292
pip3 install python-telegram-bot matplotlib requests python-nmap bokeh pycryptdomex
9393
```
9494

95-
For the DPS5020 plugin the following dependency must be installed
96-
97-
```python
98-
pip3 install minimalmodbus
99-
```
100-
10195
The RTOC repository can then be cloned with
10296

10397
```shell
104-
git@github.com:Haschtl/RealTimeOpenControl.git
98+
git clone [email protected]:haschtl/kellerlogger
10599
```
106100

107101
Now RTOC can be started:
108102

109103
```shell
110-
cd RTOC
104+
cd kellerlogger
111105
// local RTOC-instance including GUI
112106
python3 RTOC
113107
// local RTOC-instance without GUI (only TCP-Server, [HTTP-Server, Telegram-Bot])
@@ -132,16 +126,20 @@ plotStyles.json // Custom plotstyles for signals are stored in this file
132126
![Beispielschematik](screenshots/RTOC-schematik.png)
133127

134128
### Wiki
135-
[Read the Wiki for full documentation](https://github.com/Haschtl/RealTimeOpenControl/wiki)
129+
[Read the Wiki for full documentation](https://git.kellerbase.de/haschtl/kellerlogger/wikis/RealTime-OpenControl-(RTOC))
136130

137131
### Default/Example Plugins:
138132

139133
- function generator: generates sine, square, sawtooth, random, AC, DC
134+
- NetWoRTOC: Control and data exchange between several RTOC-servers
135+
136+
You can get more plugins from the [RTOC-plugin-repository](https://git.kellerbase.de/haschtl/rtoc-plugins):
140137
- System: For recording many system variables (CPU, Memory, Network,...)
141138
- Octoprint: Recording of 3D printers
142139
- DPS5020: power supply unit recording and control (possibly also DPS5005, ...)
143140
- HoldPeak VC820: Multimeter Measurement Recording (also other VC820)
144-
- NetWoRTOC: Control and data exchange between several RTOC-servers
141+
- ...
142+
145143

146144
### First GUI-Run
147145

@@ -161,7 +159,7 @@ The graphical user interface of RTOC offers a wealth of functions for data displ
161159
- Scaling, shifting of signals
162160
- Run multiple scripts in parallel
163161

164-
[Complete GUI-tutorial here.]https://github.com/Haschtl/RealTimeOpenControl/wiki/GUI)
162+
[Complete GUI-tutorial here.](https://git.kellerbase.de/haschtl/kellerlogger/wikis/GUI)
165163

166164
### Write simple Python-Plugin
167165

@@ -172,7 +170,7 @@ Python plugins are integrated into RTOC and can be used to
172170

173171
Plugins can **not** access all measurements. This can be done with a TCP connection to RTOC.
174172

175-
[Example-Plugins here.](https://github.com/Haschtl/RealTimeOpenControl/wiki/PlugIns)
173+
[Example-Plugins here.](https://git.kellerbase.de/haschtl/kellerlogger/wikis/PlugIns)
176174

177175
### Simple local TCP-Datastream
178176

@@ -190,11 +188,11 @@ The client can
190188

191189
The connection between RTOC server and client can be encrypted end-to-end (DES) with a password (min. 8 characters).
192190

193-
[Example for TCP here.](https://github.com/Haschtl/RealTimeOpenControl/wiki/clientCommunication)
191+
[Example for TCP here.](https://git.kellerbase.de/haschtl/kellerlogger/wikis/clientCommunication)
194192

195193
### Include Telegram-messanger
196194

197-
[Tutorial for Telegram here.](https://github.com/Haschtl/RealTimeOpenControl/wiki/telegram)
195+
[Tutorial for Telegram here.](https://git.kellerbase.de/haschtl/kellerlogger/wikis/telegram)
198196

199197
## Screenshots
200198

RTOC.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.2
22
Name: RTOC
3-
Version: 1.8
3+
Version: 1.8.1
44
Summary: RealTime OpenControl
55
Home-page: https://github.com/Haschtl/RealTimeOpenControl
66
Author: Sebastian Keller

RTOC.egg-info/SOURCES.txt

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ RTOC.egg-info/SOURCES.txt
1515
RTOC.egg-info/dependency_links.txt
1616
RTOC.egg-info/requires.txt
1717
RTOC.egg-info/top_level.txt
18-
RTOC/__pycache__/LoggerPlugin.cpython-36.pyc
19-
RTOC/__pycache__/RTLogger.cpython-36.pyc
20-
RTOC/__pycache__/RTOC.cpython-36.pyc
21-
RTOC/__pycache__/__main__.cpython-36.pyc
22-
RTOC/__pycache__/jsonsocket.cpython-36.pyc
23-
RTOC/__pycache__/telegramBot.cpython-36.pyc
2418
RTOC/data/Actions.py
2519
RTOC/data/RTPlotActions.py
2620
RTOC/data/RTPlotWidget.py
@@ -39,29 +33,9 @@ RTOC/data/signalEditWidget.py
3933
RTOC/data/signalWidget.py
4034
RTOC/data/styleMultiPlotGUI.py
4135
RTOC/data/stylePlotGUI.py
42-
RTOC/data/__pycache__/Actions.cpython-36.pyc
43-
RTOC/data/__pycache__/RTPlotActions.cpython-36.pyc
44-
RTOC/data/__pycache__/RTPlotWidget.cpython-36.pyc
45-
RTOC/data/__pycache__/ScriptFunctions.cpython-36.pyc
46-
RTOC/data/__pycache__/__init__.cpython-36.pyc
47-
RTOC/data/__pycache__/define.cpython-36.pyc
48-
RTOC/data/__pycache__/eventWidget.cpython-36.pyc
49-
RTOC/data/__pycache__/importCode.cpython-36.pyc
50-
RTOC/data/__pycache__/loggerlib.cpython-36.pyc
51-
RTOC/data/__pycache__/scriptHelpWidget.cpython-36.pyc
52-
RTOC/data/__pycache__/scriptLibrary.cpython-36.pyc
53-
RTOC/data/__pycache__/scriptSubWidget.cpython-36.pyc
54-
RTOC/data/__pycache__/scriptWidget.cpython-36.pyc
55-
RTOC/data/__pycache__/signalEditWidget.cpython-36.pyc
56-
RTOC/data/__pycache__/signalWidget.cpython-36.pyc
57-
RTOC/data/__pycache__/styleMultiPlotGUI.cpython-36.pyc
58-
RTOC/data/__pycache__/stylePlotGUI.cpython-36.pyc
5936
RTOC/data/lib/__init__.py
6037
RTOC/data/lib/general_lib.py
6138
RTOC/data/lib/pyqt_customlib.py
62-
RTOC/data/lib/__pycache__/__init__.cpython-36.pyc
63-
RTOC/data/lib/__pycache__/general_lib.cpython-36.pyc
64-
RTOC/data/lib/__pycache__/pyqt_customlib.cpython-36.pyc
6539
RTOC/data/ui/darkmode.html
6640
RTOC/data/ui/eventWidget.ui
6741
RTOC/data/ui/gridViewWidget.ui
@@ -178,31 +152,20 @@ RTOC/data/ui/icons/dark/up_arrow_disabled.png
178152
RTOC/lang/en_en.qm
179153
RTOC/lang/en_en.ts
180154
RTOC/plugins/DPS5020.py
181-
RTOC/plugins/Deneb.py
182-
RTOC/plugins/Futtertrocknung.py
183155
RTOC/plugins/Generator.py
184156
RTOC/plugins/Generator2.py
185-
RTOC/plugins/Heliotherm.py
186157
RTOC/plugins/HoldPeak VC820.py
187158
RTOC/plugins/NetWoRTOC.py
188159
RTOC/plugins/OctoTouch.py
189-
RTOC/plugins/ReflowOfen.py
190-
RTOC/plugins/ReflowPlatte.py
191160
RTOC/plugins/System.py
192161
RTOC/plugins/Template.py
193162
RTOC/plugins/DPS5020/dps5020.ui
194-
RTOC/plugins/Deneb/deneb.ui
195163
RTOC/plugins/Funktionsgenerator/gen_function.ui
196-
RTOC/plugins/Heliotherm/heliotherm.ui
197164
RTOC/plugins/Octotouch/OctoprintApi.py
198165
RTOC/plugins/Octotouch/octotouch.ui
199166
RTOC/plugins/Octotouch/__pycache__/OctoprintApi.cpython-36.pyc
200-
RTOC/plugins/Reflow/reflow.ui
201167
RTOC/plugins/System/system.ui
202168
RTOC/plugins/Template/template.ui
203-
RTOC/plugins/__pycache__/Generator.cpython-36.pyc
204-
RTOC/plugins/__pycache__/Generator2.cpython-36.pyc
205-
RTOC/plugins/__pycache__/NetWoRTOC.cpython-36.pyc
206169
RTOC/plugins/holdPeak_VC820/portSelectWidget.ui
207170
RTOC/plugins/holdPeak_VC820/vc820py/.gitignore
208171
RTOC/plugins/holdPeak_VC820/vc820py/README.md

RTOC/RTLogger.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
from LoggerPlugin import LoggerPlugin
3535
from telegramBot import telegramBot
3636

37+
userpath = os.path.expanduser('~/Documents')
38+
if not os.path.exists(userpath):
39+
os.mkdir(userpath)
3740
userpath = os.path.expanduser('~/Documents/RTOC')
3841
if not os.path.exists(userpath):
3942
os.mkdir(userpath)
@@ -128,6 +131,7 @@ def __init__(self, enableTCP=None):
128131
self.telegramBot = telegramBot(self)
129132
self.toggleTelegramBot()
130133
self.toggleHTMLPage()
134+
self.load_autorun_plugins()
131135

132136
def getDir(self, dir = None):
133137
if dir == None:
@@ -1039,12 +1043,27 @@ def load_config(self):
10391043
with open(self.config['documentfolder']+"/config.json", 'w', encoding="utf-8") as fp:
10401044
json.dump(conf, fp, sort_keys=False, indent=4, separators=(',', ': '))
10411045

1042-
1043-
10441046
def save_config(self):
10451047
with open(self.config['documentfolder']+"/config.json", 'w', encoding="utf-8") as fp:
10461048
json.dump(self.config, fp, sort_keys=False, indent=4, separators=(',', ': '))
10471049

1050+
def load_autorun_plugins(self):
1051+
userpath = os.path.expanduser('~/Documents/RTOC/autorun_devices')
1052+
if not os.path.exists(userpath):
1053+
with open(userpath, 'w', encoding="UTF-8") as f:
1054+
f.write('')
1055+
else:
1056+
plugins = []
1057+
try:
1058+
with open(userpath, 'r', encoding="UTF-8") as f:
1059+
content = f.readlines()
1060+
# you may also want to remove whitespace characters like `\n` at the end of each line
1061+
plugins = [x.strip() for x in content]
1062+
except:
1063+
print('error in '+userpath)
1064+
for p in plugins:
1065+
self.startPlugin(p)
1066+
10481067
def getSignal(self, id):
10491068
if id in self.signalIDs:
10501069
idx = self.signalIDs.index(id)
@@ -1064,14 +1083,14 @@ def getSignalUnits(self, id):
10641083
idx = self.signalIDs.index(id)
10651084
return str(self.signalUnits[idx])
10661085
else:
1067-
return []
1086+
return ''
10681087

10691088
def getSignalNames(self, id):
10701089
if id in self.signalIDs:
10711090
idx = self.signalIDs.index(id)
10721091
return self.signalNames[idx]
10731092
else:
1074-
return [[], []]
1093+
return [[''], ['']]
10751094

10761095

10771096
if __name__ == "__main__":

RTOC/RTOC.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,26 @@ def __init__(self):
126126
self.tray_icon.setIcon(self.app_icon)
127127
self.tray_icon.activated.connect(self.systemTrayClickAction)
128128

129+
self.forceQuit = False
130+
self.initPlotWidgets()
131+
129132
self.logger = RTLogger.RTLogger()
133+
self.config = self.logger.config
134+
self.loadPlotStyles()
135+
self.initScriptWidget()
136+
self.newPlotWidget()
130137
self.logger.tr = self.tr
131-
self.forceQuit = False
138+
139+
for id in self.logger.signalIDs:
140+
name = self.logger.getSignalNames(id)
141+
dataunit = self.logger.getSignalUnits(id)
142+
self.addNewSignal(id, name[0], name[1], dataunit)
132143

133144
self.logger.newSignalCallback = self.addNewSignal
134145
self.logger.callback = self.newDataCallback
135146
self.logger.clearCallback = self.clearData
136147
self.logger.stopDeviceCallback = self.remoteDeviceStop
137148
self.logger.startDeviceCallback = self.remoteDeviceStart
138-
self.config = self.logger.config
139-
self.loadPlotStyles()
140149

141150
self.darkmode = self.config["darkmode"]
142151
self.signalTimeOut = self.config["signalInactivityTimeout"]
@@ -145,16 +154,14 @@ def __init__(self):
145154
self.connectButtons()
146155
self.initDeviceWidget()
147156
self.initPluginsWidget()
148-
self.initPlotWidgets()
149-
self.initScriptWidget()
150157
self.initTrayIcon()
151158
self.initEventsWidget()
152159

153160
self.logger.scriptExecutedCallback = self.scriptWidget.executedCallback
154161
self.logger.handleScriptCallback = self.scriptWidget.triggeredScriptCallback
155162
self.logger.newEventCallback = self.eventWidget.update
156-
if not self.config["pluginsWidget"]:
157-
self.pluginsWidget.hide()
163+
# if not self.config["pluginsWidget"]:
164+
self.pluginsWidget.hide()
158165
if not self.config["scriptWidget"]:
159166
self.scriptDockWidget.hide()
160167
if not self.config["deviceWidget"]:
@@ -169,7 +176,6 @@ def __init__(self):
169176
self.actionTCPPassword.setText(self.tr('Passwort-Schutz: Aus'))
170177
else:
171178
self.actionTCPPassword.setText(self.tr('Passwort-Schutz: An'))
172-
self.newPlotWidget()
173179

174180
self.updateLabels()
175181
self.readSettings()
@@ -241,6 +247,9 @@ def initDeviceWidget(self):
241247
button.clicked.connect(partial(self.toggleDevice, plugin, button))
242248
self.deviceLayout.addWidget(button)
243249

250+
if self.logger.pluginStatus[plugin] == True:
251+
button.setChecked(True)
252+
244253
def initPluginsWidget(self):
245254
self.pluginsBox.removeItem(0)
246255

@@ -249,7 +258,7 @@ def initScriptWidget(self):
249258
self.scriptLayout.addWidget(self.scriptWidget)
250259

251260
def initPlotWidgets(self):
252-
self.activePlotWidgetIndex = -1
261+
self.activePlotWidgetIndex = 0
253262
self.plotWidgets = []
254263

255264
def initEventsWidget(self):

RTOC/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .data import *
22

33
name = "RTOC"
4-
__version__ = "1.8"
4+
__version__ = "1.8.2"

RTOC/data/Actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def showAboutMessage(self):
224224
"RealTime OpenControl (RTOC) ist eine freie OpenSource Software unter der BSD-3-Lizenz.\n\nAlle Symbole werden unter der 'Creative Commons Attribution-NoDerivs 3.0 Unported' Lizenz bereitgestellt von icons8 (https://icons8.de)\n\nCopyright (C) 2018 Sebastian Keller"))
225225

226226
def showHelpWebsite(self):
227-
url = "https://github.com/Haschtl/RealTimeOpenControl/wiki"
227+
url = "https://git.kellerbase.de/haschtl/kellerlogger/wikis/RealTime-OpenControl-(RTOC)"
228228
import webbrowser
229229
webbrowser.open(url, new=0, autoraise=True)
230230

0 commit comments

Comments
 (0)