0
Answered

How can I record the operating time

GE 5 months ago in Dashboard and Widgets updated by Support Manager 4 months ago 5

hallo,

i have a device which consumes either 70 W or 290 W. How can I record the operating time during which the device consumes more than e.g. 100 W. Is there a script that I can use to record the operating time when the device more then 100 watts consumesIs there a script that I can use to record the operating time ( yellow intervals on the graphic

) when I use more than 100 watts?

Image 2036


Answered

Hello,

You won’t be able to build such a script on the Dashboard, sorry.


But you can add the universal meter D105 Extended

https://shop.smart-maic.com/shop/product/d105-10-pulse-counter-26#D105-10%20Extended

in operating time tracking mode:

https://support.smart-maic.com/en/knowledge-bases/2/articles/784-d105-working-time-counter-operating-hours


Connect D105 to D101/D103 built-in relay, as in the diagram.

Image 2037


In the settings of the D101/D105 device in the “Conditions” menu, set the condition for controlling the relay.

Conditions are checked from top to bottom, the relay assumes a state based on the last true condition.
The first condition always turns off the relay.
The second condition turn on relay if W > 100 only.

Image 2039


Done, now D105 will count down to seconds when you had more than 100W.

thank you for your respond. I use a d105 device. the device gets the consumption values ​​in Ch2 via Modbus. can I set the criteria for the relay like in the photo? How can I integrate the Relay-status or workingtime into the dashboard?

Image 2045

I'm afraid with one D105 it won't be possible to calculate the operating time with a consumption of >100W.

We need one more D105 Extended in Operating time tracking mode.

The scheme is the same as above, the conditions are correct.

Hallo,

I wish everyone a peaceful merry Christmas. second D105 Extended has been ordered. At the same time, I'm trying to get the data via Java script.
Chatgpt is very helpful with this. With the Java script below I get the workingtime. but unfortunately the workingtime is reset to zero every time the dashboard is started and I cannot download the data via CVS-Export. maybe you have an idea. Thanks and best regards

var startzeitpunkt = null;
var kumulativeDauer = 0;

// Simuliere den Abruf von d.Ch2 einmal pro Sekunde
setInterval(function() {
// Hier sollte der tatsächliche Code stehen, um den aktuellen Wert von d.Ch2 abzurufen
var aktuellerWert = Math.floor(Math.random() * 200) + 1; // Beispiel: Zufälliger Wert zwischen 1 und 200

// Überprüfe, ob der Wert größer als 100 ist
if (aktuellerWert > 100) {
if (startzeitpunkt === null) {
startzeitpunkt = new Date();
console.log("Startzeitpunkt: " + startzeitpunkt);
}
} else {
if (startzeitpunkt !== null) {
var endzeitpunkt = new Date();
console.log("Endzeitpunkt: " + endzeitpunkt);

// Berechne und zeige die Dauer
var dauerInMillisekunden = endzeitpunkt - startzeitpunkt;
kumulativeDauer += dauerInMillisekunden;
console.log("Kumulative Dauer: " + kumulativeDauer + " Millisekunden");

startzeitpunkt = null; // Setze den Startzeitpunkt zurück
}
}
}, 1000);

Sorry, no ideas, but you can export data to CSV from the table widget.

Image 2046