vbbaby3
(Jörg)
January 17, 2017, 9:09am
1
Hi,
I tried to calculate the difference in seconds between the updates off an item.
Items:
Dimmer l_abseite <slider> (g_mysql)
DateTime l_abseite_update "Last Update [%1$td.%1$tm.%1$tY %1$tr]" (g_mysql)
DateTime l_abseite_time "Before Update [%1$td.%1$tm.%1$tY %1$tr]" (g_mysql)
Rules
I tried different version, but I can´t get it to work.
With this code I get the following error:
Rule 'Abseite Test Update': An error occoured during the script execution: null
Can someone please help me
opus
(Jürgen Baginski)
January 17, 2017, 9:51am
2
Confirm you have an Item called “datetimeitem”.
do you see nay of your logInfos in the log?
vbbaby3
(Jörg)
January 17, 2017, 9:57am
3
In the Log I see the first Loginfo:
Abseite Timestamp = 2017-01-17T09:10:31.510+0100
And then comes the Error…
Rule 'Abseite Test Update': An error occoured during the script execution: null
I have no datetimeitem, but the line with the datetime Item is commented with //
opus
(Jürgen Baginski)
January 17, 2017, 10:07am
4
Sorry, I missed the “//” in the Picture!
If you see the first logInfo, the Problem must be between this logInfo and up to the next.
I gues it’s the next logInfo! Try "logInfo (“rules”, “alter Stand = " + alterstand.toString)”
vbbaby3
(Jörg)
January 17, 2017, 10:25am
5
I now tested from line to line…
The Error comes with this line:
Rule ‘Abseite Test Update’: An error occoured during the script execution: null
vbbaby3
(Jörg)
January 17, 2017, 11:09am
6
@opus Thanks for your help…
I now find another solution in a the old GoogleGroup that worked for me
Don´t forget the
import org.joda.time.*