Backend on Pi 4

jfabernathy
Senior
Posts: 118
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Mon Aug 26, 2019 9:32 am

MikeB2013 wrote:
Mon Aug 26, 2019 8:42 am
kojaked wrote:
Sat Jul 13, 2019 5:20 am
Dare I ask: how well does commercial flagging work on a Pi 4?
I don't use commercial flagging, I just use 30 second forward skip to run past commercials.

Mike
The same for me. I have found that with my OTA recordings, it misses more than it gets right. So I adjusted the forward skip to 60 seconds and the backward to 15. Most commercials over here are 4-5 minutes these days.

Jim A

jfabernathy
Senior
Posts: 118
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sun Oct 27, 2019 2:15 pm

MikeB2013 wrote:
Tue Jul 23, 2019 7:46 pm
pgbennett wrote:
Sat Jul 06, 2019 12:38 pm
mythtv-light does include the backend so it should not be necessary to build from source. Also the wiki guides should give all the info on setting up the database etc. although that info is in the "Build from source" article https://www.mythtv.org/wiki/Build_from_ ... tall_tasks
Attached is a helper script (by product of my testing mythtv-light builds) to automate the setting up of mythbackend after mythtv-light (30 or 31pre) has been installed on a Pi 4 or a Pi 3.
In brief, see comments in script for more details:

Installs mariadb-server, creates mythconverg database (password is mythtv) and sets daily backup
Installs mythweb
Installs xmltv
setup mythtv user for running mythbackend
setup various directories on the file system for recordings etc. uses /srv/mythtv/
setup logging with rotation
setup systemd mythtv-backend.service file
setup remote access

The script is provided "as is" but any comments are welcome.
Just download the file,unzip, make sure it is executable and run it.

Edit : 20190822 attachment updated to fix issue with daily backup on mythtv-light 30

Mike
in studying the script I see that only the systemd service for mythtv backend was setup and not any override for waiting on the network to be up so the network tuners like HDHR don't fail.

Did you use a networked tuner? and if you did, how did you delay mythtv-backend until the network was up. I tried the raspi-config boot options of wait for networking, but that screws up a lot of other things.

MikeB2013
Senior
Posts: 429
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Backend on Pi 4

Post by MikeB2013 » Sun Oct 27, 2019 2:38 pm

Jim,

I use a SiliconDust HD HomeRun CONNECT QUATRO (Model: HDHR5-4DT, Firmware: 20190621) all I have done is set "Wait for network" using Raspberry Pi Configuration screen (or sudo raspi-config in a terminal session).

My Raspberry Pi's get ip address from my router.

This works for me and I do not see any other problems.

Can you expand on "screws up a lot of other things" ?


Mike

jfabernathy
Senior
Posts: 118
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sun Oct 27, 2019 2:51 pm

MikeB2013 wrote:
Sun Oct 27, 2019 2:38 pm
Jim,

I use a SiliconDust HD HomeRun CONNECT QUATRO (Model: HDHR5-4DT, Firmware: 20190621) all I have done is set "Wait for network" using Raspberry Pi Configuration screen (or sudo raspi-config in a terminal session).

My Raspberry Pi's get ip address from my router.

This works for me and I do not see any other problems.

Can you expand on "screws up a lot of other things" ?


Mike
When I first turn on "Wait for network" everything seems to work as you'd expect, but if I add fstab mount statements for NFS drives, then next boot I don't have a menu at the top of the screen. It may appear and go away or it may only show a white bar. if I have a terminal shortcut on the desktop I can get in and check stuff, but I've never been about to fix it. So for now I do not wait for network and do a systemctl stop/start mythtv-backend. I had this menu issue even back on Stretch on a RPi3B+ when I'd use NFS mounts in fstab. I have a lot of my scripts and stuff on a NAS so once of my first moves is to get access to that.

MikeB2013
Senior
Posts: 429
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Backend on Pi 4

Post by MikeB2013 » Sun Oct 27, 2019 5:07 pm

I don't use nfs much, but I have run a quick test from my pi4 using nfs to a test server (xubuntu 18.04 LTS).

Without Wait for network enabled my share does not get connected
It is fine if Wait for network is enabled, but this could be luck as I have done nothing extra with systemd to ensure nfs is connected.
In all cases no problems with display.

My Pi4 fstab is as follows:

Code: Select all

pi@pi4-20191006:~ $ cat /etc/fstab 
proc            /proc           proc    defaults          0       0
PARTUUID=83c29599-01  /boot           vfat    defaults          0       2
#PARTUUID=83c29599-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
/dev/disk/by-uuid/c69b1b51-2c53-4ce3-a099-5aa3d077b702    /   ext4    defaults,noatime  0       1
192.168.0.22:/mnt/sharedfolder   /srv/sharedfolder   nfs   defaults,timeo=900,retrans=5,_netdev	0 0

Code: Select all

pi@pi4-20191006:~ $ df -h
Filesystem                      Size  Used Avail Use% Mounted on
/dev/root                       220G   99G  110G  48% /
devtmpfs                        1.7G     0  1.7G   0% /dev
tmpfs                           1.8G     0  1.8G   0% /dev/shm
tmpfs                           1.8G  8.9M  1.8G   1% /run
tmpfs                           5.0M  4.0K  5.0M   1% /run/lock
tmpfs                           1.8G     0  1.8G   0% /sys/fs/cgroup
/dev/mmcblk0p1                  253M   53M  200M  21% /boot
192.168.0.22:/mnt/sharedfolder  234G   66G  157G  30% /srv/sharedfolder
tmpfs                           367M     0  367M   0% /run/user/1000
Details of your Pi4 fstab will help.
Also details of any other configuration changes you have made e.g. dhcpcd.conf (used instead of Network Manager on Raspbian)

Mike

jfabernathy
Senior
Posts: 118
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sun Oct 27, 2019 7:23 pm

so I tested this by:
1. putting my NFS entries in /etc/fstab
2. running sudo raspi-config and turning on "wait for Network" in the boot options.
3. rebooting

So once the system has rebooted I have all my NFS drives mounted, mythtv-backend is running with all HDHR tuners working correctly. So you would think; success. However, no menu. I have a screenshot of the desktop with no menu, but can't get it posted here. It's on Google drive at:

https://drive.google.com/file/d/1UsFmDg ... sp=sharing


pi@rpimythtv:~ $ cat /etc/fstab
proc /proc proc defaults 0 0
PARTUUID=d9b3f436-01 /boot vfat defaults 0 2
#PARTUUID=d9b3f436-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
/dev/disk/by-uuid/35a5f7b0-d17c-4d8f-9c0f-bb8bb3bdd20b / ext4 defaults,noatime 0 1
#
#192.168.0.250:/mnt/md0/recorded-tv1 /mnt/recorded-tv1 nfs defaults 0 0
#192.168.0.250:/mnt/md1/recorded-tv2 /mnt/recorded-tv2 nfs defaults 0 0
#
192.168.0.250:/mnt/md0/samba/anonymous /mnt/anonymous nfs defaults 0 0
192.168.0.250:/mnt/md1/samba/public /mnt/public nfs defaults 0 0


pi@rpimythtv:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 916G 206G 664G 24% /
devtmpfs 1.7G 0 1.7G 0% /dev
tmpfs 1.8G 8.0M 1.8G 1% /dev/shm
tmpfs 1.8G 8.9M 1.8G 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 53M 200M 21% /boot
192.168.0.250:/mnt/md0/samba/anonymous 1.8T 257G 1.5T 15% /mnt/anonymous
192.168.0.250:/mnt/md1/samba/public 1.8T 273G 1.5T 16% /mnt/public
tmpfs 367M 0 367M 0% /run/user/1000
pi@rpimythtv:~ $

jfabernathy
Senior
Posts: 118
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Mon Oct 28, 2019 12:48 pm

I think I have a workaround. I went back to basics and installed raspbian buster lite and then added the XFCE desktop stuff per the guide on the RPI forum: https://www.raspberrypi.org/forums/view ... p?t=133691

I was able to move the rootfs to the SATA SSD on USB3 and do my normal mythtv -light FE/BE install. I turned on "wait for network" in raspi-config. I also added NFS drive mounts to fstab. No issues with the network not being up before NFS or mythtv-backend needed it. At this point I have not added tv_grab_zz_sdjson_sqlight grabber in for EPG and I have not restored my old database and files in but I'm hoping that has no impact on this problem.

Jim A

Post Reply