Package Details: fhem 5.8-1

Git Clone URL: https://aur.archlinux.org/fhem.git (read-only)
Package Base: fhem
Description: A perl server for house automation
Upstream URL: http://fhem.de
Licenses: GPL
Submitter: cookies
Maintainer: Brinox
Last Packager: Brinox
Votes: 8
Popularity: 0.000402
First Submitted: 2013-03-24 19:31
Last Updated: 2017-02-23 11:59

Dependencies (9)

Required by (0)

Sources (5)

Latest Comments

Brinox commented on 2017-09-07 16:09

When you issue a `systemctl stop fhem.service` command, systemd will send a SIGTERM signal to the perl FHEM process, which will in turn shut the server down cleanly. Are you experiencing unclean shutdowns with this method? That should not happen normally.

mober commented on 2017-09-07 11:28

Add ExecStop to service for clean stop of fhem?

--- /usr/lib/systemd/system/fhem.service 2017-03-03 15:40:34.000000000 +0100
+++ /etc/systemd/system/fhem.service 2017-09-07 13:25:51.911719596 +0200
@@ -6,6 +6,7 @@
Type=forking
User=fhem
ExecStart=/usr/bin/fhem.pl /etc/fhem.cfg
+ExecStop=/usr/bin/fhem.pl 7072 shutdown

[Install]
WantedBy=multi-user.target

MadMe commented on 2017-01-12 21:59

Ok good to know! Thx!

Brinox commented on 2017-01-12 21:20

@MadMe Yes that is true, these are the files contained in the latest stable release version 5.7. They're not expected to be the current files found in the SVN.

If you really need the updates found in there, you have to update manually since I've got no plans to maintain a fhem-svn package yet ;)

MadMe commented on 2017-01-12 21:16

Its me again... after i ran into some problems with my HueBridge i found out that the scripts in /usr/share/fhem/FHEM are from 2015-11-15...
You can compare with the svn:
https://svn.fhem.de/trac/browser/trunk/fhem

For the update i changed the owner of /usr/share/fhem and /usr/bin/fhem.pl to fhem and gave it afterwards back to root...

MadMe commented on 2017-01-11 19:55

Thanks Brinox! You are great! :)

Brinox commented on 2017-01-09 19:01

***EDIT***:
I've created a small wiki page for fhem.
***/EDIT***

Hi MadMe,

regarding the updates: You shouldn't update via fhem if there's a package manager, that does that for you. If you update only via yaourt or pacaur for example, everything's fine.

All the stuff laying in /usr/share/fhem is static content and shouldn't be changed at runtime. The user fhem still has access to use it.

All files that are being modified at runtime by the server shall be placed in /var/lib/fhem, this is also the home directory of the fhem user.

To use this directory layout, please configure fhem in respect to that:

attr global logfile /var/lib/fhem/fhem-%Y-%m.log
attr global modpath /usr/share/fhem
attr global statefile /var/lib/fhem/fhem.save

[...]

define Logfile FileLog /var/lib/fhem/fhem-%Y-%m.log fakelog

define eventTypes eventTypes /var/lib/fhem/eventTypes.txt


You can relate to the example config supplied by the package. This split directory layout shall enhance security, because all the perl modules and static files cannot be altered, if there was an attack on the fhem server process that is executed as non-root.

If you want to edit the configuration file via the web interface, just change the ownership of /etc/fhem.cfg to the fhem user.

MadMe commented on 2017-01-08 22:15

Hello Brinox,
thanks for updating the package...
But i'm really confused. I couldn't use my Fhem for a while(long story)
and updated a while ago... Nothing works anymore (for me)
Maybe it would be helpfull to know what you did. And maybe how to use it and install it korrectly.
I originally had the hole FHEM stuff in /opt/fhem
Now i found all the stuff in /usr/share/fhem. Owned by root so update in Fhem wont work anymore... exept you run FHEM a root. :-/
When starting FHEM with perl /usr/bin/fhem.pl /etc/fhem.cfg it crashed...
first with the message could not write the log... makes sense. in /opt/fhem is no log folder... after that it tells me that it can't find a module named RTypes.pm. I found it in /usr/share/fhem/FHEM/RTypes.pm
So FHEM/perl did not find the files...
the moving of fhem.cfg to /etc/fhem.cfg isn't gracefull... if you run fhem as "fhem" and not as root it could not write a thing...

Brinox commented on 2016-08-16 12:40

I took over the package, updated it to v5.7 and overhauled the package setup completely. Please let me know, if something doesn't work.

Most importantly, the configuration is now found under /etc/fhem.cfg.

tchelovek commented on 2015-08-12 13:57

There needs to be a user fhem, otherwise fhem will fail to run.
Either integrate creation in package or else issue a note on completion of install.

#useradd -d /opt/fhem -g users -G wheel fhem
#chown –R fhem /opt/fhem

Issuing systemctl stop fhem.service will halt fhem, so status and cfg changes may get lost.

To avoid this, add "ExecStop=/usr/bin/perl fhem.pl 7072 shutdown"
to /usr/lib/system/system/fhem.service beneath [Service]

All comments