Announcement

Collapse
No announcement yet.

[ANNOUNCE] TVH Plugin - TVHeadend integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [ANNOUNCE] TVH Plugin - TVHeadend integration

    Dozi and myself have been working on a side project for some time to integrate LMS with TVHeadend. It can get station listings from TVHeadend, so that it's easier to use your over the air tuners attached to TVHeadend to listen to live radio. We've decided it's time to let it out into the world.

    The TVH plugin should appear in your 3rd party plugins list and full instructions are available at


    This is our initial release and our first time creating an LMS plugin or developing with Perl so go easy on us if it's rough around the edges. We'll try and fix any issues and have plans on ways we can improve it going forwards but this is a side project so time is limited.
    Last edited by CodeChimp; 2021-04-12, 10:53.
    Andrew.

    Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
    Squeezebox Touch - Audio Engine A2
    Squeezebox Receiver - Audio Engine A2
    Squeezebox Radio
    Squeezebox Boom
    Squeezebox Controller

    Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
    iPeng

    #2
    An important update went out last night that fixes an issue with password saving on the settings screen. If you're using security on TVHeadend worth updating and checking the settings again.
    Andrew.

    Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
    Squeezebox Touch - Audio Engine A2
    Squeezebox Receiver - Audio Engine A2
    Squeezebox Radio
    Squeezebox Boom
    Squeezebox Controller

    Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
    iPeng

    Comment


      #3
      Hi Andrew,

      because of remove icon mapping in MaterialSkin, I became aware of your plugin - using TVHeadEnd and LMS since many years now I added my DVB-C Radio channels manually to favorites like:
      'http://Squeeze:[email protected]:9981/stream/channelid/128246553?profile=radio'

      Great job and infrastructure for your TVH Plugin. This makes it much more comfortable! Especially adding the station icon via favorites.opml was always a pain.

      Two minor things: The icon in Squeezer is missing and it seems your are using the channel number for tuning. In my case all radio channels were 0 and your plugin tuned everything to the same channel. Could you maybe use the id like Kodi is doing it? But for now I set all my channels to a specific channel number. If you like I can open a bug/request in GitHub ;-)

      By the way I'm using HTS Tvheadend in its Version 4.3-1857~g221c29b40 (together with LMS) on a RPi4. Means I've no transcoding via TVHeadEnd enabled - but my DVB-C provider feeds the stations in MPEG-2 audio. So for adding a "Stream Profile" I used: "Type Audio stream/ Audio type: MPEG-2 audio". Works perfect!

      Again - Thanks a lot for the great work!!!
      Michael
      LMS: 8.3.1 - 1667914563
      on RPi4/ Raspbian Buster 10
      points to MusicLibrary on QNAP TS212 (NFS)

      1x Duet - Cntrl-FW: 8.0.1-r16907/ Receiver-FW: 77
      2x SB Radio - FW: 8.0.1-r16907
      1x Squeezebox Boom - FW 57
      1x Transporter - FW: 87
      RPi 2B - pCP 8.0.1/ SqueezeLite v1.9.9-1391-pCP
      Softsqueeze 3.9.2 on Win 10 / Squeezeplay 8.0.1r1343 on Win 10
      Squeeze Player 1.3.21 on S22/Android 13.0.0

      Controller:
      Android Phone - Squeezer 2.3.0/ Material Skin 3.0.1

      Comment


        #4
        Originally posted by MichaelPr View Post
        Hi Andrew,

        because of remove icon mapping in MaterialSkin, I became aware of your plugin - using TVHeadEnd and LMS since many years now I added my DVB-C Radio channels manually to favorites like:
        'http://Squeeze:[email protected]:9981/stream/channelid/128246553?profile=radio'

        Great job and infrastructure for your TVH Plugin. This makes it much more comfortable! Especially adding the station icon via favorites.opml was always a pain.

        Two minor things: The icon in Squeezer is missing and it seems your are using the channel number for tuning. In my case all radio channels were 0 and your plugin tuned everything to the same channel. Could you maybe use the id like Kodi is doing it? But for now I set all my channels to a specific channel number. If you like I can open a bug/request in GitHub ;-)

        By the way I'm using HTS Tvheadend in its Version 4.3-1857~g221c29b40 (together with LMS) on a RPi4. Means I've no transcoding via TVHeadEnd enabled - but my DVB-C provider feeds the stations in MPEG-2 audio. So for adding a "Stream Profile" I used: "Type Audio stream/ Audio type: MPEG-2 audio". Works perfect!

        Again - Thanks a lot for the great work!!!
        Michael
        Thanks Michael for the compliment.

        I'll certainly look into using ID's but I think Kodi isn't using the API but the custom HTSP protocol so things are different. In the meantime just renumber the channels which I'm sure you've worked that out!
        I've raised an issue myself to track it here https://github.com/codechimp-org/lms-tvh/issues/22

        The Squeezer app not showing the icon is a weird one, I'm not doing anything odd with the icon. I'm not an Android user myself so haven't been able to test this. I've raised an issue with the Squeezer developer to see if I can get insight into anything I may need to change for the app.


        No promises on when I can fix these, it's a side project and my Perl skills are still not great but I'm up for a challenge.
        Andrew.

        Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
        Squeezebox Touch - Audio Engine A2
        Squeezebox Receiver - Audio Engine A2
        Squeezebox Radio
        Squeezebox Boom
        Squeezebox Controller

        Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
        iPeng

        Comment


          #5
          Originally posted by CodeChimp View Post
          Thanks Michael for the compliment.

          I'll certainly look into using ID's but I think Kodi isn't using the API but the custom HTSP protocol so things are different. In the meantime just renumber the channels which I'm sure you've worked that out!
          I've raised an issue myself to track it here https://github.com/codechimp-org/lms-tvh/issues/22

          The Squeezer app not showing the icon is a weird one, I'm not doing anything odd with the icon. I'm not an Android user myself so haven't been able to test this. I've raised an issue with the Squeezer developer to see if I can get insight into anything I may need to change for the app.


          No promises on when I can fix these, it's a side project and my Perl skills are still not great but I'm up for a challenge.
          Hi Andrew,

          Thanks a lot for opening the issue with the Squeezer Developer. You are right it's a weird one... because with SDT it's exactly the opposite. The icon works with squeezer but not with using Jive/Jivelite. I already had a small look into the plugin but my Perl skills are also not the best so code reading takes me some time. In Plugin.pm there is done something like:

          Code:
           my @menu = ({
                  text   => 'SuperDateTime',
                  'icon-id' => 'plugins/SuperDateTime/html/images/32.png',
                  id     => 'pluginSuperDateTime',
                  weight => 15,
          		window => { menuStyle => 'album' },
                  actions => {
                          go => {
                              player => 0,
                              cmd  => [ 'sdtTop' ],
          					params => {
          						menu => 'nowhere',
          					},
                          },
                  },
              });
          If you are up for an challenge and if you want to make Germans happy, I've something for you... ;-) I tried to use M. Hergers RadioParadise as a sample to setup an ARD Audiothek Plugpin - but because of time and my poor LMS/Perl-knowledge it stucks :-( Regarding to M. Herger the Audiothek API looks not bad.
          LMS: 8.3.1 - 1667914563
          on RPi4/ Raspbian Buster 10
          points to MusicLibrary on QNAP TS212 (NFS)

          1x Duet - Cntrl-FW: 8.0.1-r16907/ Receiver-FW: 77
          2x SB Radio - FW: 8.0.1-r16907
          1x Squeezebox Boom - FW 57
          1x Transporter - FW: 87
          RPi 2B - pCP 8.0.1/ SqueezeLite v1.9.9-1391-pCP
          Softsqueeze 3.9.2 on Win 10 / Squeezeplay 8.0.1r1343 on Win 10
          Squeeze Player 1.3.21 on S22/Android 13.0.0

          Controller:
          Android Phone - Squeezer 2.3.0/ Material Skin 3.0.1

          Comment


            #6
            Originally posted by MichaelPr View Post
            Hi Andrew,

            Thanks a lot for opening the issue with the Squeezer Developer. You are right it's a weird one... because with SDT it's exactly the opposite. The icon works with squeezer but not with using Jive/Jivelite. I already had a small look into the plugin but my Perl skills are also not the best so code reading takes me some time. In Plugin.pm there is done something like:

            Code:
             my @menu = ({
                    text   => 'SuperDateTime',
                    'icon-id' => 'plugins/SuperDateTime/html/images/32.png',
                    id     => 'pluginSuperDateTime',
                    weight => 15,
            		window => { menuStyle => 'album' },
                    actions => {
                            go => {
                                player => 0,
                                cmd  => [ 'sdtTop' ],
            					params => {
            						menu => 'nowhere',
            					},
                            },
                    },
                });
            If you are up for an challenge and if you want to make Germans happy, I've something for you... ;-) I tried to use M. Hergers RadioParadise as a sample to setup an ARD Audiothek Plugpin - but because of time and my poor LMS/Perl-knowledge it stucks :-( Regarding to M. Herger the Audiothek API looks not bad.
            That's interesting as it's a different method for how I set the icon, and may not work with the Material Skin alternative icon. On this issue I'll wait for some feedback from the Squeezer developer as I don't want to randomly change things I have no way of testing.

            I've spent a little time looking at the ID rather than number issue and think I may have a solution but have to do some testing.

            Sorry I don't have time to look at writing another plugin! This is one of a number of very different side projects I work on and my perl is very limited.
            Andrew.

            Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
            Squeezebox Touch - Audio Engine A2
            Squeezebox Receiver - Audio Engine A2
            Squeezebox Radio
            Squeezebox Boom
            Squeezebox Controller

            Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
            iPeng

            Comment


              #7
              Originally posted by CodeChimp View Post
              That's interesting as it's a different method for how I set the icon, and may not work with the Material Skin alternative icon.
              'icon-id' is fine with Material. To enable mapping all Material requires is:
              1. Your main icon is named x_svg.png
              2. You have a monochrome SVG icon named x.svg in the same folder as x_svg.png
              3. Use x_svg.png as the app's icon


              (Obviously 'x' can be any string). When Material sees an icon named xxxx_svg.png it assumes there is a corresponding xxxx.svg icon in the same path and will use that.
              Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

              Comment


                #8
                Originally posted by cpd73 View Post
                'icon-id' is fine with Material. To enable mapping all Material requires is:
                1. Your main icon is named x_svg.png
                2. You have a monochrome SVG icon named x.svg in the same folder as x_svg.png
                3. Use x_svg.png as the app's icon


                (Obviously 'x' can be any string). When Material sees an icon named xxxx_svg.png it assumes there is a corresponding xxxx.svg icon in the same path and will use that.
                Thanks, that's useful to know.
                If that is the issue with Squeezer I'll change the method I set the icon in my plugin.
                Andrew.

                Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
                Squeezebox Touch - Audio Engine A2
                Squeezebox Receiver - Audio Engine A2
                Squeezebox Radio
                Squeezebox Boom
                Squeezebox Controller

                Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
                iPeng

                Comment


                  #9
                  Originally posted by CodeChimp View Post
                  Thanks, that's useful to know.
                  If that is the issue with Squeezer I'll change the method I set the icon in my plugin.
                  I'm not really sure at this point whether this is the best or the right way to go. SBT only shows the icon on Squeezer - but not on Jive / Jivelite devices. Also, I haven't seen this method in other plugins that show the icon everywhere - like Radio Paradise. Maybe someone who has already written several plugins can say something about it.
                  LMS: 8.3.1 - 1667914563
                  on RPi4/ Raspbian Buster 10
                  points to MusicLibrary on QNAP TS212 (NFS)

                  1x Duet - Cntrl-FW: 8.0.1-r16907/ Receiver-FW: 77
                  2x SB Radio - FW: 8.0.1-r16907
                  1x Squeezebox Boom - FW 57
                  1x Transporter - FW: 87
                  RPi 2B - pCP 8.0.1/ SqueezeLite v1.9.9-1391-pCP
                  Softsqueeze 3.9.2 on Win 10 / Squeezeplay 8.0.1r1343 on Win 10
                  Squeeze Player 1.3.21 on S22/Android 13.0.0

                  Controller:
                  Android Phone - Squeezer 2.3.0/ Material Skin 3.0.1

                  Comment


                    #10
                    Originally posted by MichaelPr View Post
                    I'm not really sure at this point whether this is the best or the right way to go. SBT only shows the icon on Squeezer - but not on Jive / Jivelite devices. Also, I haven't seen this method in other plugins that show the icon everywhere - like Radio Paradise. Maybe someone who has already written several plugins can say something about it.
                    I agree, the majority of plugins don't set the icon like that so will wait for a response from the Squeezer dev.
                    Andrew.

                    Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
                    Squeezebox Touch - Audio Engine A2
                    Squeezebox Receiver - Audio Engine A2
                    Squeezebox Radio
                    Squeezebox Boom
                    Squeezebox Controller

                    Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
                    iPeng

                    Comment


                      #11
                      Originally posted by MichaelPr View Post
                      Hi Andrew,

                      because of remove icon mapping in MaterialSkin, I became aware of your plugin - using TVHeadEnd and LMS since many years now I added my DVB-C Radio channels manually to favorites like:
                      'http://Squeeze:[email protected]:9981/stream/channelid/128246553?profile=radio'

                      Great job and infrastructure for your TVH Plugin. This makes it much more comfortable! Especially adding the station icon via favorites.opml was always a pain.

                      Two minor things: The icon in Squeezer is missing and it seems your are using the channel number for tuning. In my case all radio channels were 0 and your plugin tuned everything to the same channel. Could you maybe use the id like Kodi is doing it? But for now I set all my channels to a specific channel number. If you like I can open a bug/request in GitHub ;-)

                      By the way I'm using HTS Tvheadend in its Version 4.3-1857~g221c29b40 (together with LMS) on a RPi4. Means I've no transcoding via TVHeadEnd enabled - but my DVB-C provider feeds the stations in MPEG-2 audio. So for adding a "Stream Profile" I used: "Type Audio stream/ Audio type: MPEG-2 audio". Works perfect!

                      Again - Thanks a lot for the great work!!!
                      Michael
                      I've managed to fix the issue of channel number rather than channel UUID being used, it is a far better way of handling this.
                      Version 1.2.29 released today has the change so you should get the update next time LMS updates your plugins.
                      Andrew.

                      Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
                      Squeezebox Touch - Audio Engine A2
                      Squeezebox Receiver - Audio Engine A2
                      Squeezebox Radio
                      Squeezebox Boom
                      Squeezebox Controller

                      Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
                      iPeng

                      Comment


                        #12
                        Originally posted by MichaelPr View Post
                        I'm not really sure at this point whether this is the best or the right way to go. SBT only shows the icon on Squeezer - but not on Jive / Jivelite devices. Also, I haven't seen this method in other plugins that show the icon everywhere - like Radio Paradise. Maybe someone who has already written several plugins can say something about it.
                        After a good amount of info from the Squeezer team I managed to get the icon working, it turned out I was using a very old plugin as my template and just about every modern plugin does it a different way.

                        Version 1.3.30 now fixes the icon and you can see it now working over at the Squeezer issue https://github.com/nikclayton/androi...zer/issues/681
                        Andrew.

                        Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
                        Squeezebox Touch - Audio Engine A2
                        Squeezebox Receiver - Audio Engine A2
                        Squeezebox Radio
                        Squeezebox Boom
                        Squeezebox Controller

                        Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
                        iPeng

                        Comment


                          #13
                          Originally posted by CodeChimp View Post
                          After a good amount of info from the Squeezer team I managed to get the icon working, it turned out I was using a very old plugin as my template and just about every modern plugin does it a different way.

                          Version 1.3.30 now fixes the icon and you can see it now working over at the Squeezer issue https://github.com/nikclayton/androi...zer/issues/681
                          Confirmed! Both fixes work. Great job! Thanks a lot
                          One minor thing - Did you forget to update the version string version="1.0.95" in repo.template.xml / repo.xml didn't you?
                          LMS: 8.3.1 - 1667914563
                          on RPi4/ Raspbian Buster 10
                          points to MusicLibrary on QNAP TS212 (NFS)

                          1x Duet - Cntrl-FW: 8.0.1-r16907/ Receiver-FW: 77
                          2x SB Radio - FW: 8.0.1-r16907
                          1x Squeezebox Boom - FW 57
                          1x Transporter - FW: 87
                          RPi 2B - pCP 8.0.1/ SqueezeLite v1.9.9-1391-pCP
                          Softsqueeze 3.9.2 on Win 10 / Squeezeplay 8.0.1r1343 on Win 10
                          Squeeze Player 1.3.21 on S22/Android 13.0.0

                          Controller:
                          Android Phone - Squeezer 2.3.0/ Material Skin 3.0.1

                          Comment


                            #14
                            Originally posted by MichaelPr View Post
                            Confirmed! Both fixes work. Great job! Thanks a lot
                            One minor thing - Did you forget to update the version string version="1.0.95" in repo.template.xml / repo.xml didn't you?
                            I did! It's a new packaging script I'm using that I'd forgotten to update the version attribute. Just pushed 1.3.31 otherwise it would annoy me.
                            Andrew.

                            Squeezebox Transporter Black/TransNav - Onkyo TX-NR1009 - Dali Zensor 5 fronts, Dali E12F Sub
                            Squeezebox Touch - Audio Engine A2
                            Squeezebox Receiver - Audio Engine A2
                            Squeezebox Radio
                            Squeezebox Boom
                            Squeezebox Controller

                            Server: Lenovo ThinkServer TS140 Ubuntu/Docker, LMS 7.9.3 (own docker image)
                            iPeng

                            Comment


                              #15
                              Originally posted by CodeChimp View Post
                              I did! It's a new packaging script I'm using that I'd forgotten to update the version attribute. Just pushed 1.3.31 otherwise it would annoy me.
                              Great! Now it works with the plugin manager and "Updated plugins available" :-)

                              Click image for larger version

Name:	Capture7.PNG
Views:	1
Size:	6.2 KB
ID:	1571665
                              LMS: 8.3.1 - 1667914563
                              on RPi4/ Raspbian Buster 10
                              points to MusicLibrary on QNAP TS212 (NFS)

                              1x Duet - Cntrl-FW: 8.0.1-r16907/ Receiver-FW: 77
                              2x SB Radio - FW: 8.0.1-r16907
                              1x Squeezebox Boom - FW 57
                              1x Transporter - FW: 87
                              RPi 2B - pCP 8.0.1/ SqueezeLite v1.9.9-1391-pCP
                              Softsqueeze 3.9.2 on Win 10 / Squeezeplay 8.0.1r1343 on Win 10
                              Squeeze Player 1.3.21 on S22/Android 13.0.0

                              Controller:
                              Android Phone - Squeezer 2.3.0/ Material Skin 3.0.1

                              Comment

                              Working...
                              X