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

Did you check your Hubitat log for any errors from the "YoLink Device Service"?

Everyone, please refrain from discussing the pros and cons of YoLink devices and their business model in this thread. I wrote the app and drivers for those who want to use YoLink devices for whatever reason - period. If you want to get into a pissing contest over their business model and their devices, please start your own thread. Thanks.

8 Likes

Hey @SteveBarcus, sorry, I agree with you and I apologize as I was just responding to YoLink’s comments in YOUR thread. It does seem that every YoLink thread I have come across tends to end up in this way one way or another. All that aside, great job on your app. It is greatly appreciated! Thanks for all your work.

2 Likes

Okay, so I have to admit I'm a newbie writing for this platform and using the Hubitat Package Manager (HPM). I was a mainframe programmer for 40 years, so this is all new to me - and the available development documentation for Hubitat and YoLink is mostly incomplete, error ridden, or just plain out of date. That's my story, and I'm sticking to it.

Having said that, it appears I screwed things up deploying the application via HPM. The folllowing directions only apply to anyone that has installed the app and drivers on or before today (7/17/2022):

  1. Go into HPM and click on "View Apps and Drivers".
  2. These are the current app and drivers that should be shown:
  • YoLink™ Device Service v1.0.1 (app)
  • YoLink COSmokeSensor Device v1.0.1 (driver)
  • YoLink DoorSensor Device v1.0.1 (driver)
  • YoLink Hub Device v1.0.1 (driver)
  • YoLink LeakSensor Device v1.0.0 (driver)
  • YoLink Manipulator Device v1.0.1 (driver)
  • YoLink MotionSensor Device v1.0.1 (driver)
  • YoLink MultiOutlet Device v1.0.0 (driver)
  • YoLink Outlet Device v1.0.3 (driver)
  • YoLink Siren Device v1.0.0 (driver)
  • YoLink SmartRemoter Device v1.0.1 (driver)
  • YoLink SpeakerHub Device v1.0.1 (driver)
  • YoLink Switch Device v1.0.1 (driver)
  • YoLink THSensor Device v1.0.3 (driver)
  • YoLink Temperature Sensor Device v1.0.3 (driver)
  1. If any are incorrect, you need to use the HPM "Repair" function to repair "YoLink Device Service"
  2. If the app and driver versions are correct and your temperature/humidity sensors are not working, you'll have to go back into the "YoLink Device Service" app, unselect the device to uninstall it, and go back in again and select it to reinstall it. There was a bug where those devices were not being initialized correctly.

Thanks - and sorry.

1 Like

@SteveBarcus I when back in and look at the log and seen an error message that the driver for the MultiOutlet was not install and that I needed to add it. It is now working.
I really want to thank you for all you do. I do like the Yolink devices. Thanks again.

2 Likes

You're welcome.

1 Like

Rather than clutter up @SteveBarcus’s thread about his Yolink drivers, I created a new thread here, please consider posting your question in that thread and deleting your post in this one.

3 Likes

@SteveBarcus just to make you aware. I'm using some Yolink sensors in node red and get the following error message but the contact and motion sensors that I'm using are unaffected by the way I use them and I'm not using the temperature for anything. Just wanted you to be aware. Thanks for the Yolink integration.

image

1 Like

OK! Yesterday I installed the API driver and the drivers for the THSensor and Door Switch that I have (plus all the other device drivers just for good measure) and was able do to successfully replace my kludged-up YoLink IFTTT bridge code and some proxy virtual devices with direct Hubitat connections through the API to the actual YoLink devices themselves, yay! My previously obtained UAID and secret key worked just fine without my having to renew them with YoLink.

Currently I have the polling interval set by the YoLink API app to 1 minute so that I could easily test changing inputs to the sensors without waiting around too long. (Is it safe to re-run the YoLink API app anytime I need to change the polling interval? I was concerned that running it again might create duplicate devices.)

The Door Sensor (which I use in our mailbox to indicate mail arrival) worked great right off the bat. In fact the mailman arrived just as I had finished installing it and I got the notification exactly as I expected.

The THSensor I have had a few issues with. To begin with, after the initial installation I was not getting automatic polling to track changes in temperature. If I manually clicked the Poll button on the THSensor driver's page then it would update immediately; if not there were no live updates.

When I looked at the THSensor device log with (with Debug logging disabled in the YoLink API Device settings) I could see that the THSensor driver was throwing Groovy errors anywhere there was the assignment of devstate = object.data.state.state, ie on lines 276 and 342:

(There is also a similar assignment at line 199 but that assignment either does not fail or is never executed.)

When I replaced those lines at 276 and 342 with the assignments devstate = "normal" and devstate = "alarm", respectively, the runtime system stopped throwing errors. And when the errors stopped, the timed THSensor polling then began working correctly.

Very curiously, the devstate assignments did not fail when Debug logging was enabled in the YoLink API Device settings. But of course then my log was filling up with a huge amount of benign debug status data. I could not see anywhere in the driver code that Debug logging could possibly be affecting actual driver execution semantics.

So anyway, that's my bug report, and for the time being I will operate with my 2 one-line patches in place to get normal operation in non-Debug mode. Let us know when you are ready to entertain suggestions for feature upgrades, etc.

Thanks for the feedback. I'll return the temperature values as a string in the next release of the Service App.

You can run the service app as often as you wish. It checks to see if devices already exist and will not create duplicates. I will look into the errors. Thanks for the feedback.

1 Like

If you look at the State Variables for one of the failing temp sensors, what version of the driver is it using? Thanks.

image

Ok, I fixed the parsing errors.
The device will report on temperature changes without the need to poll it - it's the parsing error that's preventing that. It'll work correctly with the fix.

I created a new thread for Suggestions and feature requests:

1 Like

Updates now available in HPM:

2 Likes

@SteveBarcus I try to update the Yolink app etc and also try to modify but it is not showing up? I will try later and see if it shows up.

Using the " View Apps and Drivers" selection in HPM, these are the current versions of the app and drivers that should be shown (only shows the drivers you've installed):

@SteveBarcus I still getting the errors from node red?

image

also here is my apps version. If there anything you would like me to do, let me know. Thanks

Are you using Celsius or Fahrenheit in the app settings?

I'm using Fahrenheit.

New versions of app and drivers released (use HPM Update to get them):

image

1 Like