[Release] Fun Api Response App (Idioms, Jokes, Trivia, Poems, Quotes & Riddles)

Dear HE Community,

I thought I might share a 'in the spare time' fun Hubitat application that I have incorporated into some of my unique home automation events. This application generates random responses that are suitable for TTS on capability 'SpeechSynthesis' compatible devices (ie. Amazon, Google, Sonos, Ikea, etc).

A free account on ApiLeague.com is required to obtain an api string for those categories indicated below. The 'Idiom' category does not require an api account or api string. The Idioms category is powered by my own json file (700+ entries) and I will add more on an as-is basis.

Category API Required Api Website Responses
Jokes :white_check_mark: ApiLeague.com Joke
Trivia :white_check_mark: ApiLeague.com Trivia
Poem :white_check_mark: ApiLeague.com Title, Author, Poem
Quotes :white_check_mark: ApiLeague.com Author, Quote
Riddles :white_check_mark: ApiLeague.com Question, Answer
Idioms :x: Phrase, Definition

These responses are just fun to hear and perhaps educational, especially to the younger generation. A random response can be triggered by each separate device by a push momentary button and or a Hubitat rule, for example, when you wakeup, goto bed, or arrive home, have company over, turn on/off a switch, etc...

PLEASE NOTE: This NEW application supersedes the my previous Hubitat-Idioms driver that was a pre-release. That device will need to be deleted and replaced by this application called 'Fun Api Responses', which is soon to be available in HPM.

Screen Captures

Application Interface

Devices

  • Separate devices with a 'Momentary Push Button' and/or Command 'Refresh' to generate a new response
3 Likes

Reserved

Did you miss April 1, or is this for real?

It’s real

@KurtSanders,
Looks interesting... unfortunately, it's not available in HPM?

Not sure why, but you have to turn off Fast Search in HPM.

image

1 Like

I can't seem to get it to work... This is the only log entry:

dev:882025-05-08 13:57:16.151error
groovy.lang.MissingMethodException: No signature of method: user_driver_kurtsanders_Idioms_1131.logInfo() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [A 'logsOff' cron job has been scheduled in 00:30:00]

Hum, let me reinstall on my development hub.... I will get back to you!

Oops... There were two... Here is the other:

2025-05-08 13:57:53.762error
groovy.lang.MissingMethodException: No signature of method: user_driver_kurtsanders_Idioms_1131.logDebug() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [Sending on GET request to β†’ https://raw.githubusercontent.com/KurtSanders/Hubitat-Fun/refs/heads/main/idioms/data/Idioms_phrases_map1.json] on line 108 (method on)

My bad :nauseated_face:! There was an old Library Bundle that did not have a required method. I have fixed it in HPM.

Please perform the following:

  • Launch HPM
  • Select 'Repair'
  • Select 'Idioms'
  • After HPM re-loads all the required files, exit HPM.
  • View the Idioms virtual device you created.
  • Select 'Refresh' or Toggle the Switch (Both work the same)

That should populate the attributes....

025-05-08 14:46:31.881error
groovy.lang.MissingMethodException: No signature of method: user_driver_kurtsanders_Idioms_1131.logDebug() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [Sending on GET request to β†’ https://raw.githubusercontent.com/KurtSanders/Hubitat-Fun/refs/heads/main/idioms/data/Idioms_phrases_map1.json] on line 108 (method on)

OK... Had to delete the old, reinstall, and now it seems to work.

Thanks!!

1 Like

Love this! My young daughter is going to really enjoy this. She hears us say something that she doesn't understand, and we talk about "weird sentences" that we use. She's really eager to learn these!

1 Like

Probably a silly question, what selections in rule machine do I use to get one of these phrases into tts over a speaker?

I use Set Variable and set string operation to Device attribute.

Pretty sure I am not understanding correctly:

@KurtSanders, the idioms seem to be getting some wires crossed. In all of the ones I've come across in initial testing (about 6), there is something that seems random.

for example, what does "huckleberry" have to do with this one?!? :rofl:

Interesting. You're missing the Set Variable option. Do you have any system or local variables defined? You have to create the local variable first.

I worked out I have to created a local variable first under settings, what action do I use in rule machine to now get this to tts?

Using your local variable name:

Below that, you can select Notification Device (for Echos), or Text to Speech Devices (Echos, HomePods/Apple devices).