1) in place of field Last Seen of tab switches it would return either OFF status or device uptime (not overall - just time since it was powered on during this particular "session").
2) The overall time of device power on time would be stored somewhere and alert would be shown after device has worked for 1000 hrs(lets say a lifespan of a light bulb).
I have no idea where I should look for a script that is responsible for what is shown in Last Seen field.
I've found script called domoticzdevices.js and the following piece of code inside:
Code: Select all
var gText = makeSVGnode('text', { id: "lastseen", x: 0, y: Device.elementPadding * 7.5, 'font-size': '80%' }, '');
gStatusGroup.appendChild(gText);
gText.appendChild(makeSVGnode('tspan', { id: "lastlabel", 'font-style': 'italic', 'font-size': '80%' }, $.t('Last Seen')));
gText.appendChild(makeSVGnode('tspan', { id: "lastlabel", 'font-style': 'italic', 'font-size': '80%' }, ':'));
gText.appendChild(makeSVGnode('tspan', { id: "lastupdate", 'font-size': '80%' }, ' ' + this.lastupdate));
I've been looking for "Last Seen" and "lastupdate" with grep - and domoticzdevices.js seemed to be the most logical name for a script that returns lastupdate time.
I'd be very, very thankful for any help in modifying this website - it's very important to me to get it done
