Daemon Not Working

Hi,

I'm trying to use oemgateway to retrieve some values automatically when plugged, but for the moment I couldn't manage to configure the daemon. I've followed the steps in Jerome GitHub but nothing happened. Anyone can give me a clue?

Here are the values I use in oemgateway.sh in init.d:

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="OpenEnergyMonitor Gateway"
NAME=oemgateway
# Enter your installation path here
DAEMON=/home/pi/oem_gateway/$NAME
# Specify command line arguments here
#DAEMON_ARGS="--logfile /var/log/oemgateway/oemgateway.log"
DAEMON_ARGS="--logfile /var/log/oemgateway/oemgateway.log --config-file /home/p$
DAEMONUSER="pi"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

 

 

Thanks in advance! 

pb66's picture

Re: Daemon Not Working

Shouldn't it  be /etc/init.d/oemgateway    without the ".sh" ?

Alternatively you could use emonHub, it's the successor to oem gateway and can be installed (including daemon) using one line 

git clone https://github.com/emonhub/dev-emonhub.git ~/dev-emonhub && ~/dev-emonhub/install

Paul

tilik's picture

Re: Daemon Not Working

I tried both... anyway Cheers,

I'll give it a try!

 

Happy new year!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.