Thanks Chris.
I assume 'make' aspect may only be relevant to Linux so probably a blind alley I went down and not the cause of my issues.
If I'm in a Command Window and type fhem.pl I get:
Usage:
as server: fhem configfile
as client: fhem [host:]port cmd
I tried appending what I believe are the example config files (e.g.)
fhem.pl sample_pgm2
but it returns the same úsage' response. I guess I'm not providing an appropriate config file but can't see what I'm doing wrong! The sample_pgm2 when I look at it in notepad does seem to contain what is suggested goes into a config.
Any tips appreciated.
Cheers
Kev
Kev,
I think the configfile needs an extension .cfg (at least that's the example in the HOWTO and that's what I did which seemed to work).
Chris
Thabks Chris,
I just tried that but no joy:-(
The HOWTO seems to say:
Install & start fhem with the command:
make install-pgm2
perl /usr/local/bin/fhem.pl /var/log/fhem/fhem.cfg
As you didn't use any make command, I'm still trying (in CMD window)
>fhem.pl sample_pgm2.cfg
both files are in the same directory. I also tried fhem.cfg but same result.
I'm clearly missing something but at a loss!
From your earlier post the error message seems to be saying that fhem couldn't find the config file. I take this to mean that at least the perl interpreter is running and the fhem code starts, so you can't be too far away.
I also started with the pgm2 sample as a minmal config, I must admit that I renamed it fhem.cfg so that I didn't destroy the sample with my edits.
I have both the fhem.pl and and the .cfg file in the same directory. In a command window I navigate to the directory they are both in - so the window looks like:
C:\Program Files\fhem-4.8>
then I enter the command fhem.pl fhem.cfg
Fhem then creates a log file in the local directory and either exits or keeps running - either should provide some info on what's going on.
If you get the basic program running I'd be happy to share my config file.
Chris
Thanks Chris.
Yes, Perl interpreter seems to be running OK (I checked with some simple test programmes). I effectively have the same set up as you described except in root
c:\fhem4.8>
I redownloaded FHEM and re-extracted, then copied sample_pgm2 to the same directory and renamed it fhem.cfg but I still get the same Úsage'message. Indeed, I get this whatever I type after fhem.pl, so it looks like its not even looking for any parameters after the intial command?
Only other thing I can see may be an issue is my system associates any .cfg as a MS OUtlook Config file, though from command prompt I would not have thought this would make any difference.
If you only run fhem.pl with no following config file, do you see thé same úsage:' message that I see?
Cant be that far away from it working!
For reference my fhem.pl file is 53,642 bytes and fhem.cfg is 553 bytes (though by sounds of it you have added to your config).
Kev
Kev,
running out of ideas here now - I've also the same outlook file association and it doesn't stop things running.
I tried the fhem.pl command without a parameter and indeed I do see the same usage message.
I've attached a simple config file that at least loads for me - I renamed the extension to get it into the message, just rename fhem.cfg and see what happens.
Chris
Thanks Chris, I just did save as fhem.cfg into same directory as fhem.pl and tried again..... but no joy :-(
If you get the same message I do without a config file, that at least gives me a clue and suggests my FHEM is running (to a degree) but for some reason mine doesn't seem to be even looking at the config file.
I'm also out of ideas now but thanks very much for trying to help me.
Anyone else any idea why FHEM may not be looking at a cfg file?
Cheers
Kev
Thanks Martyn, success! Well significant progress. I renamed from directory fhem-4.8 to just fhem and ran with full paths as you suggested. FYI I'm running under Vista.
I've an error mesaage (can't open .2010-01.log: Permission denied at c:\fhem\fhem.pl line 1372, <$fh> line 5 ) but at least its now reading the config file.
I'l take a look tonight (as supposed to be working on day job now!) as I recall expecting to have to change a ref to a serial port on windows, perhaps this is that error.
Anyway, major step forward so many thanks Chris and Martyn.
Cheers
Kev