├── appico.ico
├── screenshot.png
├── screenshot2.png
├── screenshot3.png
├── siemens-red.png
├── rawmon-wrong.png
├── rawmon-calcLSvalue.png
├── android
├── res
│ ├── drawable-hdpi
│ │ └── icon.png
│ ├── drawable-ldpi
│ │ └── icon.png
│ ├── drawable-mdpi
│ │ └── icon.png
│ ├── drawable-xhdpi
│ │ └── icon.png
│ ├── drawable-xxhdpi
│ │ └── icon.png
│ ├── drawable-xxxhdpi
│ │ └── icon.png
│ └── values
│ │ └── libs.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradle.properties
├── build.gradle
├── gradlew.bat
├── gradlew
└── AndroidManifest.xml
├── qml.qrc
├── .gitignore
├── main.cpp
├── YouLessQt.pro
├── CollapsableCard.qml
├── README.md
├── LineChart.qml
├── main.qml
└── LICENSE
/appico.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/appico.ico
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/screenshot.png
--------------------------------------------------------------------------------
/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/screenshot2.png
--------------------------------------------------------------------------------
/screenshot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/screenshot3.png
--------------------------------------------------------------------------------
/siemens-red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/siemens-red.png
--------------------------------------------------------------------------------
/rawmon-wrong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/rawmon-wrong.png
--------------------------------------------------------------------------------
/rawmon-calcLSvalue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/rawmon-calcLSvalue.png
--------------------------------------------------------------------------------
/android/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/android/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/android/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/android/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/android/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/android/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaymiiOrg/YouLessQt/github2/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/qml.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | main.qml
4 | LineChart.qml
5 | CollapsableCard.qml
6 | siemens-red.png
7 | rawmon-calcLSvalue.png
8 | rawmon-wrong.png
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # For more details on how to configure your build environment visit
3 | # http://www.gradle.org/docs/current/userguide/build_environment.html
4 | # Specifies the JVM arguments used for the daemon process.
5 | # The setting is particularly useful for tweaking memory settings.
6 | org.gradle.jvmargs=-Xmx2048m
7 |
8 | # Gradle caching allows reusing the build artifacts from a previous
9 | # build with the same inputs. However, over time, the cache size will
10 | # grow. Uncomment the following line to enable it.
11 | #org.gradle.caching=true
12 |
--------------------------------------------------------------------------------
/android/res/values/libs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - https://download.qt.io/ministro/android/qt5/qt-5.14
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ---> Qt
2 | # C++ objects and libs
3 | *.slo
4 | *.lo
5 | *.o
6 | *.a
7 | *.la
8 | *.lai
9 | *.so
10 | *.so.*
11 | *.dll
12 | *.dylib
13 | *.keystore
14 |
15 | # Qt-es
16 | object_script.*.Release
17 | object_script.*.Debug
18 | *_plugin_import.cpp
19 | /.qmake.cache
20 | /.qmake.stash
21 | *.pro.user
22 | *.pro.user.*
23 | *.qbs.user
24 | *.qbs.user.*
25 | *.moc
26 | moc_*.cpp
27 | moc_*.h
28 | qrc_*.cpp
29 | ui_*.h
30 | *.qmlc
31 | *.jsc
32 | Makefile*
33 | *build-*
34 | *.qm
35 | *.prl
36 |
37 | # Qt unit tests
38 | target_wrapper.*
39 |
40 | # QtCreator
41 | *.autosave
42 |
43 | # QtCreator Qml
44 | *.qmlproject.user
45 | *.qmlproject.user.*
46 |
47 | # QtCreator CMake
48 | CMakeLists.txt.user*
49 |
50 | # QtCreator 4.8< compilation database
51 | compile_commands.json
52 |
53 | # QtCreator local machine specific files for imported projects
54 | *creator.user*
55 |
56 | *_qmlcache.qrc
57 |
58 |
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Remy van Elst https://raymii.org
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, version 3.
7 | *
8 | * This program is distributed in the hope that it will be useful, but
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 | * General Public License for more details.
12 | *
13 | * You should have received a copy of the GNU General Public License
14 | * along with this program. If not, see .
15 | */
16 |
17 |
18 | #include
19 | #include
20 |
21 |
22 | int main(int argc, char *argv[])
23 | {
24 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
25 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
26 | #endif
27 | QGuiApplication app(argc, argv);
28 |
29 | app.setOrganizationName("Leaf Node");
30 | app.setOrganizationDomain("leafnode.nl");
31 | app.setApplicationName("YouLessQt");
32 | app.setApplicationVersion(QString::number(1.1));
33 |
34 | QQmlApplicationEngine engine;
35 | const QUrl url(QStringLiteral("qrc:/main.qml"));
36 | QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
37 | &app, [url](QObject *obj, const QUrl &objUrl) {
38 | if (!obj && url == objUrl)
39 | QCoreApplication::exit(-1);
40 | }, Qt::QueuedConnection);
41 | engine.load(url);
42 |
43 | return app.exec();
44 | }
45 |
--------------------------------------------------------------------------------
/YouLessQt.pro:
--------------------------------------------------------------------------------
1 | #/*
2 | # * Copyright (c) 2023 Remy van Elst https://raymii.org
3 | # *
4 | # * This program is free software: you can redistribute it and/or modify
5 | # * it under the terms of the GNU General Public License as published by
6 | # * the Free Software Foundation, version 3.
7 | # *
8 | # * This program is distributed in the hope that it will be useful, but
9 | # * WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 | # * General Public License for more details.
12 | # *
13 | # * You should have received a copy of the GNU General Public License
14 | # * along with this program. If not, see .
15 | # */
16 |
17 |
18 | QT += quick
19 |
20 | # You can make your code fail to compile if it uses deprecated APIs.
21 | # In order to do so, uncomment the following line.
22 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
23 |
24 | SOURCES += \
25 | main.cpp
26 |
27 | ANDROID_VERSION_CODE = 3
28 |
29 |
30 | RC_ICONS = appico.ico
31 |
32 | RESOURCES += qml.qrc
33 |
34 | # Additional import path used to resolve QML modules in Qt Creator's code model
35 | QML_IMPORT_PATH =
36 |
37 | # Additional import path used to resolve QML modules just for Qt Quick Designer
38 | QML_DESIGNER_IMPORT_PATH =
39 |
40 | # Default rules for deployment.
41 | qnx: target.path = /tmp/$${TARGET}/bin
42 | else: unix:!android: target.path = /opt/$${TARGET}/bin
43 | !isEmpty(target.path): INSTALLS += target
44 |
45 | ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
46 | ANDROID_MIN_SDK_VERSION = 21
47 | ANDROID_TARGET_SDK_VERSION = 33
48 |
49 |
50 |
51 | !android:!ios {
52 | QT += widgets
53 | }
54 |
55 | DISTFILES += \
56 | README.md
57 |
--------------------------------------------------------------------------------
/CollapsableCard.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.15
2 | import QtQuick.Controls 2.15
3 |
4 | Column {
5 | id: root
6 | default property alias children: content.children
7 | required property string title
8 | property color titleBgColor: "#e0e0e0"
9 | property color titleBgColorPressed: "#cfcfcf"
10 | property color titleBorderColor: titleBgColor
11 | property bool collapsed: true
12 |
13 | Button {
14 | id: header
15 | anchors.left: parent.left
16 | anchors.right: parent.right
17 | height: 36
18 | contentItem: Text {
19 | anchors.fill: parent
20 | anchors.margins: 5
21 | text: root.title
22 | horizontalAlignment : Text.AlignHCenter
23 | minimumPixelSize: 16
24 | fontSizeMode: Text.Fit
25 | wrapMode: Text.WordWrap
26 | elide: Text.ElideMiddle
27 | }
28 |
29 | onClicked: root.collapsed = !root.collapsed
30 | background: Rectangle {
31 | color: parent.down ? titleBgColorPressed : titleBgColor
32 | border.color: titleBorderColor
33 | border.width: 1
34 | radius: 6
35 | }
36 | }
37 |
38 | Pane {
39 | id: contentPane
40 |
41 | visible: height > 0
42 | height: !root.collapsed ? implicitHeight : 0
43 |
44 | Behavior on height {
45 | NumberAnimation {
46 | easing.type: Easing.InOutQuad
47 | }
48 | }
49 |
50 | clip: true
51 | anchors.left: parent.left
52 | anchors.right: parent.right
53 |
54 | Column {
55 | id: content
56 | anchors.right: parent.right
57 | anchors.left: parent.left
58 | spacing: 10
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.6.0'
9 | }
10 | }
11 |
12 | repositories {
13 | google()
14 | jcenter()
15 | }
16 |
17 | apply plugin: 'com.android.application'
18 |
19 | dependencies {
20 | implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
21 | }
22 |
23 | android {
24 | /*******************************************************
25 | * The following variables:
26 | * - androidBuildToolsVersion,
27 | * - androidCompileSdkVersion
28 | * - qt5AndroidDir - holds the path to qt android files
29 | * needed to build any Qt application
30 | * on Android.
31 | *
32 | * are defined in gradle.properties file. This file is
33 | * updated by QtCreator and androiddeployqt tools.
34 | * Changing them manually might break the compilation!
35 | *******************************************************/
36 |
37 | compileSdkVersion androidCompileSdkVersion.toInteger()
38 | buildToolsVersion '30.0.2'
39 | ndkVersion '22.1.7171670'
40 |
41 |
42 | sourceSets {
43 | main {
44 | manifest.srcFile 'AndroidManifest.xml'
45 | java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
46 | aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
47 | res.srcDirs = [qt5AndroidDir + '/res', 'res']
48 | resources.srcDirs = ['resources']
49 | renderscript.srcDirs = ['src']
50 | assets.srcDirs = ['assets']
51 | jniLibs.srcDirs = ['libs']
52 | }
53 | }
54 |
55 | tasks.withType(JavaCompile) {
56 | options.incremental = true
57 | }
58 |
59 | compileOptions {
60 | sourceCompatibility JavaVersion.VERSION_1_8
61 | targetCompatibility JavaVersion.VERSION_1_8
62 | }
63 |
64 | lintOptions {
65 | abortOnError false
66 | }
67 |
68 | // Do not compress Qt binary resources file
69 | aaptOptions {
70 | noCompress 'rcc'
71 | }
72 |
73 | defaultConfig {
74 | resConfig "en"
75 | minSdkVersion = qtMinSdkVersion
76 | targetSdkVersion = qtTargetSdkVersion
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # YouLessQt
2 |
3 | 
4 |
5 | **Dit is een onofficiele applicatie, niet door YouLess /
6 | PostFossil gemaakt.**
7 |
8 |
9 |
10 | Helpt de YouLess energiemeter goed op de analoge
11 | (draaischijf) meter plakken door de ruwe sensorwaarde
12 | en relevante sensorwaardes te tonen zodat men kan zien
13 | wanneer een puls gedetecteerd wordt, zonder een Windows 7
14 | gadget te installeren. Ook is hiermee de LS waarde direct
15 | aan te passen op de YouLess, waarna het effect direct in
16 | de grafiek te zien is. Gezien dit een Android applicatie is
17 | (evenals Windows) is dit makkelijker direct in de meterkast
18 | te gebruiken dan een PC gadget.
19 |
20 |
21 |
22 | Ik heb deze applicatie in een paar avonden in elkaar gezet omdat
23 | de YouLess pulsen miste van mijn draaischijf. Na een paar keer
24 | opnieuw plakken en juist uitlijnen werden er geen pulsen meer
25 | gemist.
26 |
27 |
28 |
29 |
30 | Vul het IP of de hostname van de YouLess in, druk op Start en
31 | de grafieken worden zichtbaar, evenals wat model informatie
32 | (MAC, firmware, etc) en de ruwe waardes. De rode stip geeft
33 | aan dat er een puls gedetecteerd is. Met de 'Set LS' knop
34 | kun je LS waarde (zoals hieronder beschreven) direct instellen.
35 |
36 |
37 |
38 | De huidige LS waarde is niet op te vragen via de API, de default
39 | is 180.
40 |
41 |
42 |
43 |
44 |
45 | Meer informatie over deze methode:
46 |
47 |
48 |
49 | https://gathering.tweakers.net/forum/view_message/43732209
50 |
51 |
52 |
53 | Quote:
54 |
55 |
56 |
57 | > In België zijn analoge elektriciteitsmeters vaak in een extra
58 | (semi)transparant kunstof kast ondergebracht. Is die bij jou ook het geval?
59 |
60 |
61 |
62 | > De afstand tussen Youless en draaischijf is daardoor vaak groter dan
63 | zonder de plastiek kast. Door het zwakkere signaal is het vaak nodig om
64 | de gevoeligheid van de Youless gevoeliger af te stellen voor deze situatie.
65 |
66 |
67 |
68 | > Wij hebben een Windows tool (in de vorm van een Windows gadget) waarmee
69 | de reflectie van de draaischijf zichtbaar gemaakt kan worden in een
70 | grafiek. Deze tool is behulpzaam zijn bij het afstellen van de
71 | gevoeligheid Deze tool kan hier worden gedownload:
72 |
73 |
74 |
75 | >> http://www.youless.nl/tl_files/downloads/rawmon-0.2.zip
76 |
77 |
78 |
79 | > Indien u Windows 8 gebruikt, dan kan de raw monitor gadget worden
80 | gebruikt met behulp van de 8gadget pack:
81 |
82 |
83 |
84 | > http://www.youless.nl/blogpost/items/gadget-windows-8.html
85 |
86 |
87 |
88 | > De Youless werkt zo dat hij standaard een dip in de gereflecteerde
89 | lichtsterkte van ongeveer 45% als een puls telt. Met de Windows tool
90 | ziet de grafiek er normaal gesproken zo uit:
91 |
92 |
93 |
94 | 
95 |
96 |
97 |
98 | > Er is hier duidelijk een korte scherpe dip te zien in het signaal
99 | wanneer het streepje langskomt. Hoe duidelijker de dip (relatief)
100 | zichtbaar is hoe beter. Als het gemiddelde input niveau zelf laag is, is
101 | dat op zich overigens geen probleem. Als de dip maar goed te
102 | onderscheiden is.
103 |
104 |
105 |
106 | > Deze dip zal door de grotere afstand minder duidelijk zijn indien er
107 | sprake is van een extra plastiek kast. De drempelwaarde parameter lw kan
108 | worden bijgesteld door de volgende url in een browser in te geven (het
109 | voorbeeld IP adres 1.2.3.4 dient hier nog vervangen te worden door het
110 | eigen Youless IP adres) :
111 |
112 |
113 |
114 | > http://1.2.3.4/M?lw=105
115 |
116 |
117 |
118 | > Wat dit betekent is dat de Youless een dip van 100/105=0.95 (ofwel een
119 | 5% relatieve daling) van het gemiddelde reflectieniveau als een puls zal
120 | zien. Af fabriek is de waarde van lw gelijk aan 180, dus met 105 is de
121 | gevoeligheid flink hoger. De waarde van lw moet tenminste 101 zijn.
122 |
123 |
124 |
125 | > De voorgestelde parameter waarde 105 werkt meestal goed bij meters in
126 | een extra plastiek kast. Vanuit de reflectie grafiek kan indien nodig
127 | worden afgeleid wat een optimale waarde is voor lw.
128 |
129 |
130 | > Mocht u nog vragen hebben, laat het ons dan gerust weten.
131 |
132 |
133 | Einde Quote
134 |
135 |
136 |
137 | Als extra aanvulling een plaatje van de RawMon widget
138 | waarbij er geen pulsen gedetecteerd worden:
139 |
140 | 
141 |
142 |
143 | [Bron](https://gathering.tweakers.net/forum/view_message/54740479)
144 |
145 |
146 |
147 |
148 | License: GNU GPLv3
149 |
150 |
151 | Author: Remy van Elst (https://raymii.org).
152 |
153 |
--------------------------------------------------------------------------------
/LineChart.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Remy van Elst https://raymii.org
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, version 3.
7 | *
8 | * This program is distributed in the hope that it will be useful, but
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 | * General Public License for more details.
12 | *
13 | * You should have received a copy of the GNU General Public License
14 | * along with this program. If not, see .
15 | */
16 |
17 | import QtQuick 2.15
18 |
19 | Item {
20 | id: root
21 |
22 | property string title: 'title'
23 | property string yLabel: 'yLabel'
24 | property string xLabel: 'xLabel'
25 |
26 | property variant points: [] //{x: 0, y: 0, xLegend: 'text'}, {x: 1, y: 2, xLegend: 'text2'}]
27 | property string color: 'navy'
28 |
29 | property double factor: Math.min(width, height)
30 |
31 | property double yInterval: 1
32 | property double yMax: 10
33 | property double yMin: 0
34 |
35 | function toYPixels(y) {
36 | return -plot.height / (yMax - yMin) * (y - yMin) + plot.height
37 | }
38 |
39 | property double xInterval: 1
40 | property double xMax: 10
41 | property double xMin: 0
42 |
43 | function toXPixels(x) {
44 | return plot.width / (xMax - xMin) * (x - xMin)
45 | }
46 |
47 | onPointsChanged: { // auto scale
48 | var xMin = 0, xMax = 0, yMin = 0, yMax = 0
49 | for(var i = 0; i < points.length; i++) {
50 | if(points[i].y > yMax) yMax = points[i].y
51 | if(points[i].y < yMin) yMin = points[i].y
52 | if(points[i].x > xMax) xMax = points[i].x
53 | if(points[i].x < xMin) xMin = points[i].x
54 | }
55 |
56 | var yLog10 = Math.log(yMax - yMin) / Math.LN10
57 | root.yInterval = Math.pow(10, Math.floor(yLog10)) / 2
58 | root.yMax = Math.ceil( yMax / yInterval) * yInterval
59 | root.yMin = Math.floor(yMin / yInterval) * yInterval
60 |
61 | var xLog10 = Math.log(xMax - xMin) / Math.LN10
62 | root.xInterval = Math.pow(10, Math.floor(xLog10))
63 | root.xMax = Math.ceil( xMax / xInterval) * xInterval
64 | root.xMin = Math.floor(xMin / xInterval) * xInterval
65 |
66 | canvas.requestPaint()
67 | }
68 |
69 | Text {
70 | text: title
71 | anchors.horizontalCenter: parent.horizontalCenter
72 | font.pixelSize: 0.03 * factor
73 | }
74 |
75 | Text {
76 | text: yLabel
77 | font.pixelSize: 0.03 * factor
78 | y: 0.5 * (2 * plot.y + plot.height + width)
79 | rotation: -90
80 | transformOrigin: Item.TopLeft
81 | }
82 |
83 | Text {
84 | text: xLabel
85 | font.pixelSize: 0.03 * factor
86 | anchors.bottom: parent.bottom
87 | anchors.horizontalCenter: plot.horizontalCenter
88 | }
89 |
90 | Item {
91 | id: plot
92 |
93 | anchors.fill: parent
94 | anchors.topMargin: 0.1 * factor
95 | anchors.bottomMargin: 0.2 * factor
96 | anchors.leftMargin: 0.15 * factor
97 | anchors.rightMargin: 0.1 * factor
98 |
99 |
100 | Repeater {
101 | model: Math.floor((yMax - yMin) / yInterval) + 1
102 |
103 | delegate: Rectangle {
104 | property double value: index * yInterval + yMin
105 | y: toYPixels(value)
106 | width: plot.width
107 | height: value? 1: 3
108 | color: 'black'
109 |
110 | Text {
111 | text: parseFloat(parent.value.toPrecision(6)).toString()
112 | anchors.right: parent.left
113 | anchors.verticalCenter: parent.verticalCenter
114 | anchors.margins: 0.01 * factor
115 | font.pixelSize: 0.03 * factor
116 | }
117 | }
118 | }
119 |
120 | Repeater {
121 | model: Math.floor((xMax - xMin) / xInterval) + 1
122 |
123 | delegate: Rectangle {
124 | property double value: index * xInterval + xMin
125 | x: toXPixels(value)
126 | width: value ? 1 : 3
127 | height: plot.height
128 | color: 'black'
129 |
130 | Text {
131 | text: root.points[parseInt(parent.value)] !== undefined ? root.points[parseInt(parent.value)].xLegend !== "" ? root.points[parseInt(parent.value)].xLegend : parseFloat(parent.value.toPrecision(6)).toString() : ""
132 | anchors.top: parent.bottom
133 | anchors.horizontalCenter: parent.horizontalCenter
134 | anchors.margins: 0.01 * factor
135 | font.pixelSize: 0.03 * factor
136 | }
137 | }
138 | }
139 |
140 | Canvas {
141 | id: canvas
142 | anchors.fill: parent
143 | onPaint: {
144 | var context = getContext("2d")
145 | context.clearRect(0, 0, width, height)
146 | context.strokeStyle = color
147 | context.lineWidth = 0.005 * factor
148 | context.beginPath()
149 | for(var i = 0; i < points.length; i++)
150 | context.lineTo(toXPixels(points[i].x), toYPixels(points[i].y))
151 | context.stroke()
152 | }
153 | }
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/main.qml:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Remy van Elst https://raymii.org
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, version 3.
7 | *
8 | * This program is distributed in the hope that it will be useful, but
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 | * General Public License for more details.
12 | *
13 | * You should have received a copy of the GNU General Public License
14 | * along with this program. If not, see .
15 | */
16 |
17 |
18 | import QtQuick 2.15
19 | import QtQuick.Controls 2.15
20 | import QtQuick.Layouts 1.15
21 | import QtQuick.Window 2.15
22 |
23 | import Qt.labs.settings 1.0
24 |
25 | Window {
26 | id: root
27 | width: 800
28 | height: 1000
29 | visible: true
30 | title: qsTr("YouLessQt 1.1 by Remy van Elst, raymii.org. License: GNU GPLv3")
31 |
32 | property var response: undefined
33 |
34 | property var pwrValues: []
35 | property int pwrCount: 0
36 | property int pwrMaxCount: 300
37 |
38 | property int rawMaxCount: 300
39 | property var rawValues: []
40 | property int rawCount: 0
41 | // property int rawLowest: 9999999
42 | // property int rawAvg: 0
43 | // property int suggestedLwValue: 105
44 |
45 | property int lvlMaxCount: 300
46 | property var lvlValues: []
47 | property int lvlCount: 0
48 |
49 | property bool showPwrGraph: true
50 | property bool showRawGraph: true
51 |
52 | property bool getDeviceInfoOnce: false
53 |
54 |
55 | function doGetRequest(url) {
56 | var xmlhttp = new XMLHttpRequest()
57 |
58 | xmlhttp.onreadystatechange = function () {
59 | if (xmlhttp.readyState === XMLHttpRequest.DONE) {
60 | if(xmlhttp.status >= 200 && xmlhttp.status < 400) {
61 | // console.log("resp: " + JSON.stringify(xmlhttp.responseText))
62 | try {
63 | response = JSON.parse(xmlhttp.responseText)
64 | } catch(e) {
65 | errorText.text = "JSON parse error (of net ge-reboot)"
66 | getTimer.stop()
67 | }
68 | } else {
69 | errorText.text = "HTTP Error: " + xmlhttp.statusText + "; Status code: " + xmlhttp.status
70 | getTimer.stop()
71 | }
72 | }
73 | }
74 | xmlhttp.ontimeout = function() { errorText.text = "HTTP Timeout!"; getTimer.stop() };
75 | xmlhttp.onerror = function() { errorText.text = "HTTP ERROR!"; getTimer.stop() };
76 | xmlhttp.open("GET", url, true)
77 | xmlhttp.timeout = 4000 // 4 sec
78 | xmlhttp.send()
79 | }
80 |
81 | Settings {
82 | property alias youLessIp: youLessIP.text
83 | property alias running: getTimer.running
84 | }
85 |
86 |
87 | onResponseChanged: {
88 | const average = arr => arr.reduce( ( previous, current ) => previous + current, 0 ) / arr.length;
89 |
90 | if(response !== undefined) {
91 | var minutes = new Date().getMinutes();
92 | minutes = minutes > 9 ? minutes : '0' + minutes;
93 | var hours = new Date().getHours();
94 | hours = hours > 9 ? hours : '0' + hours;
95 | var timeText = hours + ":" + minutes;
96 |
97 | // /e api, device info
98 | if(response.hasOwnProperty("model")) deviceModelLabel.text = "Model: " + response.model
99 | if(response.hasOwnProperty("fw")) deviceFwLabel.text = "Fw: " + response.fw
100 | if(response.hasOwnProperty("mac")) deviceMacLabel.text = "MAC: " + response.mac
101 |
102 | // /V?h=1 api (minute log)
103 | if(response.hasOwnProperty("val") && Array.isArray(response.val) && response.val.length > 0) {
104 | pwrValues.push({x: pwrCount, y: parseInt(response.val[0]), xLegend: "-1m"})
105 | pwrCount++
106 | }
107 |
108 | // /a api, only one with raw values
109 | if(response.hasOwnProperty("pwr")) {
110 | if(pwrValues.length > 0 && pwrValues.slice(-1).pop().y !== response.pwr) {
111 | pwrValues.push({x: pwrCount, y: response.pwr, xLegend: timeText})
112 | pwrCount++
113 | }
114 | }
115 | if(response.hasOwnProperty("raw")) {
116 | rawValues.push({x: rawCount, y: response.raw, xLegend: timeText})
117 | rawCount++
118 |
119 | // // https://web.archive.org/web/20230917145547/https://gathering.tweakers.net/forum/view_message/50504265
120 | // rawAvg = average(rawValues.map((pwrV) => pwrV.y))
121 | // if(response.raw < rawLowest) {
122 | // rawLowest = response.raw
123 | // console.log("low: " + rawLowest)
124 | // }
125 | // console.log("avg: " + rawAvg)
126 | // suggestedLwValue = Math.max(105, ((rawAvg / Math.max(1, rawLowest)) - 10));
127 | // console.log("sug: " + suggestedLwValue)
128 | }
129 |
130 | if(response.hasOwnProperty("lvl")) {
131 | lvlValues.push({x: lvlCount, y: response.lvl, xLegend: timeText})
132 | lvlCount++
133 | lvlLabel.text = response.lvl + "%"
134 |
135 | }
136 | if(response.hasOwnProperty("cnt")) cntLabel.text = response.cnt + " kWh"
137 | if(response.hasOwnProperty("pwr")) pwrLabel.text = response.pwr + " W"
138 | if(response.hasOwnProperty("dev")) devLabel.text = response.dev
139 | if(response.hasOwnProperty("det")) detLabel.text = response.det
140 | }
141 | }
142 |
143 | onPwrCountChanged: {
144 | if(pwrCount > pwrMaxCount) {
145 | pwrValues = pwrValues.map(function(point){return {x: point.x - 1, y: point.y, xLegend: point.xLegend};});
146 | pwrValues = pwrValues.slice(1)
147 | pwrCount--;
148 | }
149 | wattChart.points = pwrValues
150 | }
151 |
152 | onRawCountChanged: {
153 | if(rawCount > rawMaxCount) {
154 | rawValues = rawValues.map(function(point){return {x: point.x - 1, y: point.y, xLegend: point.xLegend};});
155 | rawValues = rawValues.slice(1)
156 | rawCount--;
157 | }
158 | rawChart.points = rawValues
159 | }
160 |
161 | onLvlCountChanged: {
162 | if(lvlCount > lvlMaxCount) {
163 | lvlValues = lvlValues.map(function(point){return {x: point.x - 1, y: point.y, xLegend: point.xLegend};});
164 | lvlValues = lvlValues.slice(1)
165 | lvlCount--;
166 | }
167 | lvlChart.points = lvlValues
168 | }
169 |
170 |
171 | Timer {
172 | id: getTimer
173 | interval: 500
174 | running: false
175 | repeat: true
176 | onTriggered: {
177 | // get device info and history only once
178 | if(!getDeviceInfoOnce) {
179 | doGetRequest("http://" + youLessIP.text + "/d")
180 | doGetRequest("http://" + youLessIP.text + "/V?h=1")
181 | getDeviceInfoOnce = true
182 | }
183 |
184 | doGetRequest("http://" + youLessIP.text + "/a?f=j")
185 | }
186 | }
187 |
188 |
189 |
190 | TabBar {
191 | id: bar
192 | width: parent.width
193 | height: 40
194 | z: 2
195 | Repeater {
196 | model: ["YouLessQt", "Help"]
197 |
198 | TabButton {
199 | text: modelData
200 | width: Math.max(100, bar.width / 2)
201 | }
202 | }
203 | }
204 |
205 |
206 | StackLayout {
207 | anchors.top: bar.bottom
208 | anchors.bottom: parent.bottom
209 | anchors.left: parent.left
210 | anchors.right: parent.right
211 | currentIndex: bar.currentIndex
212 |
213 | ScrollView {
214 | id: homeTab
215 | contentWidth: availableWidth // only allow horizontal scrolling
216 | ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
217 | ScrollBar.vertical.policy: ScrollBar.AlwaysOn
218 |
219 | ColumnLayout {
220 | anchors.fill: parent
221 | anchors.margins: 20
222 | spacing: 5
223 |
224 | GridLayout {
225 | id: infoRow
226 | Layout.preferredWidth: 400
227 | Layout.alignment: Qt.AlignTop
228 | Layout.margins: 5
229 | rowSpacing: 5
230 | columnSpacing: 5
231 | columns: root.width < 400 ? 1 : 3
232 | rows: root.width < 400 ? 3 : 1
233 |
234 | TextField {
235 | id: youLessIP
236 | placeholderText: "YouLess IP (192.168.x.y)"
237 | onAccepted: startStopButton.clicked()
238 | }
239 |
240 |
241 | Button {
242 | id: startStopButton
243 | text: getTimer.running ? "Stop" : "Start"
244 | Layout.minimumWidth: 120
245 | enabled: youLessIP.text !== ""
246 | onClicked: {
247 | errorText.text = ""
248 | if(getTimer.running) {
249 | getTimer.stop()
250 | getDeviceInfoOnce = false
251 | } else {
252 | getTimer.start()
253 | }
254 | }
255 | }
256 |
257 | Button {
258 | text: "Clear"
259 | Layout.minimumWidth: 120
260 | onClicked: {
261 | pwrCount = 0
262 | pwrValues = []
263 | rawCount = 0
264 | rawValues = []
265 | lvlCount = 0
266 | lvlValues = []
267 | }
268 | }
269 | }
270 |
271 |
272 |
273 |
274 | Item {
275 | Layout.preferredHeight: 2
276 | Layout.preferredWidth: parent.width
277 | Layout.alignment: Qt.AlignTop
278 |
279 | Rectangle {
280 | anchors.fill: parent
281 | color: '#eee'
282 | }
283 | }
284 |
285 |
286 | GridLayout {
287 | id: deviceInfoRow
288 | Layout.preferredWidth: 500
289 | Layout.margins: 5
290 | rowSpacing: 5
291 | columnSpacing: 5
292 | Layout.alignment: Qt.AlignTop
293 | columns: root.width < 400 ? 1 : 4
294 | rows: root.width < 400 ? 4 : 1
295 |
296 | Text {
297 | id: errorText
298 | visible: text !== ""
299 | color: 'red'
300 | }
301 |
302 | Text {
303 | id: deviceModelLabel
304 | text: "Model: "
305 | }
306 | Text {
307 | id: deviceFwLabel
308 | text: "Fw: "
309 | }
310 | Text {
311 | id: deviceMacLabel
312 | text: "MAC: "
313 | }
314 | }
315 |
316 |
317 | Rectangle {
318 | Layout.preferredHeight: 2
319 | Layout.alignment: Qt.AlignTop
320 | Layout.preferredWidth: parent.width
321 | color: '#eee'
322 | }
323 |
324 | GridLayout {
325 | id: currentValuesRow
326 | Layout.preferredWidth: 500
327 | Layout.alignment: Qt.AlignTop
328 | Layout.margins: 5
329 | rowSpacing: 5
330 | columnSpacing: 5
331 | columns: root.width < 400 ? 2 : 5
332 | rows: root.width < 400 ? 5 : 2
333 |
334 | Text {
335 | id: cntLabel // counter in kWh
336 | textFormat: Text.RichText
337 | text: "... kWh"
338 | }
339 |
340 | Text {
341 | id: detLabel // puls / meetbericht detectie indicatie
342 | color: 'red'
343 | textFormat: Text.RichText
344 | }
345 |
346 | Text {
347 | visible: !detLabel.visible
348 | color: 'white'
349 | text: "."
350 | }
351 |
352 | Text {
353 | id: lvlLabel // moving average level (intensity of reflected light on analog meters)
354 | textFormat: Text.RichText
355 | text: "... %"
356 | }
357 |
358 | Text {
359 | id: devLabel // deviation of reflection
360 | textFormat: Text.RichText
361 | text: "( ... %)"
362 | }
363 |
364 |
365 | Text {
366 | id: pwrLabel // Pwer consumption in Watt
367 | textFormat: Text.RichText
368 | text: "... W"
369 | }
370 | }
371 |
372 | Item {
373 | Layout.preferredHeight: 2
374 | Layout.preferredWidth: parent.width
375 | Layout.alignment: Qt.AlignTop
376 |
377 | Rectangle {
378 | anchors.fill: parent
379 | color: '#eee'
380 | }
381 | }
382 |
383 | Item {
384 | visible: showRawGraph
385 | Layout.alignment: Qt.AlignTop
386 | Layout.preferredWidth: parent.width
387 | Layout.preferredHeight: 500
388 |
389 |
390 | LineChart {
391 | id: rawChart
392 | anchors.fill: parent
393 |
394 | visible: showRawGraph
395 |
396 | title: 'Ruwe 10-bit licht sensor reflectie waarde'
397 | yLabel: 'Raw'
398 | xLabel: 'Tijd'
399 | color: '#BDCF32'
400 | Rectangle {
401 | anchors.fill: parent
402 | color: '#8BD3C7'
403 | opacity: .2
404 | }
405 | }
406 | }
407 |
408 |
409 | Item {
410 | Layout.preferredHeight: 2
411 | Layout.preferredWidth: parent.width
412 | Layout.alignment: Qt.AlignTop
413 |
414 | Rectangle {
415 | anchors.fill: parent
416 | color: '#eee'
417 | }
418 | }
419 |
420 |
421 |
422 | GridLayout {
423 | id: setLightSensorRow
424 | Layout.preferredWidth: 400
425 | Layout.alignment: Qt.AlignTop
426 | Layout.margins: 5
427 | rowSpacing: 5
428 | columnSpacing: 5
429 | columns: root.width < 400 ? 1 : 2
430 | rows: root.width < 400 ? 2 : 1
431 |
432 | TextField {
433 | id: lwValue
434 | placeholderText: "LW waarde (default 180)"
435 | validator: IntValidator{bottom: 105; top: 500;}
436 | onAccepted: setlwValueButton.clicked()
437 | }
438 |
439 |
440 | Button {
441 | id: setlwValueButton
442 | text: "Set LW value"
443 | enabled: lwValue.text !== "" && lwValue.acceptableInput
444 | onClicked: {
445 | doGetRequest("http://" + youLessIP.text + "/M?lw=" + lwValue.text)
446 | }
447 | }
448 | }
449 |
450 | Item {
451 | Layout.preferredHeight: 2
452 | Layout.preferredWidth: parent.width
453 | Layout.alignment: Qt.AlignTop
454 |
455 | Rectangle {
456 | anchors.fill: parent
457 | color: '#eee'
458 | }
459 | }
460 |
461 | Item {
462 | visible: showRawGraph
463 | Layout.alignment: Qt.AlignTop
464 | Layout.preferredWidth: parent.width
465 | Layout.preferredHeight: 500
466 |
467 |
468 | LineChart {
469 | id: lvlChart
470 | anchors.fill: parent
471 |
472 | visible: showRawGraph
473 | title: 'Licht sensor niveau in procent (moving average)'
474 | yLabel: 'percentage'
475 | xLabel: 'Tijd'
476 | color: '#CA472F'
477 | Rectangle {
478 | anchors.fill: parent
479 | color: '#E3DBF7'
480 | opacity: .2
481 | }
482 | }
483 | }
484 |
485 | Item {
486 | Layout.preferredHeight: 2
487 | Layout.preferredWidth: parent.width
488 | Layout.alignment: Qt.AlignTop
489 |
490 | Rectangle {
491 | anchors.fill: parent
492 | color: '#eee'
493 | }
494 | }
495 |
496 | Item {
497 | visible: showPwrGraph
498 | Layout.alignment: Qt.AlignTop
499 | Layout.preferredWidth: parent.width
500 | Layout.preferredHeight: 500
501 |
502 |
503 | LineChart {
504 | id: wattChart
505 | anchors.fill: parent
506 | title: 'Actueel Vermogen'
507 | yLabel: 'Watt'
508 | xLabel: 'Tijd'
509 | color: '#9B19F5'
510 |
511 | Rectangle {
512 | anchors.fill: parent
513 | color: '#b2e061'
514 | opacity: .2
515 | }
516 | }
517 | }
518 |
519 |
520 | GridLayout {
521 | id: moreButtonsRow
522 | Layout.preferredWidth: 500
523 | Layout.alignment: Qt.AlignTop
524 | Layout.margins: 5
525 | rowSpacing: 5
526 | columnSpacing: 5
527 | columns: root.width < 400 ? 1 : 5
528 | rows: root.width < 400 ? 5 : 1
529 |
530 | Button {
531 | text: showPwrGraph ? "Hide Power" : "Show Power"
532 | onClicked: showPwrGraph = !showPwrGraph
533 | }
534 |
535 | Button {
536 | text: showRawGraph ? "Hide Raw" : "Show Raw"
537 | onClicked: showRawGraph = !showRawGraph
538 | }
539 |
540 | Button {
541 | text: "Herstart YouLess"
542 | enabled: youLessIP.text !== ""
543 | onClicked: {
544 | getTimer.stop()
545 | doGetRequest("http://" + youLessIP.text + "/S?rb=")
546 | }
547 | }
548 | }
549 |
550 | Item {
551 | Layout.preferredHeight: 2
552 | Layout.preferredWidth: parent.width
553 | Layout.alignment: Qt.AlignTop
554 |
555 | Rectangle {
556 | anchors.fill: parent
557 | color: '#eee'
558 | }
559 | }
560 |
561 |
562 | Item {
563 | Layout.alignment: Qt.AlignTop
564 | Layout.preferredWidth: parent.width
565 | Layout.preferredHeight: 600
566 |
567 | Text {
568 | anchors.fill: parent
569 | text: "YouLessQt 1.1 by Remy van Elst\nLicense: GNU GPLv3"
570 | color: "#bbb"
571 | }
572 | }
573 |
574 |
575 | }
576 | }
577 |
578 |
579 | ScrollView {
580 | id: helpTab
581 | contentWidth: availableWidth // only allow horizontal scrolling
582 | ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
583 | ScrollBar.vertical.policy: ScrollBar.AlwaysOn
584 |
585 | ColumnLayout {
586 | anchors.fill: parent
587 | anchors.margins: 20
588 | spacing: 5
589 |
590 |
591 | Text {
592 | Layout.preferredWidth: parent.width
593 | wrapMode: Text.WordWrap
594 | font.pixelSize: 14
595 | horizontalAlignment: Text.AlignLeft
596 | textFormat: TextEdit.MarkdownText
597 | text: "**Dit is een onofficiele applicatie, niet door YouLess / PostFossil gemaakt.**
598 |
599 |
600 |
601 | Helpt de YouLess energiemeter goed op de analoge
602 | (draaischijf) meter plakken door de ruwe sensorwaarde
603 | en relevante sensorwaardes te tonen zodat men kan zien
604 | wanneer een puls gedetecteerd wordt, zonder een Windows 7
605 | gadget te installeren. Ook is hiermee de LW waarde direct
606 | aan te passen op de YouLess, waarna het effect direct in
607 | de grafiek te zien is. Gezien dit een Android applicatie is
608 | (evenals Windows) is dit makkelijker direct in de meterkast
609 | te gebruiken dan een PC gadget.
610 |
611 |
612 |
613 | Ik heb deze applicatie in een paar avonden in elkaar gezet omdat
614 | de YouLess pulsen miste van mijn draaischijf. Na een paar keer
615 | opnieuw plakken en juist uitlijnen werden er geen pulsen meer
616 | gemist. Dezelfde dipjes zoals op onderstaand voorbeeld-plaatje
617 | zullen in de grafieken hier ook te zien zijn.
618 |
619 |
620 |
621 | Vul het IP of de hostname van de YouLess in, druk op Start en
622 | de grafieken worden zichtbaar, evenals wat model informatie
623 | (MAC, firmware, etc) en de ruwe waardes. De rode stip geeft
624 | aan dat er een puls gedetecteerd is. Met de 'Set LW' knop
625 | kun je LW waarde (zoals hieronder beschreven) direct instellen.
626 |
627 |
628 |
629 | De huidige LW waarde is niet op te vragen via de API, de default
630 | is 180.
631 |
632 |
633 |
634 | Meer informatie over deze methode:
635 |
636 |
637 |
638 | https://gathering.tweakers.net/forum/view_message/43732209
639 |
640 |
641 |
642 | Quote:
643 |
644 |
645 |
646 | > In België zijn analoge elektriciteitsmeters vaak in een extra
647 | (semi)transparant kunstof kast ondergebracht. Is die bij jou ook het geval?
648 |
649 |
650 |
651 | > De afstand tussen Youless en draaischijf is daardoor vaak groter dan
652 | zonder de plastiek kast. Door het zwakkere signaal is het vaak nodig om
653 | de gevoeligheid van de Youless gevoeliger af te stellen voor deze situatie.
654 |
655 |
656 |
657 | > Wij hebben een Windows tool (in de vorm van een Windows gadget) waarmee
658 | de reflectie van de draaischijf zichtbaar gemaakt kan worden in een
659 | grafiek. Deze tool is behulpzaam zijn bij het afstellen van de
660 | gevoeligheid Deze tool kan hier worden gedownload:
661 |
662 |
663 |
664 | > http://www.youless.nl/tl_files/downloads/rawmon-0.2.zip
665 |
666 |
667 |
668 | > Indien u Windows 8 gebruikt, dan kan de raw monitor gadget worden
669 | gebruikt met behulp van de 8gadget pack:
670 |
671 |
672 |
673 | > http://www.youless.nl/blogpost/items/gadget-windows-8.html
674 |
675 |
676 |
677 | > De Youless werkt zo dat hij standaard een dip in de gereflecteerde
678 | lichtsterkte van ongeveer 45% als een puls telt. Met de Windows tool
679 | ziet de grafiek er normaal gesproken zo uit:
680 |
681 |
682 |
683 | "
684 | }
685 |
686 | Image {
687 | id: img
688 | width: 400
689 | height: 300
690 | source: "qrc:///siemens-red.png"
691 | }
692 |
693 |
694 | Text {
695 | Layout.preferredWidth: parent.width
696 | wrapMode: Text.WordWrap
697 | font.pixelSize: 14
698 | horizontalAlignment: Text.AlignLeft
699 | textFormat: TextEdit.MarkdownText
700 | text: "
701 | > Er is hier duidelijk een korte scherpe dip te zien in het signaal
702 | wanneer het streepje langskomt. Hoe duidelijker de dip (relatief)
703 | zichtbaar is hoe beter. Als het gemiddelde input niveau zelf laag is, is
704 | dat op zich overigens geen probleem. Als de dip maar goed te
705 | onderscheiden is.
706 |
707 |
708 |
709 | > Deze dip zal door de grotere afstand minder duidelijk zijn indien er
710 | sprake is van een extra plastiek kast. De drempelwaarde parameter lw kan
711 | worden bijgesteld door de volgende url in een browser in te geven (het
712 | voorbeeld IP adres 1.2.3.4 dient hier nog vervangen te worden door het
713 | eigen Youless IP adres) :
714 |
715 |
716 |
717 | > http://1.2.3.4/M?lw=105
718 |
719 |
720 |
721 | > Wat dit betekent is dat de Youless een dip van 100/105=0.95 (ofwel een
722 | 5% relatieve daling) van het gemiddelde reflectieniveau als een puls zal
723 | zien. Af fabriek is de waarde van lw gelijk aan 180, dus met 105 is de
724 | gevoeligheid flink hoger. De waarde van lw moet tenminste 101 zijn.
725 |
726 |
727 |
728 | > De voorgestelde parameter waarde 105 werkt meestal goed bij meters in
729 | een extra plastiek kast. Vanuit de reflectie grafiek kan indien nodig
730 | worden afgeleid wat een optimale waarde is voor lw.
731 |
732 |
733 |
734 | > Mocht u nog vragen hebben, laat het ons dan gerust weten.
735 |
736 |
737 | Einde Quote
738 |
739 |
740 | Als aanvulling nog een afbeelding van een verkeerd uitgelijnde YouLess
741 | waarbij geen pulsen gedetecteerd werden. Via:
742 | https://web.archive.org/web/20230917145340/https://gathering.tweakers.net/forum/view_message/54740479
743 |
744 | "
745 | }
746 | Image {
747 | width: 400
748 | height: 300
749 | source: "qrc:///rawmon-wrong.png"
750 | }
751 |
752 |
753 | Text {
754 | Layout.preferredWidth: parent.width
755 | wrapMode: Text.WordWrap
756 | font.pixelSize: 14
757 | horizontalAlignment: Text.AlignLeft
758 | textFormat: TextEdit.MarkdownText
759 | text: "
760 |
761 | License: GNU GPLv3
762 |
763 |
764 | Author: Remy van Elst (https://raymii.org).
765 |
766 |
767 | Source: https://github.com/RaymiiOrg/YouLessQt
768 |
769 |
770 | אֶשָּׂא עֵינַי אֶל־הֶהָרִים מֵאַיִן יָבֹא עֶזְרִֽי׃
771 |
772 |
773 | ---
774 | "
775 | }
776 | }
777 | }
778 |
779 | }
780 |
781 |
782 | }
783 |
784 |
785 |
786 |
787 |
788 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright © 2007 Free Software Foundation, Inc.
5 |
6 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for software and other kinds of works.
11 |
12 | The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
13 |
14 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
15 |
16 | To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
17 |
18 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
19 |
20 | Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
21 |
22 | For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
23 |
24 | Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
25 |
26 | Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
27 |
28 | The precise terms and conditions for copying, distribution and modification follow.
29 |
30 | TERMS AND CONDITIONS
31 |
32 | 0. Definitions.
33 |
34 | “This License” refers to version 3 of the GNU General Public License.
35 |
36 | “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
37 |
38 | “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
39 |
40 | To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
41 |
42 | A “covered work” means either the unmodified Program or a work based on the Program.
43 |
44 | To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
45 |
46 | To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
47 |
48 | An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
49 |
50 | 1. Source Code.
51 | The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
52 |
53 | A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
54 |
55 | The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
56 |
57 | The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
58 |
59 | The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
60 |
61 | The Corresponding Source for a work in source code form is that same work.
62 |
63 | 2. Basic Permissions.
64 | All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
65 |
66 | You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
67 |
68 | Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
69 |
70 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
71 | No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
72 |
73 | When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
74 |
75 | 4. Conveying Verbatim Copies.
76 | You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
77 |
78 | You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
79 |
80 | 5. Conveying Modified Source Versions.
81 | You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
82 |
83 | a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
84 |
85 | b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
86 |
87 | c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
88 |
89 | d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
90 |
91 | A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
92 |
93 | 6. Conveying Non-Source Forms.
94 | You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
95 |
96 | a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
97 |
98 | b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
99 |
100 | c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
101 |
102 | d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
103 |
104 | e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
105 |
106 | A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
107 |
108 | A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
109 |
110 | “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
111 |
112 | If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
113 |
114 | The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
115 |
116 | Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
117 |
118 | 7. Additional Terms.
119 | “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
120 |
121 | When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
122 |
123 | Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
124 |
125 | a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
126 |
127 | b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
128 |
129 | c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
130 |
131 | d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
132 |
133 | e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
134 |
135 | f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
136 |
137 | All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
138 |
139 | If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
140 |
141 | Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
142 |
143 | 8. Termination.
144 | You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
145 |
146 | However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
147 |
148 | Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
149 |
150 | Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
151 |
152 | 9. Acceptance Not Required for Having Copies.
153 | You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
154 |
155 | 10. Automatic Licensing of Downstream Recipients.
156 | Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
157 |
158 | An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
159 |
160 | You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
161 |
162 | 11. Patents.
163 | A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
164 |
165 | A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
166 |
167 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
168 |
169 | In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
170 |
171 | If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
172 |
173 | If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
174 |
175 | A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
176 |
177 | Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
178 |
179 | 12. No Surrender of Others' Freedom.
180 | If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
181 |
182 | 13. Use with the GNU Affero General Public License.
183 | Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
184 |
185 | 14. Revised Versions of this License.
186 | The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
187 |
188 | Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
189 |
190 | If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
191 |
192 | Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
193 |
194 | 15. Disclaimer of Warranty.
195 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
196 |
197 | 16. Limitation of Liability.
198 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
199 |
200 | 17. Interpretation of Sections 15 and 16.
201 | If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
202 |
203 | END OF TERMS AND CONDITIONS
204 |
205 | How to Apply These Terms to Your New Programs
206 |
207 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
208 |
209 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
210 |
211 | YouLessQt
212 | Copyright (C) 2023 remy
213 |
214 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
215 |
216 | 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 General Public License for more details.
217 |
218 | You should have received a copy of the GNU General Public License along with this program. If not, see .
219 |
220 | Also add information on how to contact you by electronic and paper mail.
221 |
222 | If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
223 |
224 | YouLessQt Copyright (C) 2023 remy
225 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
226 | This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
227 |
228 | The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
229 |
230 | You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see .
231 |
232 | The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .
233 |
--------------------------------------------------------------------------------