[RELEASE - BETA] - "YoLink™ Device Service" app and drivers to connect Hubitat™ to YoLink™ devices

The device tokens are provided by the YoLink cloud when the device list is displayed in the YoLink Device Service app. When a device is selected for installation on Hubitat, the device is created and its token stored in the device definition. I tried deleting a device from the YoLink app and resyncing it and it still worked. Sorry, but I have no idea what happened.

I'm certain that my device tokens became invalidated during the time period that YoLink pushed out their updated API - the remaining error entries in my log stretch back into January. I could see that the tokens for the newly re-installed devices were updated from their previous values which had been generated prior to the change in API. It could be handy to be able to refresh device tokens (eg by running the YoLink app) without having to delete the devices and reinstall them.

When the API was first released, the error codes were quite limited. The "token error" code was originally used to indicate a rotating API access token error and there was no specific device token error. Now that code is used to indicated a device token error and a new code indicates the access token error.

Looking at the latest error code definitions, there are quite a few new codes. Now that I know it's a device error code I can code to refresh the device token. Thanks.

1 Like

NEW UPDATES RELEASED

Use the HPM Update function to install the updates.

Updates:

  • Improve functionality and reliability of YoLink contact sensors bound to a Finger or Garage Door Controller via Hubitat
  • Handle invalid device ID errors
  • Update copyright dates

I'm new to Hubitat. I'm looking for an alternative dashboard to YoLink (I found this thread thru a google search of "yolink api drivers"). I just spent the last hour and a half reading this entire thread and am VERY IMPRESSED (and thankful) for your work.

It looks like the Hubitat dashboard will do exactly what I want.

Here's my question... since I've never heard of Hubitat until now (I have a ton of YoLink gear and the app), do I need more hardware to use the Hubtitat dashboard? ie a Hubitat hub?

Sorry for the ignorance, got to start somewhere :slight_smile:
Thanks! Bob

Hi Bob,
Yes, you need a Hubitat to use the Hubitat dashboard. Hubitat has its own built-in dashboard app, plus several created by other developers. There are other external dashboard apps that interface with Hubitat, e.g., ActionTiles (https://www.actiontiles.com).

Thanks for the reply. Guess I need to keep looking :frowning:

I'm looking for an app (dashboard) to interact with YoLink water sensors and valve controller. In essence a private labelled "lite" version of the YoLink app that I can provide to my customers (who use YoLink sensors & valves) without them having to purchase additional hardware. Your dashboard examples were perfect. I was so close. lol

Thank you!

Yes - Hubitat dashboards are SW that runs either internally to, or in conjunction with a Hubitat hub (aka HW), which is similar to other automation hubs, but it focuses on local control (not using the cloud) of Zwave, Zigbee, or Matter devices - There are numerous 3rd party integrations with other devices and cloud based automations - YoLink being one of them. - As Steve mentioned, there are other Dashboards that run against other hubs, see SharpTools: Dashboard for SmartThings, Homey, Hubitat, and Home Assistant | SharpTools

Given a C7 hub is available for <$90, its not a huge cost burden. - But to be honest, with YouLink's API being cloud based, it's somewhat "goes against" the theme of local control that it's Hubitat's forte. - If/When YoLink ever produces an X3 hub with Matter support to access there devices, then that ideally aligns with Hubitat's direction.

But bottom line, Hubitat is a HW hub, with a surrounding ecosystem of SW (drivers, APIs, Automation, and in this case, Dashboards)

The YoLink API also uses MQTT, as well as Steve's code is a great working example of how to use their API - So if required, you could use one of several MQTT dashboard tools as a starting point for your development. - Again, there is an obvious cloud dependency in that approach.

Good Luck!

Thank you for the reply. Given YoLink has D2D I'm Ok with a cloud based approach for now. You've pointed me in the direction of "I need to find a developer experienced with MQTT to develop a dashboard". Seriously that's extremely helpful to me and I thank you both for the clarity. I realize this is a tech/developer thread and I'm way over my head but now I know what resource to go seek out.

Thanks again,
Bob

Just be aware that MQTT is an event "listener". Any dashboard that is strictly MQTT based will only show you changes in your device states, it won't allow you to control those devices.

Good to know Steve!

@SteveBarcus, I just tried to connect to the outdoor motion detector. I created the device OK,and from your list of supported drivers it appears I have the right one, but all I see under Current States is the driver number.

image

image

The device works fine in the YoLink app. Any ideas?

One thing I just noticed is that the motion sensor doesn't seem to have a parent app listed. The other YoLink devices do.

My suggestion:

  1. Run the YoLink Device Service app, unchecked the motion sensors and run the app to completion.
  2. Insure the motion sensor devices no longer exist. If they do, use the "Remove Device" button on the devices to remove them manually.
  3. Run the YoLink Device Service app again, rechecked the motion sensors and run the app to completion.
  4. Check the logs for any unusual errors or warnings.
  5. Look at the motion sensors again and insure the parent app shows.

I followed your directions exactly and everything worked. Thanks for your help. The error was mind somewhere along the way.

You're welcome. Glad it worked for you.

Has anyone been able to get the Yolink Siren Alarm to work with Hubitat? It shows up in the Yolink App (I can trigger the alarm).

It shows up in the list of devices on the Yolink Device Service inside Hubitat.

I checked the siren alarm in the Yolink Device Service, and assume the device will show up just like all my other Yolink devices... but no.

Any Ideas?

This is usually caused by the device driver not having been downloaded.
Look under "Drivers code" on the Hubitat and insure the "YoLink Siren Device" driver is there. If not, use HPM "Modify" to download it and then run the YoLink Device Service app again to create the device.

  1. Run the app, uncheck the siren, run the app to completion.
  2. Run the app, check the siren, run the app to completion.
  3. Check the logs for any error messages concerning the install.

Of course, thank you!!!

Your prompt support is most appreciated. I made a contribution to your beer fund :-).

The siren now shows up, and all is fine!

Thank you!