zwiebert / tronferno-mcu

Control and program Fernotron receivers by micro-controller. (ESP32, 2011-2022)
GNU General Public License v3.0
21 stars 2 forks source link

Time settings in Tronferno #13

Closed 47441 closed 1 month ago

47441 commented 1 month ago

Hello Bert, I have been using this phenomenally good software for several years and control it via MQTT. Now the MQTT server is "defective" and I can't manage to repair it in the short term. That's why I came up with the idea of using the time control function in Tronferno MCU. But somehow that doesn't work.

I am using:

MCU type: esp32 Version: tronferno-mcu-0.11.4 Build Date: Jul--1-2021T13:08:24 Boot Count: 851 Error Mask: 0

My test settings: image

The time in Tronferno-MCU is 2 hours swifted to lokal time. If I change it, Tronferno-MCU will set it back. I sent the times to all actors and saved the times.

Can you help me fixing this problem?

Thanks a lot

Martin

zwiebert commented 1 month ago

Hello Martin,

its a pretty old version, but there should be a setting for a time-zone string (Zeitzone) which needs to be in Posix-Format.

For Germany it needs to be something like:

CET-1CEST-2,M3.5.0,M10.5.0

The current version has this under tab Zahnrad/Allgmein/Zeitzone(Posix).

When you program a timer, it also programs the real time clock in the receiver at the same time. So its important that the time and timezone of the Tronferno-MCU is correct when you transfer the timer data, because it would overwrite the time you sent earlier.

You can also fill the text-input ISO-Time with any local time you want, and sent it to all receivers. (This was meant for experiemental purposes, so I chan check if the timers are working correctly, by sending a wall time which is a few minutes before the timer so I can chack if the timer is working. But you could also sent the correct local time with this.)

But normally, the time is set by NTP via Internet, which is in GMT UTC, and then the timezone string must be configured correctly so you can get the correct local time.

HTH Bert

zwiebert commented 1 month ago

...after transmitting the timer data, the motor should move a bit, to indicate success. Otherwise the timer data was not successfully received. This is not different from the original 2411. If there was no reaction from the motor, then one has to repeat the transmission.

47441 commented 1 month ago

Hi Bert, the motor moved a bit, But I didn't fix it. I will first try to install the latest version and try a bit more. If I fix it, I will tell, if not also. ;)

47441 commented 1 month ago

I close for now and woll probably reopen again.

zwiebert commented 1 month ago

...good luck with upgrading via USB. To be safe, you could save the old flash content using esptool. I described how to, in the FAQ https://zwiebert.github.io/tronferno-mcu/starter_faq-de.html

I now flashed that version 0.11.4 here. Its true, that the time in the text field ISO time is UTC and not the local time. This was a bug, but its harmless. Its fixed in newer versions. But this time is only used when the checkbox to the left is checked and you are supposed to edit it anyway.

The important time is the one under Zahnrad/MCU/Sonstige/Datum-Uhrzeit, which should be displayed as local time, according to Zeitzone. This wall-time will be sent to the receiver.

I tried to set a timer using version 0.11.4, and it did work fine. I set it to 17:52 down when the time shown under Zahnrad/MCU/Sonstige/Datum-Uhrzeit was 17:50 and it went down at 17:52. If Random-Zufall is not checked, then I cannot think of a reason why it should not work. Could the receiver be defective?

btw: Its ok to write in German here.