-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: added widget to show digital input states #1195
UI: added widget to show digital input states #1195
Conversation
Servus Andreas, hat es einen bestimmten Grund weshalb du nur die Read Only Channels anzeigst? Ich melde mich die Tage noch einmal wegen dem Rest des Reviews. |
Hallo Fabian, da es für die Outputs ja bereits ein Widget gibt wollte ich mich hierbei nur auf die Inputs konzentrieren, damit ich einfach sehen kann, welche Signale an den Inputs anliegen. |
Das ergibt natürlich Sinn. Erst einmal vielen Dank für deinen Pull Request! Bezüglich des Reviews: Wir haben gewisse Coding Guideline für das Monitoring. Also bitte nicht falsch verstehen, das Review ist keineswegs unfreundlich/böse etc. gemeint.
Als Icon bitte slot="start" color="primary" size="large" name="radio-button-off-outline" verwenden.
Die Widgets haben immer einen 'Übersichts' und einen 'Erweiterten' (die Modal Komponente) Teil. Bei diesem Widget würde es sich anbieten im Übersichts Widget (also das, welches oben im Screenshot zu sehen ist, also im Prinzip nur io0 bzw. den Alias) die verfügbaren Geräte/Komponenten ohne die Channels/Channelwerte anzuzeigen. Hierbei nicht die component.id, sondern den component.alias verwenden. In der erweiterten Ansicht dann die Channelwerte als table Struktur, wie in den anderen Modal Komponenten. Keine Farbe für den Text innerhalb der Widgets festlegen.
Mit der Logik in der live.component.html wird pro verfügbaren Komponente/Nature/Factory ein Widget angezeigt. Im Widget selber jedoch sammelst du nochmal alle Komponenten. Wenn jetzt also mehr als zwei Komponente/Natures/Factories bei einem System verfügbar wären, würden zwei Widgets mit dem selben Inhalt erscheinen. Deshalb wird auch pro widget eine component.id an das Widget übergeben. Das hast du auch gemacht, aber die Input property im Widget selbst nicht definiert. Hier solltest du dafür sorgen, dass das Widget nur einmal aufgerufen wird und den Übergabeparameter rausnehmen. |
Danke für das Review. |
Oha, nein eigentlich nicht. |
*underline component alias *disable property channels
Habe das mit !channel.key.includes('_Property')" gelöst. Nochmal vielen Dank für deinen Pull Request! |
Zumindest solltet ihr nach dem Typ BOOLEAN filtern können, oder? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Habe das html if jetzt auf channe.value.type == 'BOOLEAN' abgeändert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahummelsberger, @fabianfnc: I have some comments/doubts on this pull-request. Can you please have a look?
<ion-card-content> | ||
<table class="full_width"> | ||
<tr> | ||
<td style="width:65%" translate>Anzahl Komponenten</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"translate" needs an identifier for the string, right? I don't think it will work this way.
|
||
|
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why so many empty lines?
<ng-container *ngFor="let channel of (component.channels | keys)"> | ||
<ng-container *ngIf="channel.value['accessMode'] === 'RO'"> | ||
<ng-container | ||
*ngIf="channel.value.type == 'BOOLEAN' && channel.key !== '_PropertyEnabled'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the component has another property than 'enabled' that is also boolean?
<td style="width:65%">{{ channel.key }}</td> | ||
<td style="width:36%" class="align_right"> | ||
<ion-icon name="radio-button-off" | ||
*ngIf="currentData[component.id + '/' + channel.key] === 0; else inputOn"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also 'false' if the value is 'undefined', right?
<ion-col *ngSwitchCase="'io.openems.edge.io.api.DigitalInput'" size="12" size-lg="6" class="ion-no-padding"> | ||
<digitalinput></digitalinput> | ||
</ion-col> | ||
</ng-container> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the indentation for ChannelSingleThreshold changed?
@@ -63,6 +65,8 @@ import { SymmetricPeakshavingModalComponent } from './peakshaving/symmetric/moda | |||
SinglethresholdModalComponent, | |||
StorageModalComponent, | |||
SymmetricPeakshavingModalComponent, | |||
DigitalInputComponent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required? For the other components it's only the "Modal" component.
@@ -67,6 +68,9 @@ export class Widgets { | |||
|
|||
for (let nature of Object.values(WidgetNature).filter(v => typeof v === 'string')) { | |||
for (let componentId of config.getComponentIdsImplementingNature(nature.toString())) { | |||
if (nature === 'io.openems.edge.io.api.DigitalInput' && list.some(e => e.name === 'io.openems.edge.io.api.DigitalInput')) { | |||
continue; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this specific handling required?
Reviewed-by: Michael Grill <[email protected]> Reviewed-by: Stefan Feilmeier <[email protected]> Co-authored-by: Kai Jeschek <[email protected]> Co-committed-by: Kai Jeschek <[email protected]>
- UI: add notification infrastructure - Battery improvements - Adds `DC_MIN_VOLTAGE` and `DC_MAX_VOLTAGE` to BatteryInverter; implemented in KACO. - Adds ESS-Protection on Generic-ESS - Adds Voltage Regulation in ESS - Modbus/SunSpec: implement BitWords - Refactor SunSpecCodeGenerator - Handle `BITFIELD16` and `BITFIELD32` properly - Allow overriding BITFIELD mapping, e.g. for "Vendor defined events" - ESS Power Solver: improve KEEPING_ALL_EQUAL strategy - Add `OPTIMIZE_BY_KEEPING_ALL_NEAR_EQUAL` strategy; automatically applied as fallback to `OPTIMIZE_BY_KEEPING_ALL_EQUAL`. - Systemd-Networkd: parse [Gateway] in [Route] block - Backend: Send ON_SET_SUM_STATE Event only on change (#1195) - GoodWe: fix sorting of diagnostic bit registers - UI: add warning for systemupdate - Confirmation alert for systemupdate - Standardizing alert for update and EMS restart - UI: adjust translations of alert - Adjust translations of confirmation alert of system update - Adding fix messages for retrofit bnd - Backend b2bwebsocket: fix tests - Gradle builds end with a warning: `Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.` - This is due to this error ``` > Task :io.openems.backend.b2bwebsocket:test No test executed. This behavior has been deprecated. This will fail with an error in Gradle 9.0. There are test sources present but no test was executed. Please check your test configuration. Consult the upgrading giude for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#test_task_fail_on_no_test_executed ``` - UI: improve systemLog - Adding searchbar to be able to filter systemlog (case-insensitive) - Adding debug level filter - Enable Copying of systemlog - Improved filter for Non condensed output -> splitting debugLog string if line-breaks provided - add toggle to reconfigure [condensedOutput](https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.debug.log/src/io/openems/edge/controller/debuglog/Config.java#L23-L24) - Power Solver: OPTIMIZE_BY_KEEPING_ALL_NEAR_EQUAL - GoodWe: fix impossible high Battery Power values - FENECON Home Battery add stop functionality - STOP Home battery on very low cell voltage. Adds Channels: - LOW_MIN_VOLTAGE_WARNING: Low min voltage warning | Niedriger Ladezustand der Batterie, da die Batterie nicht durch den Wechselrichter beladen werden kann. Ohne Beladung schaltet sich die Batterie demnächst ab, um sich selbst zu schützen - LOW_MIN_VOLTAGE_FAULT: Low min voltage fault | Niedriger Ladezustand. Die Batterie schaltet sich demnächst ab, um sich selbst zu schützen - LOW_MIN_VOLTAGE_FAULT_BATTERY_STOPPED: Low min voltage fault - Battery stopped | Batterie wurde wegen zu niedrigem Ladezustand abgeschaltet. Bitte kontaktieren Sie Ihren Installateur - Backend Alerting: fix NPE, general improvements - make local variables final - remove `public` from interface methods - add null check to `Message.compareTo` - Update Debian settings - Do not install man-pages, locales, docs - Weidmüller IO: fix reading of CurrentModuleList - Fixed hidden ClassCastException in `readCurrentModuleList()` - CI: Improve gradle scripts - UI: fix duplicate legend item generation for same aliases - UI: Extend Eslint - Extend EsLint to make implementing lifecycle interfaces mandatory - UI: Hide Menu in login page - TimeOfUseTariff rabot.charge implementation --------- Co-authored-by: Sebastian Asen <[email protected]> Co-authored-by: Lukas Rieger <[email protected]> Co-authored-by: Stefan Feilmeier <[email protected]> Co-authored-by: Hueseyin Sahutoglu <[email protected]> Co-authored-by: Bishal Ghimire <[email protected]> Co-authored-by: Pooran Chandrashekaraiah <[email protected]> Co-authored-by: Sagar Venu <[email protected]> Co-authored-by: Kai Jeschek <[email protected]> Co-authored-by: Manoj-Kumar Varikela <[email protected]> Co-authored-by: Saeid Nikoubin Boroujeni <[email protected]>
For testing my iot2000 implementation I created a widget to show the states of all available digital input channels.
It iterates through all enabled components that implement the DigitialInput Interface and list the states of the channels.
The design surely can be improved though.