[mythtv-users] ***Spam*** digital radio alarm clock

Hika van den Hoven hikavdh at gmail.com
Tue Jul 27 16:38:53 UTC 2021


>> Hoi Stephen,

> I previously never really looked at the hdhomerun_config tool. It says
> it wants an <id> and that didn't work in my network configuration,
> except on the backend. However <id> means either the id or the ip
> address! So I now can in my scripts substitute the old ivtv and v4l2
> tools. Will take some time to figure it all out as those script are
> old.

> Thanks Stephen for kicking my thinking on the right track!

I found the following script (I guess I at some time got it from
silicon dust) and it works perfect!
I put the ip address in hard and the tuning parameters you can get
through:

hdhomerun_config <ip-address> scan <tuner>

I have been looking at it on and of for years, but never really
serious. There was no urgency. I never thought it would be so simple.
Just substituting id with ip! :-)

hdhr4.sh
#!/bin/bash

id=${id:-"192.168.223.20"}
tuner=${tuner:-3}
channel=$1
program=$2
output=${3:-"-"}

usage () {
    echo "$0 <channel> <program> [output]"
    echo "ENV variables: id, tuner"
    exit 1
}


if test -z "$channel"; then usage; fi
if test -z "$program"; then usage; fi


echo command: $0 $*

hdhomerun_config $id set /tuner${tuner}/channel $channel
hdhomerun_config $id set /tuner${tuner}/program $program

if test "$output" = "-"; then
    hdhomerun_config $id save /tuner${tuner} - | mplayer -fs -
else
    echo Saving $channel-$program to $output
    hdhomerun_config $id save /tuner${tuner} ${output}
fi

exit 0


Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list