How to autostart telldusd daemon Arch Linux ARM?

Moderator: Telldus

Post Reply
daru
Posts: 5
Joined: Fri Mar 17, 2023 9:45 am

How to autostart telldusd daemon Arch Linux ARM?

Post by daru »

Have not figured this out yet. Tried to add it to daemons array in rc.conf but after reboot it aint running?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: How to autostart telldusd daemon Arch Linux ARM?

Post by micke.prag »

Maybe you need to write an init-script?
Micke Prag
Software
Telldus Technologies
daru
Posts: 5
Joined: Fri Mar 17, 2023 9:45 am

Re: How to autostart telldusd daemon Arch Linux ARM?

Post by daru »

Oh, OK. Starts up and all with code below. But get the:

Turning on device 2, Outdoor - TellStick not found

And /var/log/messages.log says:

Jul 3 19:37:58 darupi telldusd: telldusd daemon starting up
Jul 3 19:38:23 darupi telldusd: Trying to execute action, but no controller found. Rescanning USB ports


And lsusb:

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 1781:0c30 Multiple Vendors Telldus TellStick


Thing is that it works when starting "manually". Any ideas?

Btw, awesome product! :D

Code: Select all

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

DAEMON=telldusd
ARGS=

[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON

PID=$(get_pid $DAEMON)

case "$1" in
        start)
                stat_busy "Starting $DAEMON"
                [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null
                if [ $? = 0 ]; then
                        add_daemon $DAEMON
                        stat_done
                else
                        stat_fail
                        exit 1
                fi
                ;;
        stop)
                stat_busy "Stopping $DAEMON"
                [ -n "$PID" ] && kill $PID &>/dev/null
                if [ $? = 0 ]; then
                        rm_daemon $DAEMON
                        stat_done
                else
                        stat_fail
                        exit 1
                fi
                ;;
        restart)
                $0 stop
                sleep 1
                $0 start
                ;;
        *)
                echo "Usage: $0 {start|stop|restart}"
esac
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: How to autostart telldusd daemon Arch Linux ARM?

Post by micke.prag »

When a TellStick is not found it is usually someting with the permissions. Which user do you have in /etc/tellstick.conf?
Micke Prag
Software
Telldus Technologies
daru
Posts: 5
Joined: Fri Mar 17, 2023 9:45 am

Re: How to autostart telldusd daemon Arch Linux ARM?

Post by daru »

Yepp! Changed the group in tellstick udev rules from plugdev to users and now it works when starting up the daemon. Thanks for the support.
Post Reply