Mailing List Archive

How to choose between 2 backends ?
Hi,

I have frontend and backend on a desktop pc.

But I would also like to record tv on a laptop. This laptop has no screen and
the graphic card is probably to small to watch tv. I installed frontend on it
to test it, but now I want to use only the frontend on the desktop pc.

So sometimes, I want to record tv on the laptop, but watch recorded episodes
on the desktop machine. Copy or move the recordings to the desktop pc should
be easy by ftp or an external usb hard disk.

How to organize that ? How to tell frontend on the desktop pc which backend I
want to use ?

In the setup, I saw the option "This server is the Master backend" I can
untick.

Of course I can change IP address in mythtv-setup, but there is certainly a
more elegant solution. Is it possible to create profiles for this purpose ?

Bye

Klaus


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
Hoi Klaus,

Wednesday, April 4, 2018, 9:51:24 PM, you wrote:

> Hi,

> I have frontend and backend on a desktop pc.

> But I would also like to record tv on a laptop. This laptop has no screen and
> the graphic card is probably to small to watch tv. I installed frontend on it
> to test it, but now I want to use only the frontend on the desktop pc.

> So sometimes, I want to record tv on the laptop, but watch recorded episodes
> on the desktop machine. Copy or move the recordings to the desktop pc should
> be easy by ftp or an external usb hard disk.

> How to organize that ? How to tell frontend on the desktop pc which backend I
> want to use ?

> In the setup, I saw the option "This server is the Master backend" I can
> untick.

> Of course I can change IP address in mythtv-setup, but there is certainly a
> more elegant solution. Is it possible to create profiles for this purpose ?

> Bye

> Klaus

Why do you want to record on that laptop and first of all does it have
a tuner? If not you cannot!

You can have one or more slave backends next to the master. They will
share the same database, which normally, but not necessarily, will be
located on the master. Any backend MUST have at least one tuner
configured or it might start reacting weirdly. You can not pre select
which backend is used for a recording other then by hard selecting a
tuner in the recording rule.
To record on the slave, the database must be running and I think so
does the master.
You must set your database to be accessible over the network, the same
as when you want to run multiple frontends. How to do that you can
find in the wiki.

It is also possible to have to separate mythnetworks, for instance to
test a newer version, however that will need a lot of fiddling or you
must run them on a different IP subnet.


Tot mails,
Hika mailto:hikavdh@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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
On Wed, 04 Apr 2018 21:51:24 +0200, you wrote:

>Hi,
>
>I have frontend and backend on a desktop pc.
>
>But I would also like to record tv on a laptop. This laptop has no screen and
>the graphic card is probably to small to watch tv. I installed frontend on it
>to test it, but now I want to use only the frontend on the desktop pc.
>
>So sometimes, I want to record tv on the laptop, but watch recorded episodes
>on the desktop machine. Copy or move the recordings to the desktop pc should
>be easy by ftp or an external usb hard disk.
>
>How to organize that ? How to tell frontend on the desktop pc which backend I
>want to use ?
>
>In the setup, I saw the option "This server is the Master backend" I can
>untick.
>
>Of course I can change IP address in mythtv-setup, but there is certainly a
>more elegant solution. Is it possible to create profiles for this purpose ?
>
>Bye
>
>Klaus

To get a frontend to connect to multiple different backends, the
easiest way I have found is just to have multiple config.xml files in
the /home/<username>/.mythtv directory, one for each backend. When
you want to switch backends, you copy the config.xml.backendx file to
config.xml and start mythfrontend again. If there are only two
backends, I would write a little script to do the swap. Whenever it
was run, it would copy the other config.xml file and tell you which
backend it was now configured for. To make it easier to used, you
could make the script run from an icon on the desktop, or from a
desktop menu. Or you could make the script run mythfrontend for you,
and each time it runs it, ask first which backend to connect to.

To copy recordings from one backend to another, you can use
mythexport/mythimport. This uses a web page to select the recordings
to be exported and where to put them, and creates a copy of the
recording file and a .sql file with the recording's database entries
in it. You have mythexport store the files where the other backend
can see them, or you move them to the other backend (eg using a USB
drive), and run mythimport on that directory. Mythimport reads the
.sql files and imports the data into the database and moves the
recording files into one of the recording directories where that
backend can see them. I wrote the current version of mythimport:

http://www.jsw.gen.nz/mythtv/mythimport.html
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
Le jeudi 5 avril 2018, 17:08:42 CEST Stephen Worthington a ?crit :
> On Wed, 04 Apr 2018 21:51:24 +0200, you wrote:
> >Hi,
> >
> >I have frontend and backend on a desktop pc.
> >
> >But I would also like to record tv on a laptop. This laptop has no screen
> >and the graphic card is probably to small to watch tv. I installed
> >frontend on it to test it, but now I want to use only the frontend on the
> >desktop pc.
> >
> >So sometimes, I want to record tv on the laptop, but watch recorded
> >episodes on the desktop machine. Copy or move the recordings to the
> >desktop pc should be easy by ftp or an external usb hard disk.
> >
> >How to organize that ? How to tell frontend on the desktop pc which backend
> >I want to use ?
> >
> >In the setup, I saw the option "This server is the Master backend" I can
> >untick.
> >
> >Of course I can change IP address in mythtv-setup, but there is certainly a
> >more elegant solution. Is it possible to create profiles for this purpose ?
> >
> >Bye
> >
> >Klaus
>
> To get a frontend to connect to multiple different backends, the
> easiest way I have found is just to have multiple config.xml files in
> the /home/<username>/.mythtv directory, one for each backend. When
> you want to switch backends, you copy the config.xml.backendx file to
> config.xml and start mythfrontend again. If there are only two
> backends, I would write a little script to do the swap. Whenever it
> was run, it would copy the other config.xml file and tell you which
> backend it was now configured for. To make it easier to used, you
> could make the script run from an icon on the desktop, or from a
> desktop menu. Or you could make the script run mythfrontend for you,
> and each time it runs it, ask first which backend to connect to.
>
> To copy recordings from one backend to another, you can use
> mythexport/mythimport. This uses a web page to select the recordings
> to be exported and where to put them, and creates a copy of the
> recording file and a .sql file with the recording's database entries
> in it. You have mythexport store the files where the other backend
> can see them, or you move them to the other backend (eg using a USB
> drive), and run mythimport on that directory. Mythimport reads the
> .sql files and imports the data into the database and moves the
> recording files into one of the recording directories where that
> backend can see them. I wrote the current version of mythimport:
>
> http://www.jsw.gen.nz/mythtv/mythimport.html


Hi Stephen,

Thank you.

I shall study that, it will take me some time.

Bye

Klaus


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
Hi Klaus!

Some interesting inquiries you have been making!
> I have frontend and backend on a desktop pc.
>
> But I would also like to record tv on a laptop. This laptop has no screen and
> the graphic card is probably to small to watch tv. I installed frontend on it
> to test it, but now I want to use only the frontend on the desktop pc.
>
> So sometimes, I want to record tv on the laptop, but watch recorded episodes
> on the desktop machine. Copy or move the recordings to the desktop pc should
> be easy by ftp or an external usb hard disk.
>
> How to organize that ? How to tell frontend on the desktop pc which backend I
> want to use ?
>
> In the setup, I saw the option "This server is the Master backend" I can
> untick.
>
> Of course I can change IP address in mythtv-setup, but there is certainly a
> more elegant solution. Is it possible to create profiles for this purpose ?


I have done something similar here with two Backends, though I'll admit
not an 'elegant' solution.  I have two Backends because of 'pixellation 
issues' -- really due to reception problems but that's a different
issue.  Having a Frontend switch from viewing one Backend to the other
appears to be more complicated than simply updating the configuration
file to the alternate BE's IP and password: it appears when the
configuration is changed the FE's audio and video configuration is reset
to default, in other words instead of using a High Quality nVidia video
setting it is changed back to the default generic setting.  Same for the
audio.  The Theme preference also is resent to Terra (default).

What I did, which LIS isn't elegant, is use a Raspberry Pi B as my
second Frontend.  The primary FE is a desktop with the output to HDMI1
of the television.  The secondary FE is an RPi, configured to the other
Backend, and whose output goes to HDMI2 of the TV.   (Told you it wasn't
elegant!)

Now what I found is the RPi B and MythTV don't play nice all the time
with the WiFi here at the house: some video and audio stuttering.  The
good news is no problems with a wired connection. The computers around
here are all hardwired so simply pulled an old 10/100 switch from the
storage box to 'split' the Ethernet to the two Frontends.  Works fine!

Admittedly not quite what you had in mind but given for consideration as
a different way to  accomplish the end.  I have no idea if the new PRi
3+ has sufficient 'oomph' to work with MythTV; LIS my RPI 3 is right on
the verge, so hopefully....
Re: How to choose between 2 backends ? [ In reply to ]
> On Apr 5, 2018, at 12:53 PM, Barry Martin <barry3martin@gmail.com> wrote:
>
>
> Hi Klaus!
>
> Some interesting inquiries you have been making!
>> I have frontend and backend on a desktop pc.
>>
>> But I would also like to record tv on a laptop. This laptop has no screen and
>> the graphic card is probably to small to watch tv. I installed frontend on it
>> to test it, but now I want to use only the frontend on the desktop pc.
>>
>> So sometimes, I want to record tv on the laptop, but watch recorded episodes
>> on the desktop machine. Copy or move the recordings to the desktop pc should
>> be easy by ftp or an external usb hard disk.
>>
>> How to organize that ? How to tell frontend on the desktop pc which backend I
>> want to use ?
>>
>> In the setup, I saw the option "This server is the Master backend" I can
>> untick.
>>
>> Of course I can change IP address in mythtv-setup, but there is certainly a
>> more elegant solution. Is it possible to create profiles for this purpose ?
>
>
> I have done something similar here with two Backends, though I'll admit not an 'elegant' solution. I have two Backends because of 'pixellation issues' -- really due to reception problems but that's a different issue. Having a Frontend switch from viewing one Backend to the other appears to be more complicated than simply updating the configuration file to the alternate BE's IP and password: it appears when the configuration is changed the FE's audio and video configuration is reset to default, in other words instead of using a High Quality nVidia video setting it is changed back to the default generic setting. Same for the audio. The Theme preference also is resent to Terra (default).
>
> What I did, which LIS isn't elegant, is use a Raspberry Pi B as my second Frontend. The primary FE is a desktop with the output to HDMI1 of the television. The secondary FE is an RPi, configured to the other Backend, and whose output goes to HDMI2 of the TV. (Told you it wasn't elegant!)
>
> Now what I found is the RPi B and MythTV don't play nice all the time with the WiFi here at the house: some video and audio stuttering. The good news is no problems with a wired connection. The computers around here are all hardwired so simply pulled an old 10/100 switch from the storage box to 'split' the Ethernet to the two Frontends. Works fine!
>
> Admittedly not quite what you had in mind but given for consideration as a different way to accomplish the end. I have no idea if the new PRi 3+ has sufficient 'oomph' to work with MythTV; LIS my RPI 3 is right on the verge, so hopefully....
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org <https://forum.mythtv.org/>

Barry—

The anomalies you list in switching should not be happening if your network and host names are setup correctly. I’m going to assume you have two databases (one on each backend), and each of those databases will hold settings for each of your frontend machines. If you switch from one backend to another and you’ve never configured that frontend on that backend, then yes, all the settings will default because backend 2 has never seen backend 1. However, if you configure all of your settings also on backend 2 the same as backend 1, changing backends should be transparent as long as the settings are identical.

It would be no different than setting up a completely new frontend to replace an existing frontend, giving it the same host name and IP address as the replaced frontend, and connecting it to a single backend. The new frontend gets all the settings just like its predecessor had. I’ve done this numerous times over the years, and that’s exactly what I have found.

Hope this helps you make your system a tad bit more elegant, because it’s myth… and it should be. :)

Best,
Mike
Re: How to choose between 2 backends ? [ In reply to ]
Hi Mike!

> The anomalies you list in switching should not be happening if your network and host names are setup correctly. I?m going to assume you have two databases (one on each backend), and each of those databases will hold settings for each of your frontend machines. If you switch from one backend to another and you?ve never configured that frontend on that backend, then yes, all the settings will default because backend 2 has never seen backend 1. However, if you configure all of your settings also on backend 2 the same as backend 1, changing backends should be transparent as long as the settings are identical.

Agree: if I configure the two backend to have the same name and password
I should be able to switch between the two with a change of the address
to select the Backend.  Not so sure can be done all that easily by the
'non Geek' people here.  Good tip for Klaus however.


> Hope this helps you make your system a tad bit more elegant, because it?s myth? and it should be. :)

No disagreement!  Some of the 'sloppiness' here has been done on purpose
to make it easier to troubleshoot.  The original intention was for the
new Backend to replace the aging existing Backend when discovered there
are intermittent issues with reception (OTA).  As this is Klaus's thread
I don't want to insert my problems.  ...Hope that's not sounding rude or
unappreciative.

Barry
Re: How to choose between 2 backends ? [ In reply to ]
On 4/6/18 11:56 AM, Barry Martin wrote:
>
>
> Hi Mike!
>
>> The anomalies you list in switching should not be happening if your network and host names are setup correctly. I?m going to assume you have two databases (one on each backend), and each of those databases will hold settings for each of your frontend machines. If you switch from one backend to another and you?ve never configured that frontend on that backend, then yes, all the settings will default because backend 2 has never seen backend 1. However, if you configure all of your settings also on backend 2 the same as backend 1, changing backends should be transparent as long as the settings are identical.
>
> Agree: if I configure the two backend to have the same name and
> password I should be able to switch between the two with a change of
> the address to select the Backend.  Not so sure can be done all that
> easily by the 'non Geek' people here.  Good tip for Klaus however.
>
>
>> Hope this helps you make your system a tad bit more elegant, because it?s myth? and it should be. :)
>
> No disagreement!  Some of the 'sloppiness' here has been done on
> purpose to make it easier to troubleshoot.  The original intention 
> was for the new Backend to replace the aging existing Backend when
> discovered there are intermittent issues with reception (OTA).  As
> this is Klaus's thread I don't want to insert my problems.  ...Hope
> that's not sounding rude or unappreciative.
I frequently run MythFrontend on my laptop, and need a way to switch
between using it with my home server and a local backend and DB, on the
laptop. I currently end up having to manually edit the config.xml file
each time I want to do this. One of these days I'll write that slick
GUI-based backend picker I've been meaning to write :-).

It would definitely help if there was an argument to mythfrontend that
could override the IP address setting in config.xml, though.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
> On Apr 6, 2018, at 12:52 PM, Dan Wilga <mythtv-users2@dwilga-linux1.amherst.edu> wrote:
>
> On 4/6/18 11:56 AM, Barry Martin wrote:
>>
>>
>> Hi Mike!
>>
>>> The anomalies you list in switching should not be happening if your network and host names are setup correctly. I?m going to assume you have two databases (one on each backend), and each of those databases will hold settings for each of your frontend machines. If you switch from one backend to another and you?ve never configured that frontend on that backend, then yes, all the settings will default because backend 2 has never seen backend 1. However, if you configure all of your settings also on backend 2 the same as backend 1, changing backends should be transparent as long as the settings are identical.
>>
>> Agree: if I configure the two backend to have the same name and password I should be able to switch between the two with a change of the address to select the Backend. Not so sure can be done all that easily by the 'non Geek' people here. Good tip for Klaus however.
>>
>>
>>> Hope this helps you make your system a tad bit more elegant, because it?s myth? and it should be. :)
>>
>> No disagreement! Some of the 'sloppiness' here has been done on purpose to make it easier to troubleshoot. The original intention was for the new Backend to replace the aging existing Backend when discovered there are intermittent issues with reception (OTA). As this is Klaus's thread I don't want to insert my problems. ...Hope that's not sounding rude or unappreciative.
> I frequently run MythFrontend on my laptop, and need a way to switch between using it with my home server and a local backend and DB, on the laptop. I currently end up having to manually edit the config.xml file each time I want to do this. One of these days I'll write that slick GUI-based backend picker I've been meaning to write :-).

You mean, a simple linux bash script or windows batch file to ask you if you want option 1 or option 2, being the local backend or remote, respectively, then copy the corresponding configxxx.xml file (i.e. configremote.xml) to config.xml, and launch mythfrontend? ;)

You could call it something like “mflauncher” or whatever floats your boat, and call it from a terminal session, or create a shortcut to it on your desktop if you want clickety-click.

:)

Cheers,
Mike


>
> It would definitely help if there was an argument to mythfrontend that could override the IP address setting in config.xml, though.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
On 04/06/2018 12:52 PM, Dan Wilga wrote:
> I frequently run MythFrontend on my laptop, and need a way to switch between using it with my home server and a local backend and DB, on the
> laptop. I currently end up having to manually edit the config.xml file each time I want to do this. One of these days I'll write that slick
> GUI-based backend picker I've been meaning to write :-).
>
> It would definitely help if there was an argument to mythfrontend that could override the IP address setting in config.xml, though.

Not a GUI, but:

At least in Ubuntu 17.10, this adds a desktop icon and just clicking on it
selects my production backend. Right clicking allows selection of
two other backends. The scripts (Exec= lines) simply set MYTHCONFDIR to unique
directories that have the proper config.xml settings.

$ cat ~/.local/share/applications/mythfrontend.desktop

[Desktop Entry]
Type=Application
Categories=GNOME;
Version=1.0
Name=MythTV Frontend
GenericName=Personal Video Recorder
Comment=MythTV Frontend Starters
Icon=/usr/share/app-install/icons/mythtv.png
TryExec=start_frontend_using_production_backend
Exec=start_frontend_using_production_backend
Terminal=false
Encoding=UTF-8
StartupNotify=true
StartupWMClass=mythtv-frontend
Actions=Test;Office

[Desktop Action Test]
Name=Test Frontend
Exec=start_frontend_using_test_backend

[Desktop Action Office]
Name=Office Frontend
Exec=start_frontend_using_office_backend

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
On 06/04/18 20:18, Bill Meek wrote:
> On 04/06/2018 12:52 PM, Dan Wilga wrote:
>> I frequently run MythFrontend on my laptop, and need a way to switch
>> between using it with my home server and a local backend and DB, on
>> the laptop. I currently end up having to manually edit the config.xml
>> file each time I want to do this. One of these days I'll write that
>> slick GUI-based backend picker I've been meaning to write :-).
>>
>> It would definitely help if there was an argument to mythfrontend that
>> could override the IP address setting in config.xml, though.
>
> Not a GUI, but:
>
> At least in Ubuntu 17.10, this adds a desktop icon and just clicking on it
> selects my production backend. Right clicking allows selection of
> two other backends. The scripts (Exec= lines) simply set MYTHCONFDIR to
> unique
> directories that have the proper config.xml settings.
>

MYTHCONFDIR is definitely what you want.

I use it to keep the configurations for my development (master)
and production (fixes/29) systems separate.


Regards
Stuart

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to choose between 2 backends ? [ In reply to ]
Le lundi 9 avril 2018, 12:57:09 CEST Stuart Auchterlonie a ?crit :
> On 06/04/18 20:18, Bill Meek wrote:
> > On 04/06/2018 12:52 PM, Dan Wilga wrote:
> >> I frequently run MythFrontend on my laptop, and need a way to switch
> >> between using it with my home server and a local backend and DB, on
> >> the laptop. I currently end up having to manually edit the config.xml
> >> file each time I want to do this. One of these days I'll write that
> >> slick GUI-based backend picker I've been meaning to write :-).
> >>
> >> It would definitely help if there was an argument to mythfrontend that
> >> could override the IP address setting in config.xml, though.
> >
> > Not a GUI, but:
> >
> > At least in Ubuntu 17.10, this adds a desktop icon and just clicking on it
> > selects my production backend. Right clicking allows selection of
> > two other backends. The scripts (Exec= lines) simply set MYTHCONFDIR to
> > unique
> > directories that have the proper config.xml settings.
>
> MYTHCONFDIR is definitely what you want.
>
> I use it to keep the configurations for my development (master)
> and production (fixes/29) systems separate.
>
>
> Regards
> Stuart


Thanks, I shall have a look at that

Klaus


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org