Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use setSystemTime ? #115

Open
Phil1pp opened this issue Oct 13, 2022 · 8 comments
Open

How to use setSystemTime ? #115

Phil1pp opened this issue Oct 13, 2022 · 8 comments

Comments

@Phil1pp
Copy link

Phil1pp commented Oct 13, 2022

Could someone please explain how to use setSystemTime.
What do I have to set in vito.xml and vcontrold.xml to be able to set the time by a vclient command?

@Phil1pp Phil1pp changed the title How to use setSystemTime How to use setSystemTime ? Oct 13, 2022
@spoilerhead
Copy link

I use this line every 24h and it works fine:

vclient -h 127.0.0.1:3002 setSystemTime

@riegelbrau
Copy link

Without any parameter, like the actual OS system time?

@Phil1pp
Copy link
Author

Phil1pp commented Jan 27, 2023

This command returns:

SRV ERR: >FRAMER: ERROR address 08FFFFFFE0 code 4
Error in recv, terminating
Error executing setSystemTime
setSystemTime:
server error

Can you please tell me what you have set in vito.xml and vcontrol.xml for SystemTime

@spoilerhead
Copy link

spoilerhead commented Jan 27, 2023

in vcontrol.xml i have

 <unit name="SystemTime">
       <abbrev>TI</abbrev>
       <type>systime</type>
     </unit>

in vito.xml

 <command name="setSystemTime" protocmd="setaddr">
       <addr>088E</addr>
       <len>8</len>
       <unit>TI</unit>
       <description>Setze Systemzeit</description>
       <device ID="2053"/>
     </command>

the result is:

vclient -h 127.0.0.1:3002 setSystemTime
setSystemTime:
OK

edit:
this is identical to what's in here

@Phil1pp
Copy link
Author

Phil1pp commented Jan 27, 2023

It seems you have a different heating system.
On my Vitocal 200-S heatpump (W01C) the dateTime is on addr 08E0.
getSystemTime on this address works just fine, but setSystemTime fails.

@spoilerhead
Copy link

I got a vitodens 200 Ho2b (so it seems to more advanced vitotronic?)

@riegelbrau
Copy link

I have a Viessmann VScotHO1 with ID=20CB and the samples above did not work in my environment with version 0.98.10-24-ge424ec4 of both vcontrold and vclient. I checked the XML variants I have and compared them with the one from this repo as mentioned above without any new ideas. Then I did some internet searches again (as many times before) and found this entry:
openv/openv#185 (comment) containing the very relevant information, that since v0.98.8 setSystemTime needs the system time as parameter using ISO format:
grafik
Unfortunately the sample of shell command date +%FT%H:%M:%S%z did not work for me. I checked the --help of the Linux date command and tested several format variants. The parameter -Iseconds led to the same format as the output of getSystemTime shows. I created a little shell script vclient_setSystemTime.sh for testing and eventually I could setSystemTime successfully, see the script output below:
grafik

Works for me!!

You'll find my script here:
vclient_setSystemTime.sh.txt

Btw: This command that I found in this entry of the FHEM forum: https://forum.fhem.de/index.php/topic,94809.msg883333.html?PHPSESSID=46hkruj0s8fq4l6egs6s7vp1g3#msg883333 switches unit off before and unit on after setSystemTime: $VITODIR/vclient -h localhost:3002 -c "unit off,setSystemTime $JETZT,unit on". This led to an unpredictable and so wrong SystemTime setting in my environment.

Regards Christoph

@spoilerhead
Copy link

Ah I wasn't up to date, still running 0.98.10-176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants