Wednesday, January 25, 2023

Using IFTTT Webhooks to post RSS feed data to Mastodon (requires pro account)

Update 2/19/2024: I did this using my free IFTT account but per IFTT "Starting February 15th, 2024, webhooks Applets will be disconnected for free users". Currently a subscription is $35 a year but of course that may go up.

------------ original --------------

Eleven years ago I wrote about using the IFTTT service to create tweets from the RSS feed of my Pinboard shares (which are written for myself and for Emily; there are now over 49,000 entries).  

Back then I was continuing a kind of sharing I started with Google Reader Social (details) and continued with App.net after Social died.

Now Twitter is dying, but, incredibly, Maciej Ceglowski's Pinboard endures. I've migrated to Mastodon (on an instance for veterans of App.net!) so now I use IFTTT (still free for my use) to create mastodon posts tagged #jgshare from that old Pinboard RSS.

I'm writing now to share a bit of how that works. I started with a recipe first published in 2017 and updated in 2022 by KelsonV. That recipe uses IFTTT web hooks: I tweaked it a bit to get the output I wanted:

    Descriptive Title

    URL

    Commentary

The recipe is a bit hard to follow but the key steps are:

  1. In Mastodon Profile Preferences Development create an "application" with website "https://ifttt.com/" and Scope of write:statuses. After it's created copy the access token.
  2. In IFTTT create a rule based on the RSS feed of your source (in my case Pinboard shares with a particular tag). My rule starts with IF "New Feed Item"
  3. The action part of the rule is a web request"
    1. URL: https://appdot.net/api/v1/statuses
    2. Method: POST
    3. Content type: application/x-www-form-urlencoded
    4. Authorization: Bearer 1234567890 (replace 1234... with your Mastodon access token)
    5. Body as below.
KelsonV's post has additional details and screenshots.

The trick in the body was to get line spaces between Title, URL and Commentary. This worked:
status = 
<<<{{EntryTitle}}
>>>
<<<{{EntryUrl}}
>>>
<<<{{EntryContent}}
>>>
#jgshare
When I first ran this I'd get errors in my IFTTT log but the rule worked successfully. The errors went away.

Monday, January 09, 2023

Switching from Comcast to Century Link - including how to return Xfinity equipment

Seven years ago we switched from CenturyLink to Comcast/Xfinity. At the time I thought CenturyLink was kaput. Today we switched back; I'm sharing some notes on what to expect.

We had good service from Xfinity, but over the past year we've been hitting their 1.2TB data cap. I'm sure I could call Xfinity, threaten to leave, and negotiate transition to their 'unlimited' tier and get a price reduction as well.  I could do that, but the process irritates me.

Happily Century Link has survived, we are in their fiber area, and their fiberoptic GB no-cap service is apparently about what Xfinity charges us. I say apparently because we live in the surprise-fee era. You don't know what you pay until you get the bill. [Update: Century Link quoted me $70 and I'm honestly stunned to discover that is exactly the bill.]

CenturyLink customer service seems as abysmal as ever but local reports tell me the fiber is far more reliable than their old tech.

So we switched. A few notes on the process:

  1. I began by turning off Xfinity automatic bill payment. I called and confirmed we had month-to-month no-contract and that final bill would be prorated.
  2. CenturyLink signup was simple but their process is weak. They insisted on contacting us by phone;  it's a miracle we were able to catch the call and respond. A snow storm delayed installation; they didn't tell us the install was canceled and they appeared the next day unannounced. I'm retired so I was able to make that work. The web site does supposedly allow formal rescheduling but overall that's a C- performance. The tech did a nice job on the install, it was a direct shot from the pole to where our Comcast modem was. Since we have an Eero network he just had to swap a cable and we were on the new service.
  3. After 3 days of use I called 800-266-2278 to cancel Xfinity/Comcast. Cancelation didn't take too long, I had to say "representative" a couple of times to bypass the vmail menu. The Comcast rep sounded depressed but typed on and on trying to complete the exit process. They were unsure how to return the hardware by UPS but I found the Comcast support article (which is flawed, more below)
  4. Xfinity prorates the final bill. It's not clear if they ever actually charged me for the one time we went over their 1.2TB data cap.
  5. Century Link charged me on 12/27/22 though service didn't start until 1/6/2023 (December 27, 2022 - January 26, 2023). On Jan 4 there was a 0$ bill for equipment and installation. My next bill is due 2/4 so the amounts do even out. The default setup is autopay to my credit card. I'll see if that generates an extra fee.
  6. It's not obvious on the web site how one sees a bill. The bill date is a hyperlink. Shockingly the bill appears to be exactly the $70 they claimed; that's what appears on my credit card. Xfinity charged me $91 so I'm unexpectedly saving money.

The Xfinity requirement return is done through xfinity.com/returns -- but the directions are buggy. The easiest option is to bring the hardware to a comcast/xfinity store but I opted to drop off at UPS. Follow the prompts to create a mailing label but be ready to conclude without, you know, the mailing label. To print the label go to customer.xfinity.com/devices/returns/status and you'll see how to print. Box up the xfinity hardware in anything, put label inside and outside box and drop off at a UPS store.

The CenturyLink model is a C4000XG; that site has an online user guide. I couldn't find a manual for it on the CenturyLink site but I did find one online. https://192.168.0.1 worked to get to the admin screen, you need the CenturyLink sticker with the Admin password. You will certainly want to change the passwords to something tappable. The device web server doesn't render properly in (old) Mojave Safari so I used Chrome.

I'll update this post if I find any other surprises in the process.

Update 2/5/2023

I dropped the xfinity router off at the UPS store with the return label and a week later I got an xfinity email saying they had the router.

After we discontinued service my Xfinity login stopped working. There was no error message, it would let me enter my password but then request my password again. I wondered how I'd pay my last bill but a paper statement came in the mail with a credit on it. We pay in advance so there's credit for the unused part of the month. It does appear they never dinged me for my data overage. The statement said that in 30 days they would send me a check for whatever is left in the account, but in fact they credited part of my last payment back to the credit card I used.


Thursday, December 01, 2022

Family Sharing: all charges go to Family Organizer - UNLESS there's an Apple Account balance

One of the drawbacks of Family Sharing is all charges go to the Family Organizer. Even if a family member has a payment method stored in their Apple Account it won't be used. When I look at my son's purchase history in iTunes I see that his recent music purchases have been billed to me. Apple's Support article is clear about this:

Which payment method is charged for purchases that family members make?

When Purchase Sharing is turned on, everyone's purchases bill to the family organizer's payment method.* If there's an issue with the payment method, the family organizer can update their payment method or add a new one.

If you're the family organizer and you don't want to share a payment method with your family, turn off purchase sharing. When purchase sharing is turned off, you can continue to share subscriptions like Apple TV+ and Apple Arcade. When Purchase Sharing is turned off, everyone must use their own payment method.

But this isn't true. My son's recent charges didn't appear on my credit card even though, as noted above, his purchase history says I paid for them.

It turns out there's an asterisk in the above paragraph. I think that was added recently. The asterisk points to a different support article:

Some purchases aren’t charged to your Apple Account balance

If you're in a Family Sharing group, purchases that you make are charged to your personal Apple Account balance. If you don't have enough Apple Account balance to pay for the purchase, the remainder is charged to the family organizer if purchase sharing is turned on.

Yes, that excerpt is internally contradictory! Ignore the heading, the key information is sort-of here: "If you're in a Family Sharing group, purchases that you make are charged to your personal Apple Account balance."

Basically the Apple Account balance is always used first regardless of Family Sharing status. Whatever exceeds that balance is charged to the primary payment method; for a family the primary payment method is always the credit card of the Family Organizer.

So this suggests that if you want charges to go to a family member rather than a family member, you use their primary payment method to create an Apple Account balance and then enable auto-reload.

Even when the payment is through the personal Apple Account balance the Purchase history will show that the purchase was by the Family Organizer. That is a bug. (Apple's purchase history records are a dumpster fire.)

An Apple Account balance can be created through a gift card. But what about using a family member's debit card to add money to their Apple Account? What about using Apple's Auto-reload feature?

Great questions! There's not any good documentation. I don't yet know the answer to the first question, but I did discover what happens with Auto-reload. Even if the family member's debit card is associated with their account the auto-reload will use the Family Organizer's payment method. (In my testing it took over 2 weeks for the first auto-reload charge to actually show on a credit card statement.)

So, what does this mean for those of us who would really like to have family members pay directly for their purchases? So far, not much. If you use auto-reload it may be easier to track the auto-reload payments and not worry about the per-item charges, but that's a small benefit.

That's all I know so far!

Wednesday, November 23, 2022

Apple Numbers appears to display a + instead of a / or ÷ for the division formula

I'm on Mojave for a while (Aperture) so I get to use an old version of Apple's spreadsheet - Numbers 10.1 (6913). It think this is still true however.

If I type a formula that divides one cell by another the Formula bar shows this:


It is actually doing division, but instead of a / or other operator it seems to displays a +.

If you add the same too numbers the formula  bar shows

A 2015 Discussion post explains the problem. This is an artifact of using Numbers on a non-Retina display with the default Numbers font. The first screenshot is actually a ÷ symbol. It's just super hard to see for an Old person using a non-Retina external monitor. (Did they even have Retina displays in 2015? Maybe Apple Devs had them?)

I suspect it's never been fixed -- so I'm gonna call this a bug. Apple is such a weird company and Numbers is weird even for Apple. There are many things I like about it but every so often something like this shows up. (Also, the Help function reminds me how bad macOS Help is.)

FWIW Numbers has an ePub User Guide and an online User Guide (version 12, but you can tweak the URL and seems to show 10.1).

Saturday, November 12, 2022

Migrating from an Apple Store/iTunes shared media Apple ID to a standard Apple ID configuration

I'm putting this up as a peacekeeper. I hope one day I'll fill it in better, but if you are trying to migrate from a shared Apple ID to each family member having only one Apple ID for both iCloud services and media then you will welcome any information.

First, see my prior post. I'll continue with this convention:

Let's say my iCloud Apple ID was "Sam" and my Media Apple ID was "Linda". So my device Apple ID configuration was Sam/Linda.  After the change it was Sam/Sam. 

I think the migration will more or less work. This is what I did so far, omitting errors and redirections:

  1. Let my Apple Music subscription lapse and cleaned up other subscriptions. These were owned by "Linda".
  2. Subscribed to Apple Music one day after the lapse using Sam. I'd seen hints Apple keeps iCloud media data (playlists) around for at least 1 month post lapse of subscriptions. I can confirm they last at least 1 day.
  3. Changed my devices to be Sam/Sam (maybe this would best be done later)
  4. In iCloud Family Sharing settings opened settings for Sam.  Even though my device might be Sam/Sam when I inspected details on my Family Organizer Apple ID I could see shared access was mediated by Linda. I changed that to Sam in Family Sharing.


I ran into too many issues to enumerate. A few tips:
  1. Changes to media rights seem to take time to be effective. After starting a subscription give it at least 30-60 minutes.
  2. iTunes classic allowed import/export of XML playlist files. These are useless. The key identifier is the track ID so they only have meaning for the Library they came from.
  3. Sharing a playlist by URL from Monterey worked -- but not at first. It got hung up in the subscription translation.
  4. Even after family members had renewed subscription access they needed to do something to get Apple Music.app to synchronize. Sometimes this was clicking on the sign-up add for Apple Music then choosing the subtle link for "already have a subscription". Sometimes shutting down and restarting. Sometimes looking at Music.app preferences and turning on iCloud library synch. (Sorry, there were so many issues!)
Extra comments
  1. There are two kinds of Playlists - "Apple Music Playlists" and traditional iTunes/Music playlists. I think when you migrate an old iTunes library to Monterey the app turns legacy playlists into Apple Music Playlists. Not 100% sure about this.
  2. I'm not gonna talk about this more, but I'm still running iTunes on Mojave and I'm amazed it works at all. It more or less survived the process. I have future work to do around migrating things out of iTunes on Mojave. (That machine will be an Aperture machine until I migrate that -- an even greater challenge. Then it will likely be replaced.
  3. Post migration it's not clear how to identify what a Family Member purchased from the days of the shared Apple ID. Apple suggests going to reportaproblem.apple.com; it only goes back 90 days though. Before doing the Apple ID migration the Family Organizer view had data broken down by family member, but after the migration that was very limited.
Update 11/15/2022 - the dreaded Apple ID for purchases". 

Only my #1 son still had the "Linda" Apple ID for purchases (Store, Media). He's on iOS 16.1.1. Even after switching his Media Apple ID to be his iCloud Apple ID, and despite his Settings Family Sharing saying he had access to the Apple Music subscription, both iTunes.app and Music.app said he didn't have family sharing access.

I found https://support.apple.com/en-us/HT201454. There are 3 Apple ID settings in iOS, not 2. There's iCloud Apple ID, Media and App Purchase Apple ID, and for the Family Organizer there's also Apple ID:Family Sharing:Purchase Sharing:Purchases:Apple ID for Purchases! The last is not updated when a user changes Media Apple ID. It's a "secondary Apple ID".

I don't think the Apple ID for purchases always exists. On my son's phone it can be changed. On my personal family organizer phone it appears it cannot be changed and it's incorrect. There can be significant timing delays when it's changed, the Done button may appear not to work but on screen refresh it may work.

After I removed the secondary Apple ID for purchases from his phone he was able to access Apple Music. Then I could enable "Sync Library" in Music Settings.


Update 11/18/2022: Article on the secondary Apple ID and purchase sharing. This article changed 9/2022. It feels like Apple's attempt to mitigate the multiple Apple ID curse. You can only change this every 90 days. I changed it from "Linda" to "Sam" but in 3m I might change it back again -- after some research.

Update 11/19/2022
After doing the Apple ID separation I needed to recreate a Library for my son that identified what he'd actually purchased over the years that his purchase were on the family shared Media Apple ID. The Media Apple ID had its own account on one of our Macs, so I could create a Playlist from that to share, then open that shared url in his current Library. That worked pretty well in the end, but there were many issues and steps. I used many macOS Music app queries and sorts to reconstruct which things were his (He still purchases Music from Apple. That's a longer story.)

Once he had the Playlist I created open in his macOS Music app I had to select all songs and use "Add to Library" to actually make them part of his Library. Note you can download songs for a Playlist but that doesn't make them part of the Library. I needed his Library to reflect his purchases and preferences.

As a part of this process I found the best way to view purchase history was to enable iTunes in Apple Music, then in iTunes click the Purchases link.

Incidentally I ran into many UI bugs and issues with Apple Music. The worst is the insane and inexplicably persistent Apple Music product manager decision to use an enormous Playlist header section that makes the essential column browser very inefficient. There were problems with Authorizations, with downloads, with list row selection and more. It's just a buggy and flaky app. At one point I was trying to download locally and nothing happened. Only by showing the Activity window could I see that my device authorization wasn't working. I had to use my son's Apple ID to authorize Music / iTunes in his user account -- perhaps the Apple ID I first used had too many authorizations on it. There was no error message.

Sunday, October 16, 2022

AppleScripts to speed Java compile and execute with BBEdit

Students are often asked not to use an IDE (I like Visual Studio Java) for their Java projects. Instead they need to use BBEdit without an IDE. BBEdit does not appear to natively support facilitated compile/execute but it does run AppleScrips that can speed things a bit.

The davalign.com site has some scripts written for TextWranger. If you rename them to BBEdit they work well.

Reproducing them here in case that site vanishes. I didn't see much like this. Note if you open and save in macOS Script Editor they will be compiled. I like that the first action is to save the document, it's easy to forget to save before a compile.

Compile java.scpt

tell application "BBEdit"
save text document 1
set the_file to file of text document 1
end tell

set AppleScript's text item delimiters to ":"
set source_file to the last text item of (the_file as string)

tell application "Finder"
set the_folder to container of file the_file
end tell

tell application "Terminal"
activate
set p to POSIX path of (the_folder as string)
set shell_script to "cd " & (quoted form of p) & ¬
"; javac " & source_file
if (count windows) is 0 then
do script shell_script
else
do script shell_script in the front window
end if
end tell

Run java.scpt

tell application "BBEdit"
set the_file to file of text document 1
end tell

set AppleScript's text item delimiters to ":"
set source_file to the last text item of (the_file as string)
set compiled_file to text 1 thru -6 of source_file

tell application "Finder"
set the_folder to container of file the_file
end tell

tell application "Terminal"
activate
set p to POSIX path of (the_folder as string)
set shell_script to "cd " & (quoted form of p) & ¬
"; java " & compiled_file
if (count windows) is 0 then
do script shell_script
else
do script shell_script in the front window
end if
end tell

Friday, October 14, 2022

Apple Music subscriptions stop working when I changed my Media & Purchases Apple ID

Apple digital rights management (DRM, FairPlay in this case) is very complex, particularly when one adds Family Sharing or has an atypical Apple ID setup.

In our case, for reasons that made sense 10-15y ago, my iCloud Apple ID is different from my Media & Purchases Apple ID. My iCloud Apple ID is the family organizer and my Media Apple ID is a family member.

Over the past few years I've been trying to migrate to using a single Apple ID on my phone. I have migrated all but one family member.

Migration has been difficult. I don't think Apple has published a transition guide. You can't, of course, transfer purchases or media or subscriptions. There's a risk of losing a lot purchases and Apple is unlikely to help.

I looked at doing a test migration on a macOS Monterey account of mine but it seemed Monterey did not a user to change only their Media Apple ID. [Later I found you can. In Monterey, unlike iOS, it's obscure how you do this; it doesn't show up in an Apple ID. You change the Media Apple ID through the App Store (Sign Out, Sign In).]

Since it seemed couldn't test on Monterey without trying a full Apple ID transition I made the changes on my iPhone.  Let's say my iCloud Apple ID was "Sam" and my Media Apple ID was "Linda". So my device Apple ID configuration was Sam/Linda.  After the change it was Sam/Sam. Sam is the Family Organizer, Linda is a family member. Linda owns our app and media purchases -- at least that's where they show up when I look.

I was particularly curious how Apple Music would work including test playlist sharing. Unfortunately I couldn't test the playlist sharing because Apple Music didn't work at all! As far as iOS was concerned I didn't have an Apple Music subscription. It offered to give me 6 months free. I also didn't have any Playlists or other configuration. Music (iTunes) configuration is tied to the Media Apple ID, not the iCloud Apple ID.

To recap, Sam is family organizer and Sam/Linda purchased the family plan Apple Music subscription. Linda shows up in Family Sharing as a family member. Once I became Sam/Sam I had no access to Apple Music. Reviewing Family Sharing it appeared that Sam should have access to Linda's Apple Music subscription. That doesn't work.


... Make sure that you're using the same Apple ID for Family Sharing and Media & Purchases... 

They don't say how to migrate to that idea of course! Obviously it was possible to use a different Apple ID for Family Sharing and Media (Apple Music worked before). I don't know if the changes made to my device impacted any other family members (wish I'd checked!), but it appears for a Family Organizer device to see Apple Music they have to use the same Apple ID used at time of purchase.

Somewhat surprisingly Apple let me revert back to Sam/Linda on my iPhone. (I think there was some time limit/change limit on Apple ID media changes.) After a period of sync I had my old playlist and Apple Music access.

My guess is that to make the change to Sam/Sam and keep Apple Music I'll have to end my current subscription (tied to Linda) then change the Media Apple ID then resubscribe for the family. (In practice I'll end all subscriptions for Linda before the change.)