AndroidHDMI for Channels (ah4c): A virtual channel tuner using HDMI Encoder(s) + streaming stick(s)

I have a few other things in the hopper ahead of you, but I'll get it done reasonably soon. :slight_smile:

Hello I am trying to setup ah4c but I am stuck in the part where it says: "Specify the name of your LAN's domain", how do i obtain this? Thanks in advance!

This is for hostname resolution, and is especially useful for anyone using Tailscale. But it's a worthwhile data point to know. localdomain or local are common, but other names are used.

It's also not uncommon for routers to have a local domain name setting that's unused leading to the need to use LAN IP addresses for everything.

Here's what ChatGPT says on the subject:

To determine your LAN's domain name, you can try one of the following methods:

1. Check Your Router's Configuration

  1. Log in to your router's web interface:
  • Open a web browser and enter your router's IP address (commonly 192.168.1.1 or 192.168.0.1).
  • Log in with your admin username and password.
  1. Look for the "LAN Settings" or "DHCP Settings" section.
  2. Find the "Domain Name" or "Local Domain" field. This will display your LAN's domain name, if configured.

2. Use the hostname Command (Linux/MacOS)

Run the following command in a terminal:

hostname -d

If your LAN domain is set, it will display the domain name.

Alternatively, check the fully qualified domain name (FQDN):

hostname -f

This will display the hostname along with the domain name.

3. Use the ipconfig Command (Windows)

  1. Open Command Prompt.
  2. Run:
ipconfig /all
  1. Look for the "Primary DNS Suffix" or "Connection-specific DNS Suffix" under your active network adapter.

4. Check the resolv.conf File (Linux)

  1. Open a terminal.
  2. View the contents of the /etc/resolv.conf file:
cat /etc/resolv.conf
  1. Look for the search or domain entries, which indicate the LAN domain name.

5. Use the nslookup Command

  1. Run the following command:
nslookup <your LAN IP address>
  1. The result may include the LAN domain name associated with the IP address.

6. Contact Your Network Administrator

If the above steps do not yield results, contact your network administrator or Internet Service Provider (ISP) to inquire about your LAN's domain name, especially if it was manually configured.

Thanks So if im not using tailscale i dont need it?

Did you follow the above steps to determine if your LAN is configured with a local domain name? If it is, you want to know what it is, and assign it to the DOMAIN value.

1 Like

it says attlocal.net when i type in the command into the terminal, is that what i have to assign to the domain value? or is it local and then that? or something else?

I'd say that's your local domain name, so go ahead and use it for the DOMAIN value.

thanks

Doing some experimenting with Pluto TV app on my Onn 4k's...
Wondering if anyone knows the deeplink format for tuning a Pluto channel with ah4c using the Pluto App?

Why would you want to do that if you can watch the channels directly?

That should usually be the way to go when using ah4c: use it for channels you want that are DRM'd.

3 reasons...

  1. For entertainment to see if I can make it work. :slightly_smiling_face:

  2. Give my tuners/encoders something to do when they are sitting there bored with nothing to do. :wink:

  3. Main Reason...I have adapted my ah4c scripts so that it leaves the tuners streaming the previous channels for a predetermined amount of time after I stop/change the channel so I can hit previous channel or channel surf much quicker. This is currently working pretty fast for my current ah4c channels and hdhomerun channels so figured I would throw the pluto stuff in there also to speed them up also.
    My other thought was to look and see about some sort of "tv proxy" sort of docker that could act as the pluto tuner that I could leave streaming for a set time before stopping. Not sure I know how to do that though.

@ChannelSam

I've built you a new :appletv.test3 container which adds support for running a user script in the background at container start. The new env var is USER_SCRIPT, which is run as ./$USER_SCRIPT &, so if you want to place your custom script in the scripts directory, you should set the env var to USER_SCRIPT=scripts/channelsam.sh -- or whatever name you choose.

I ran into an unexpected issue in building the container, as the version of Golang required was upgraded in the repository. The build completed without error, once I upgraded, but since I don't have a test environment that matches yours, I couldn't try it.

Let me know how it goes. I'd like to upgrade the base :appletv tagged container if this works as expected.

@bnhf

I tried 3 times and got same error every time.

  • bnhf/ah4c:appletv.test3 with no other changes

  • bnhf/ah4c:appletv.test3 with - USER_SCRIPT=${USER_SCRIPT} and USER_SCRIPT=scripts/atv/spectrum/tuners_stop_delay.sh (where it was located)

  • bnhf/ah4c:appletv.test3 with - USER_SCRIPT=${USER_SCRIPT} and USER_SCRIPT=scripts/tuners_stop_delay.sh (same scripts level directory holding atv, firetv)

Got the same error every time as shown below. I also remember that we had to use an older version of pyatv on the previous build because the newer build didn't work. They have updated it 2 more times since then most recently in November. Didn't know if you wanted to try the newest version of that also...

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

./docker-start-pyatv.sh: line 159: syntax error near unexpected token `||'

./docker-start-pyatv.sh: line 159: `  [[ -n $USER_SCRIPT ]] && ./"$USER_SCRIPT" & || echo "No user-defined custom script to run"'

I think I have it now. Pull :appletv.test3 again, and give it a shot...

@bnhf
Worked perfect! :slightly_smiling_face:
Verified the startup script is running and tested multiple times and everything is starting and stopping as it should.

What version of pyatv did you build with?

Also I know it has been in there... but I notice in the startup logs for each tuner:
[ENV] CMD1
[ENV] TEECMD1
What are these used for in case I want to use them in the future for something. They are not listed in the docker-compose and I could not find a direct reference to them when I do a topic/site search.

Same as :appletv.test2. We can try the newest version of pyatv if you think there's a compelling reason to do so.

Check out this post, and a non-contiguous set of follow-on posts on the subject:

@bnhf

I just reread through the 3 releases pyatv has done in the last year and don't see anything that is needed right now...Especially since everything is currently working with 0.14.5 Quimby (2023-12-24). I vote to leave it as is and post to :appletv when your ready.

Thank you for the link to the CMDx information.
I don't know how I didn't see that with my topic/site search. I didn't see any mention of the TEECMD env variable mentioned in those posts.

That's for support of non-network encoder devices like Magewell or Hauppauge cards.

when inputting the local domain do i have to put the words "local domain" and then the name or just the name

The first post in this thread has the ah4c Docker Compose you need to copy and paste into Portainer-Stacks. Then in the Environment variables section, in Advanced mode, you can copy and paste the example env vars. Then one-by-one, change the sample values to ones that are correct for you.

In the case of the DOMAIN value, you'd be changing it to:

DOMAIN=attlocal.net