Page 1 of 1

Extra logfile with latest values.

Posted: Mon 13 Nov 2017 3:51 pm
by maddinthebrain
Hi,
I would like to use a logfile stored local which consists of the last values read from the station. I want to use my smarthome system. FHEM if some of you know it. FHEM can read this file regularly.
How must I setup Cumulus to write a realtimevalue.txt? Is it possible?

Greetings

Martin

Re: Extra logfile with latest values.

Posted: Mon 13 Nov 2017 4:20 pm
by steve
You can create a template file using web tags and get Cumulus to process it at each ‘realtime’ update (or at each ‘normal’ update if that’s appropriate. Normally intended for web uploading, but equally valid to process locally without uploading to a web site. More details in the wiki in the web site section.

Note that this method would not create a log as such, it would overwrite the file at each update, but it sounds like that’s what you want anyway.

Re: Extra logfile with latest values.

Posted: Mon 13 Nov 2017 7:31 pm
by maddinthebrain
steve wrote:Note that this method would not create a log as such, it would overwrite the file at each update, but it sounds like that’s what you want anyway.
This is exactly what I'm looking for. It sounds like the realtimeT.htm for the ftp upload. But I didn't get the point where to setup that in Cumulusmx. In extra web files? How to do this? A small example would help.

Thanks a lot

Martin

Re: Extra logfile with latest values.

Posted: Mon 13 Nov 2017 11:17 pm
by sfws
Not sure if you have seen this in the Wiki http://wiki.sandaysoft.com/a/Realtime.t ... ng_webtags
Others who use MX might chip in re your other questions.

Re: Extra logfile with latest values.

Posted: Tue 14 Nov 2017 8:29 am
by maddinthebrain
Ok, the thing with the webtags I understood. So I would place a file, let us call it "realtimeweathervalT.txt", just made of

Code: Select all

<#date format=dd/mm/yy> <#timehhmmss> <#temp> <#hum> <#dew> <#wspeed> <#wlatest> <#bearing> <#rrate> <#rfall> <#press> <#currentwdir> <#beaufortnumber> <#windunit> <#tempunitnodeg> <#pressunit> <#rainunit> <#windrun> <#presstrendval> <#rmonth> <#ryear> <#rfallY> <#intemp> <#inhum> <#wchill> <#temptrend> <#tempTH> <#TtempTH> <#tempTL> <#TtempTL> <#windTM> <#TwindTM> <#wgustTM> <#TwgustTM> <#pressTH> <#TpressTH> <#pressTL> <#TpressTL> <#version> <#build> <#wgust> <#heatindex> <#humidex> <#UV> <#ET> <#SolarRad> <#avgbearing> <#rhour> <#forecastnumber> <#isdaylight> <#SensorContactLost> <#wdir> <#cloudbasevalue> <#cloudbaseunit> <#apptemp> <#SunshineHours> <#CurrentSolarMax> <#IsSunny>
in the data folder of CumulusMX. The smarthome server FHEM can read out the "realtimeweatherval.txt" (without the T) right regularly? Now the only question is, how set this in CumulusMX or is this done automatically?

Martin

Re: Extra logfile with latest values.

Posted: Tue 14 Nov 2017 8:57 am
by steve
Create an entry in the extra web files, don’t select ftp and supply a local file for the output file.Pretty sure there is more on this in the wiki. The input and output files can go wherever you want, you have to supply the full paths anyway. Probably best not to interfere with the Cumulus data folder adding files it doesn’t recognise.

Re: Extra logfile with latest values.

Posted: Tue 14 Nov 2017 10:29 am
by maddinthebrain
Perfect, it works!!!! Thank your very much! Now I just have to setup the read by the FHEM server, but that's not a Cumulus issue :D .

Cheers Martin

Re: Extra logfile with latest values.

Posted: Tue 14 Nov 2017 6:24 pm
by maddinthebrain
But one question: mm in the webtag means the minute. But this in time, too, like above. Which is defined hh:mm:ss. That is wrong. How would be right?

Re: Extra logfile with latest values.

Posted: Tue 14 Nov 2017 6:45 pm
by steve
In MX (which uses .Net conversion strings) minute is mm and month is MM - see the full list in the first MX announcement post (I think the list is also in the wiki).

Re: Extra logfile with latest values.

Posted: Tue 14 Nov 2017 8:11 pm
by maddinthebrain
Great. I was thinking MM should be the solution, but wasn't sure.

Thanks a lot now it works perfectly.

Martin