Logic Machine Forum
Date / Time Object - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Date / Time Object (/showthread.php?tid=4486)



Date / Time Object - tom77 - 10.01.2023

Hi, unfortunately it does not work for me that I assign a date / time object in the visualization a new value.The Date / Time Picker opens but the selected value is not applied. Does anyone have an idea how I can do this (firmware 20221205)

Best regards,

Thomas


RE: Date / Time Object - Daniel - 11.01.2023

Can you make a video and show how you do it?


RE: Date / Time Object - tom77 - 11.01.2023

Hello Daniel, attached is the screenrecord,unfortunately no event seems to be triggered either tried with
value = event.getvalue()
log(value)
to display this but nothing happens


RE: Date / Time Object - Daniel - 11.01.2023

Send me your backup to PM. It works fine for me.
You will need to upload it somewhere and send me a link like https://wetransfer.com/


RE: Date / Time Object - admin - 11.01.2023

Can you control any other objects? Maybe the websocket connection is blocked. Check browser console (F12) for any errors.


RE: Date / Time Object - tom77 - 11.01.2023

Yes the problem occurs only for date and time

ok I have tested it on another LM there it works ... I reset and see if it works is eh only my test server .... sorry had not thought to test the times where else thanks a lot


RE: Date / Time Object - spoty2008 - 16.01.2023

Hi all. 
I have the same problem. Only the time and date are not written to the bus. The latest firmware. There is a connection to the bus. Other objects are being written.


RE: Date / Time Object - Daniel - 16.01.2023

Please explain the steps how do you perform the write.


RE: Date / Time Object - spoty2008 - 16.01.2023

(16.01.2023, 09:14)Daniel Wrote: Please explain the steps how do you perform the write.
now = os.date('*t')


wday = now.wday == 1 and 7 or now.wday - 1

time = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}

date = {
day = now.day,
month = now.month,
year = now.year,
}

grp.write('1/0/6', time, dt.time) -- time value
grp.write('1/0/7', date, dt.date) -- date value
log(time)
grp.write('0/4/11', false)
------------

This is a standard script. It works on other logic machines. The problem is only on the current one.

The last line is the address to check that there is a connection and the values are being sent (the values are being sent).

I tried deleting objects in the logic engine and recreating them from ets. Tried to create objects completely manually - nothing helps.

(16.01.2023, 09:19)spoty2008 Wrote:
(16.01.2023, 09:14)Daniel Wrote: Please explain the steps how do you perform the write.
now = os.date('*t')
wday = now.wday == 1 and 7 or now.wday - 1
time = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
date = {
day = now.day,
month = now.month,
year = now.year,
}
grp.write('1/0/6', time, dt.time) -- time value
grp.write('1/0/7', date, dt.date) -- date value
log(time)
grp.write('0/4/11', false)
------------
This is a standard script. It works on other logic machines. The problem is only on the current one.
The last line is the address to check that there is a connection and the values are being sent (the values are being sent).
I tried deleting objects in the logic engine and recreating them from ets. Tried to create objects completely manually - nothing helps.

The values of the object in the logic machine change, but nothing is written to the bus. I watch group monitoring from ets.


RE: Date / Time Object - admin - 16.01.2023

1/0/7 has incorrect data type, it should be 11. 3 byte date. The date value is written, but it's interpreted as 16:01:23 instead of 16.01.2023.


RE: Date / Time Object - spoty2008 - 16.01.2023

(16.01.2023, 09:32)admin Wrote: 1/0/7 has incorrect data type, it should be 11. 3 byte date. The date value is written, but it's interpreted as 16:01:23 instead of 16.01.2023.

This I experimented with other objects. Initially, the addresses were with the correct data types. 1/0/2 and 1/0/3


RE: Date / Time Object - Daniel - 16.01.2023

I tried this and all is working fine for me. What script do you use for this, Any errors?


RE: Date / Time Object - spoty2008 - 16.01.2023

(16.01.2023, 09:57)Daniel Wrote: I tried this and all is working fine for me.  What script do you use for this, Any errors?

The whole problem is just that. On others (I tried on 3 different logic machines in different places) with the same firmware and older ones - everything works well.
The script that I use came above the post. In the same script, I turn off the lighting at 0/4/11 and the shutdown works.

No errors.


RE: Date / Time Object - Daniel - 16.01.2023

Send me your backup to PM, we can't reproduce this.


RE: Date / Time Object - spoty2008 - 16.01.2023

(16.01.2023, 10:41)Daniel Wrote: Send me your backup to PM, we can't reproduce this.

i  send to you


RE: Date / Time Object - Daniel - 16.01.2023

It is all working fine. Maybe it is some ETS issue? Do you have another LM? You could connect it via TP and see if objects are updated.


RE: Date / Time Object - spoty2008 - 16.01.2023

(16.01.2023, 12:28)Daniel Wrote: It is all working fine.  Maybe it is some ETS issue? Do you have another LM? You could connect it via TP and see if objects are updated.

I have several remote objects. I checked on other logic machines. The same script (usually I use it when there is nowhere to take time, except for the Internet), there is no such problem anywhere. After trying all possible options, I started looking on the forum for a similar problem and was surprised when I found it right away, like tom77.

What else can you recommend? Downgrade is not possible. There is nothing on the LM, except for 1 script.


RE: Date / Time Object - Daniel - 16.01.2023

I checked your backup and it works fine on latest fw. The issue must be elsewhere but I have no idea where.


RE: Date / Time Object - spoty2008 - 19.01.2023

(16.01.2023, 14:54)Daniel Wrote: I checked your backup and it works fine on latest fw. The issue must be elsewhere but I have no idea where.

Hi. The problem was communication.