Getting device icons to work with Airfoil source

Posted on
Fri Sep 16, 2022 10:16 am
Different Computers offline
User avatar
Posts: 2581
Joined: Jan 02, 2016
Location: East Coast

Getting device icons to work with Airfoil source

I've messed about with the control page device control icons "iTunesStatus_large+.png" et al, and I can't get them to follow Airfoil's device states. I've tried using "Source status is playing (True or false) and added "iTunesStatus_large+true.png" and "iTunesStatus_large+false.png" but that doesn't work. I've also tried using AirFoil's "Current Source Status" for the icon state and that doesn't work either.

How do you make this work on your control pages?

Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana. UnifiAP

Posted on
Mon Sep 19, 2022 10:38 am
jay (support) offline
Site Admin
User avatar
Posts: 18277
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Getting device icons to work with Airfoil source

It works when you select the Current Source Status. However, the Airfoil API doesn't provide the play status of the source, so the only way to get it is to specify an iTunes device (in your Airfoil device instance's config) from which Airfoil will get the play status. Since the iTunes plugin no longer works, then the play state will never get updated, so all you will ever see is the grayed out play button (which is what shows when the status is 'unavailable'.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Sep 19, 2022 12:56 pm
Different Computers offline
User avatar
Posts: 2581
Joined: Jan 02, 2016
Location: East Coast

Re: Getting device icons to work with Airfoil source

Ah well. thanks Jay.

Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana. UnifiAP

Posted on
Mon Mar 20, 2023 5:55 pm
Different Computers offline
User avatar
Posts: 2581
Joined: Jan 02, 2016
Location: East Coast

Re: Getting device icons to work with Airfoil source

Revisiting this after removing AirFoil from the mix (because for some reason I can't get AirFoil to be reliable on my network, but AirPlay is) and I found a way to put Apple Music's status into an Indigo Variable--something I'd struggled with since the iTunes Server was deprecated.

Code: Select all
import objc
from Foundation import NSAppleScript

# Define an AppleScript to retrieve the playback state
script_source = """
tell application "Music"
   set playback_state to the player state as string
end tell
return playback_state
"""

# Compile the AppleScript
script = NSAppleScript.alloc().initWithSource_(script_source)

# Execute the AppleScript and retrieve the result
result, error = script.executeAndReturnError_(None)
if error:
    indigo.server.log("Error:", error.localizedDescription())
else:
    playback_state = result.stringValue()
    if playback_state == "paused":
        indigo.variable.updateValue("Apple Music Status", "Paused")
    else:
        indigo.variable.updateValue("Apple Music Status", "Playing")

Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana. UnifiAP

Posted on
Sun Jun 09, 2024 8:22 pm
t-star offline
Posts: 127
Joined: Oct 26, 2007

Re: Getting device icons to work with Airfoil source

how are you connecting to the speakers via airplay?
Airfoil is flakey on my network now as well. I think that it has to do with being on a mesh network.

Posted on
Mon Jun 10, 2024 3:33 am
durosity offline
User avatar
Posts: 4375
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Getting device icons to work with Airfoil source

t-star wrote:
how are you connecting to the speakers via airplay?
Airfoil is flakey on my network now as well. I think that it has to do with being on a mesh network.
I’ve never had much luck with mesh networks. They’ve always just been flakey for me. The only exception has been unifi, but naturally that’s pretty expensive. What make are you using and is there no possibility of wiring in a couple of good APs?


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Mon Jun 10, 2024 8:54 am
t-star offline
Posts: 127
Joined: Oct 26, 2007

Re: Getting device icons to work with Airfoil source

I have gone from one solution to another. Can’t remember the old one but using Linksys Velop now. There are lots of articles on line about AirPlay not working well on mesh. I see it when I try to add a speaker to something that is already playing and they are most likely connected to different points.
Hoping to do some hard wire points but it is an older home and not as easy.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest