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?


Download the Hubitat app