Originally posted by: <email address deleted>
I've got the strange phenomenon that my fhem.cfg gets rewrited
automatically and I´m not sure what is causing it. The bad thing is
that references to include files are removed (and the contents is
added to fhem.cfg) and all comments are deleted from fhem.cfg.
I suspect it's got something to do with the iPhone app Fhemmobile but
I'm not sure. I'm using v1.8.
For normal editing of fhem.cfg I use an external editor.
Does someone recognize this behaviour?
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Hello Alex,
think that the following lines in fhem.cfg will help:
define autocreate autocreate
attr autocreate autosave 0
Jörg
On 27 Dez., 10:29, Alex van Hoboken
wrote:
> I've got the strange phenomenon that my fhem.cfg gets rewrited
> automatically and I´m not sure what is causing it. The bad thing is
> that references to include files are removed (and the contents is
> added to fhem.cfg) and all comments are deleted from fhem.cfg.
> I suspect it's got something to do with the iPhone app Fhemmobile but
> I'm not sure. I'm using v1.8.
> For normal editing of fhem.cfg I use an external editor.
>
> Does someone recognize this behaviour?
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Hello,
I have the same effect here (fhem 5.2 fb7390), after installation the
fhem.cfg is neatly commented, after some time all comments are gone.
Also items I commented out, because I don't need them rightaway are
removed as well.
I don't think disabling autosave is the solution, as autosave keeps
you from loosing content, if you forget to save manually.
Reminds me of someone who removes the wheels from his car to avoid
flat tires.
ignisquivir
On Dec 27 2011, 11:44 am, JoWiemann
wrote:
> Hello Alex,
>
> think that the following lines infhem.cfgwill help:
>
> define autocreate autocreate
> attr autocreate autosave 0
>
> Jörg
>
> On 27 Dez., 10:29, Alex van Hoboken wrote:
>
>
>
>
>
>
>
> > I've got the strange phenomenon that myfhem.cfggets rewrited
> > automatically and I´m not sure what is causing it. The bad thing is
> > that references to include files are removed (and the contents is
> > added tofhem.cfg) and all comments are deleted fromfhem.cfg.
> > I suspect it's got something to do with the iPhone app Fhemmobile but
> > I'm not sure. I'm using v1.8.
> > For normal editing offhem.cfgI use an external editor.
>
> > Does someone recognize this behaviour?
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
> I don't think disabling autosave is the solution, as autosave keeps
> you from loosing content, if you forget to save manually.
Working patches without too many side-effects are welcome :)
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Good hint ;-)
There must be a place, where fhem.cfg is stripped of all comment lines, so
if somebody (most likely Rudolf) could point to the modules/methods in
question, we could try and practise some perl here.
ignisquivir
-----Ursprüngliche Nachricht-----
Von: fhem-users@googlegroups.com [mailto:fhem-users@googlegroups.com] Im
Auftrag von Rudolf Koenig
Gesendet: Donnerstag, 5. Januar 2012 14:31
An: fhem-users@googlegroups.com
Betreff: [FHEM] Re: rewrite of fhem.cfg
> I don't think disabling autosave is the solution, as autosave keeps
> you from loosing content, if you forget to save manually.
Working patches without too many side-effects are welcome :)
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
There is an interesting effect with regard to rewriting the fhem.cfg
From the Web Frontend select "Edit files"
Select "fhem.cfg"
Add some comments right at the top.
Press "save fhem.cfg"
Open fhem.cfg in a text editor, the comments are there.
Press the "Save" button in the Web Interface.
Recheck "fhem.cfg" the comments are gone.
The same happens, when you type "save" and press enter.
Not sure whether "save" and "Save Button" are intended to achieve the same,
I think there are some controversial threads here.
Please advise.
ignisquivir
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
> Not sure whether "save" and "Save Button" are intended to achieve the same,
> I think there are some controversial threads here.
Save in the edit files section will save what you are editing.
The save button or typing save in the command window will call CommandSave(),
which is going through the internal data-structures, writing out "define" and
"attr" statements.
Since comments are not stored in the internal data structures, they are gone
whith save. You can store your comments in the comment attribute, if you want
to preserve them.
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
> The save button or typing save in the command window will call
CommandSave(), which is going through the internal data-structures, writing
out "define" and "attr" statements.
> Since comments are not stored in the internal data structures, they are
gone whith save. You can store your comments in the comment attribute, if
you want to preserve them.
Hmmm, I come closer to understand what's going on.
If I understand correctly, fhem pulls the configuration data out og fhem.cfg
on startup. From then on changes are made to the live system and only stored
in fhem.cfg if save is entered or the button pressed. In the process
fhem.cfg is simply rewritten without regard to it's actual contents.
I am not a good programmer, but this somehow looks like a problem to be
solved by diff and patch or so. Wouldn't it be possible to write out the
configuration data to a temp file, and patch the fhem.cfg from it ?
ignisquivir
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com