HOW-TO: On-Screen Display (OSD) of Caller ID (CID) info on PC monitor

At first glance, this quasi-tutorial may look like it doesn't involve Hubitat at all (because it doesn't have to), but it's a fun, unique, useful workflow that took me a while to perfect, so I'm sharing it with everyone.

GOAL: Display caller's information as pop-up text on my computer screen.

REQUIRES: A smartphone; Tasker and AutoRemote apps for Android; EventGhost for Windows; Rule Machine app installed on Hubitat.

RECIPE: Incoming call causes smartphone to ring, prompting a notification showing the caller's name and/or number (CID). Tasker reacts by parsing event info into a message it send via AutoRemote to an endpoint in EventGhost, running on your computer. EG then displays formatted message on-screen for several seconds.

Optional: Tasker can also issue a GET Request via HTTP for triggering Rule Machine using its dedicated 'End Point URL' mechanism.

Optional: Rule Machine can also send messages to EG via user app PC Controller – installed using HPM – paired with the latest Hubitat plugin for EventGhost.

PART ONE: Sending Caller ID from Smartphone to Computer Screen

STEP 1. Download and install the various apps (On Hubitat: PC Controller app, Rule Machine 5.1+, both optional; On Android device: Tasker, AutoRemote; On PC: EventGhost 0.5.0-rc6 or later, along with optional Hubitat plugin for EG copied to the correct /plugins directory per instructions).

STEP 2a. In EventGhost, right-click in the Configuration pane and choose Add Plugin... ► AutoRemote, then right-click it and choose Add Action... ► Register EventGhost in order to . . .

STEP 2b. . . . establish the necessary registration of EventGhost with AutoRemote, and once completed, send EG a test message from AutoRemote (e.g. hello!).

STEP 2c. In EventGhost, watch for incoming test message to arrive (e.g. AutoRemote.message.hello!) which will be used in the following two steps as a template for the text we want EG to parse and display on-screen.

STEP 3a. In EG, right-click the top of Configuration pane, select Add Macro... ► EventGhost ► Show OSD and enter {eg.event.payload} into the 'Text to Display' box and click OK. Right-click to rename the macro (e.g. 'Show Caller ID').

STEP 3b. In EG, drag test message (AutoRemote.Message.hello!) into new macro, thus creating a new trigger event. Right-click it to 'Configure Item', and modify the 'Event Name' field to AutoRemote.Message.OSD.*

STEP 4a. In Tasker, create a Task containing the following action:

+ ► Plugin ► AutoRemote ► Message ► tap Configuration ► tap Device ► tap EventGhost ► tap Message ► type OSD.%evtprm2 ► tap OK

and finalize that action by tapping the Back button, then the left arrow (twice), and finally the checkmark to save your work. Rename the Task 'Send CID to EG'.

STEP 4b. In Tasker, create a new Profile with the following trigger:

+ ► UI ► Notification ► Owner Application: Phone (or Voice, if using Google Voice), Text: Incoming call

and finalize your work as before. When prompted, assign the Task 'Send CID to EG' created above. Exit Tasker.

STEP 5. Test this setup by calling your smartphone and watching for a message to appear in EventGhost. If everything is set up correctly, a message should appear in the upper-right corner (or wherever you specified during Step 3a).

IMPORTANT: If this test fails, it's likely that the Tasker Profile from Step 4b needs to be modified to suit how your phone behaves when receiving calls. On the other hand, if it produces nonsense text, the Tasker Task from Step 4a may be referencing the wrong Event Parameter (mine captures the caller's name using %evtprm2 but your notifications may be formatted differently, so try %evtprm3, for example).

PART TWO: Sending Messages from Hubitat to Computer Screen

This workflow is much easier to implement, since it only involves the installation of a User App on your Hubitat controller, along with a dedicated EventGhost plugin by the same author.

STEP 6. Follow the app and plugin installation processes described at [RELEASE] PC Controller - Send and receive commands to/from your windows PC (EventGhost).

STEP 7. Send a message – for example, OSD.My message! – to EventGhost from the "Computer" device created during Step 6, either using Rule Machine, or the "Send Event" paddle on its Details page.

TIP: In order for EG to identify/filter messages specifically intended for on-screen display, I recommend prefixing them with the four characters OSD. — which will make more sense in the following step.

STEP 8a. In EventGhost, right-click the top of Configuration pane, select Add Macro... ► EventGhost ► Show OSD and enter {eg.event.string[4:]} into the 'Text to Display' box and click OK. Right-click to rename the macro (e.g. 'Hubitat to OSD').

NOTE: In case you're wondering, the statement in curly brackets { } is simply a declaration instructing EG to "take all of the text after the first dot shown in the incoming message string, and remove its first 4 characters." In this manner, using even more sophisticated Python statements, quite complex/conditional formatting can be introduced to your EG workflow. We're keeping it simple here.

STEP 8b. In EG, drag the message sent in Step 7 from the left pane into the new macro, dropping it into the first (topmost) position. Right-click this event and select Configure Item. In the 'Event Name' field, replace 'My message!' with an asterisk so it now reads 'Hubitat.OSD.*' and click OK.

STEP 9. Send the same test message again from Hubitat to see it appear via OSD!

Any questions? Have I left out any critical steps?

3 Likes

I tried STEP 8a with the "[4:]" removed just to see what the full string is and I got "Hubitat.osd" (by entering "{eg.event.string}" in the Action Item Settings in EG). I am using the Device for EG in Hubitat with "osd.ABC" set in the Add String Param. If I change "{eg.event.string}" to "{eg.event.payload}" I then get "['osd.ABC']" on the screen. I would like to know what I need to do to display "osd.ABC" on the screen. Do you know what possible things can be put after the "eg." besides string and payload? Thanks

I don't think you need to use the parameter option in the PC Controller, I think the intention would be you construct your CID text to display as part of the event text, i.e. the "ABC" in your description, so sending "ODS.Simon is calling".

One other thing that may be missing or incorrect in @LibraSun's instructions, at least from my own testing, is that the stripping of the first 4 characters, intended to be the ODS. prefix, I feel needs to be 12:, to take out the Hubitat prefix added by the PC Controller. If I do that in the Show OSD action, I see the ABC from an OSD.ABC event, or Simon is calling from my earlier example.

Setting "OSD.ABC" in the device view and using {eg.event.string[12;]} gave me NOTHING on the display!? If I changed the 12: to 1: then I get "ubitat.osd". It seems that nothing comes after the previous string. But... if I use {eg.event.payload[0]} I then get OSD.ABC (This is what I want), If I use {eg.event.payload} I get "[u'OSD.ABC']". Makes perfect sense right ???!!! Even though I am super confused I know how to produce what I want. If you find out anything I sure would appreciate some feedback. Thanks

I thought if you used event.atring and 12: it should display ABC, that's what I saw. In your first example you had a semi-colon, not a full colon.

For iPhone + Mac owners the tutorial for this is... nothing.

This is just the default behavior of getting a call on an iPhone when you own a Mac. :rofl:

To get the same thing, but on your iPad... you also do nothing.

1 Like

That may be true for displaying phone numbers, but the same approach can be used for so much more on a PC running EG, or an Android phone running AutoRemote and Tasker

Maybe, but literally the only thing I need from my iPhone when I'm on my MacBook is the actual phone related stuff. That's just phone calls and texts.

I can make and take phone calls from my MacBook by whatever Apple Magic they use to make that work. It's fantastic just answering a call when I'm on my MacBook and not even having to think about where my iPhone is. It's not just that I can see who's calling, I can answer the call from my MacBook (or iPad) too. And place calls from both.

iMessage similarly makes getting and sending texts 'just work' from my Mac. It's pretty darn nifty.

Anything else I could use my phone to do is likely done better on Mac natively. I honestly can't think of a single thing I'd want to kludge together some combination of AutoRemote and Tasker to accomplish that I couldn't just do from my Mac.

For me it's not so much the interoperability between the phone and my PC /laptop, it more other possibilities they open up. I can issue a command from HE to dismiss my alarm on the phone if I get up early, send notifications from HE locally to my phone and tablets, including dismissing them when they are no longer relevant, adjust settings on the phone like do not disturb, volume and other media, etc.

I also use EG to control lights on my mousepad and to keep details about my ups up to date in HE.

This is also true for non-iPhone users of the Google Fi service. The Google Messages app (on Windows, ChromeOS, and I assume Mac) allows sending/receiving texts and voice calls. When my cell phone rings and I'm sitting at my Windows desktop, I often just answer on the computer. Or when I'm on my Chromebook as I am at the moment, I can bring up the app and make a voice call or send a text.

This can also be achieved on any device by using a Google Voice number. It can even be set up so when you click on a phone number link on your computer, it automatically makes the call using the Google Voice app.

The only problem with all of this cross-device integration is that it makes it much harder for me when I try to explain the difference between cellular voice/data and home internet/WiFi to my 85 year old father. In the old days you could just say that phone calls go over the mobile network, but with the phone doing WiFi calling and the desktop apps making calls completely independent of the phone itself, it's too complicated for him. And of course his home phone hasn't had a copper wire for a long time. It's just more data going over the fiber optic line.

1 Like

If you are somehow OK with handing google all of your call logs and text messages for data harvesting.

That's about a million and a half hard passes for me.

Doesn’t this whole thread presuppose the user has an android mobile device, and intends to use it?

Comparing it to how Macs and iPhones work together seems like trolling.

1 Like

I need typing lessons! In my post I had ; but in the actual I had : ... I just tried it again to make sure and it shows nothing.