{"id":21,"date":"2015-09-02T02:58:04","date_gmt":"2015-09-02T02:58:04","guid":{"rendered":"http:\/\/thinkleet.net\/?p=21"},"modified":"2015-09-02T03:11:30","modified_gmt":"2015-09-02T03:11:30","slug":"the-things-i-do-to-myself","status":"publish","type":"post","link":"https:\/\/thinkleet.net\/index.php\/2015\/09\/02\/the-things-i-do-to-myself\/","title":{"rendered":"The things I do to myself."},"content":{"rendered":"<p>A bit of background first&#8230;. When it comes to media center software,\u00a0 this isn&#8217;t my first rodeo.\u00a0 I&#8217;ve been running Kodi since it was XBox Media Center.\u00a0\u00a0 If I search hard enough, I&#8217;m sure I can find an XBox laying around here somewhere that still has the software on it.\u00a0 That being said, I should have known better than to embark on my current quest to run a MythTV backend on a Raspberry Pi B+, on the same network as a OpenElec install on the same network.\u00a0 First up, I need a TV tuner.\u00a0\u00a0 Some research later, but not very good research, I settled on this <a href=\"http:\/\/amzn.to\/1Fir3ZJ\">little guy<\/a>.\u00a0\u00a0 This turned into an epic fail since I live in the US, and the DVB-T adapter, while having many useful features as a Software Defined Radio dongle (SDR), it is completely useless as a TV tuner stateside.\u00a0 Oh well, it will eventually be turned into a ADS-B receiver to track flights overhead, or maybe grabbing <a href=\"http:\/\/bit.ly\/1UlxJ5y\">NOAA weather satellite <\/a>images out of thin air.\u00a0\u00a0 At 11$, it&#8217;s not too big a mistake, and it has other applications.\u00a0\u00a0\u00a0<!--more--><\/p>\n<p>Back to the current quest.\u00a0\u00a0 I was looking for a ATSC usb tuner, not DVB-T, this is an important distinction for those of us stateside, as just as we can&#8217;t adopt the SI units for measuring, we also have to broadcast our TV on different standards. \u00a0\u00a0 The most cost effective one I could find was <a href=\"http:\/\/amzn.to\/1hSKeoa\">this guy<\/a>.\u00a0 It seems to be well supported with <a href=\"http:\/\/www.linuxtv.org\/wiki\/index.php\/KWorld_UB435-Q_USB_ATSC_TV_Stick\">Linux kernel 3.16 or newer, <\/a>since this ended up being the v3 revision. \u00a0 OK, so the dongle arrives, and life once again gets in the way.\u00a0 Although I normally complain about being underemployed, in this case, I was not. \u00a0 Approximately 2 months after my toy arrived, I was finally able to set it up on an Acer Aspire Revo AR1600 running Mythbuntu.\u00a0 This install went very smoothly. \u00a0 OpenElec on a Raspberry Pi B+ was connected perfectly with the Revo running Mythbuntu, and everyone was happy.\u00a0 For the first time in 3 years, there was live TV in the house. \u00a0 Of course, good enough rarely is,\u00a0 and a new Raspberry PI was released, the Raspberry Pi 2.<\/p>\n<p>So now, it was time to acquire a few of these boards.\u00a0 In the interim, I managed to turn a few friends on to the beauty of the Pi to make a dumb TV smart, that&#8217;s a story for another time.\u00a0\u00a0\u00a0 After paying a premium price through Amazon to get the boards without a couple week lead time, because I have to be an early adopter, my Pi2 arrived, and it was time to let the hacking begin.<\/p>\n<p>The Revo, meanwhile, had been re-purposed to a family member who was running on a Pentium 4 box, with Windows Vista.\u00a0 A quick install of Xubuntu and it worked perfectly for their needs.\u00a0\u00a0 Now I have a Raspberry Pi B+ and a pair of Raspberry Pi 2&#8217;s.\u00a0 The Pi 2&#8217;s get setup with OpenElec, since the increase in processing power makes for a much better input experience.\u00a0 The Pi B+, this is where my MythTV install is going.\u00a0 Planet Gary had an excellent post about getting <a href=\"http:\/\/planetgary.blogspot.com\/2014\/01\/mythtv-backend-running-on-raspberry-pi.html\">MythTV running on a PI B<\/a>, and since the hardware is essentially the same as the B+, it should have been an easy configuration.<\/p>\n<p>Everything was going swimmingly, following along from installing the base operating system, grabbing the repo, setting it locally, and configuring MythTV over a painfully slow ssh session forwarding xwindows.\u00a0 It was here that the problems started to arise.\u00a0\u00a0 The ATSC adapter I received was not recognized as easily as I was lead to believe, necessitating updates to the kernel on the most recent Raspbian distro as well as a manual install of the video 4 Linux utilities (v4l).\u00a0 This was done first through an ssh session to the Pi B+ and issuing sudo apt-get update &amp;&amp; sudo apt-get upgrade -y &amp;&amp; sudo apt-get dist-upgrade\u00a0 &amp;&amp; sudo apt-get install v4l* -y .\u00a0 After upgrading, installing v4l and rebooting, MythTV finally loaded and could see and use my dongle.<\/p>\n<p>The next issue came up when I tried to connect to the mySQL database that had been created when the MythTV packages were installed as a dependency.\u00a0\u00a0 MythTV was trying to use a username and password that should have been created by MythTV.\u00a0 Somehow it wasn&#8217;t.\u00a0 So being incredibly naive, I modified the config.xml file to reflect the root username and password for mySQL (yes I&#8217;m aware this is a big no-no but it was midnight, and I just wanted things to work).\u00a0 This also failed.\u00a0 Now, it&#8217;s creeping up on 1 a.m. and it&#8217;s still not working.\u00a0\u00a0 Login to mysql as root, create a new user and password with a new database like so: \u00a0 GRANT ALL ON mythconverg.* TO \u2018mythtv\u2019@&#8217;ipaddressonnetwork\u2019 IDENTIFIED BY &#8216;mythtv&#8217;;<\/p>\n<p>Next change the corresponding lines in config.xml to match the user and database we just created.\u00a0 Success.\u00a0\u00a0\u00a0 Now we channel scan with the mythtv-setup app through the ssh xwindows forwarding.\u00a0\u00a0\u00a0 Everything on the backend is setup, now the frontend in OpenElec wants to enable all of the PVR clients.\u00a0 Rebooting doesn&#8217;t help, can&#8217;t disable any of the unneeded ones, and the PI2 is randomly rebooting due to all the extra addons being enabled and not connecting.<\/p>\n<p>A winning suggestion came from an old xbmc thread.\u00a0\u00a0 Rename ~\/.kodi\/userdata\/Database\/Addons16.db and reboot the OpenElec machine.\u00a0 Addons get reinstalled and now can be disabled.<\/p>\n<p>One last problem to overcome, after enabling Live TV in OpenElec, and configuring the MythTV addon to match our IP address, channel list displays in OpenElec but cannot tune.\u00a0 Back to the mythtv-setup app, and remove the ipv6 address under general.\u00a0 Everything now works.<\/p>\n<p>The very important lesson from all of this: while there is great satisfaction to be had in hacking together a solution, sometimes the correct answer is buy a TiVo.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A bit of background first&#8230;. When it comes to media center software,\u00a0 this isn&#8217;t my first rodeo.\u00a0 I&#8217;ve been running Kodi since it was XBox Media Center.\u00a0\u00a0 If I search hard enough, I&#8217;m sure I can find an XBox laying around here somewhere that still has the software on it.\u00a0 That being said, I should &hellip; <a href=\"https:\/\/thinkleet.net\/index.php\/2015\/09\/02\/the-things-i-do-to-myself\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The things I do to myself.<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5,4],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-media-center","category-mythtv","category-sdr"],"_links":{"self":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":4,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}