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

@moh @SteveBarcus Confirmed, the values do not update after "polling." Yes, they do synchronize between Hubitat and Yolink after the initial "poll" but not moving forward (and I timed for 5 minutes)

1 Like

Okay, my values were also hung. I reset my YoLink hub by pressing the button on the back until the lights blinked and after it booted the sensors started working.

There's a bug in the driver that's incorrectly applying the calibration values against the temps, which are already being reported with the calibration correction. I'll be posting a fix soon.

FYI, the calibrations that you specify in the YoLink app are sent to the device and the values displayed on the device (and reported to Hubitat via the API) are the ones after the calibrations are applied. I was applying the calibrations to the already calibrated values, which is the fix I'm going to release soon.

The calibration values on the device may differ slightly because of Celsius to Fahrenheit conversions and vice versa . The calibrations are not immediately sent to the device, they are only sent after the device checks in with the YoLink hub.

The calibration values reported in Hubitat come from the API and for some reason they don't agree with the YoLink app. I have no idea how they're derived. So basically, if there's a non-zero calibration value in Hubitat, there's "some" calibration being used and that's going to be the extend of how useful these values are on Hubitat :grinning:

Thanks @SteveBarcus ! Good to know. Will await your fix. The variation being what it is, should the value being displayed in Hubitat just mirror what is displayed on the device then (with no further calibration by the Device Service app)? Or could there be a way to just set the Hubitat calibration independent of the YoLink calibration (with a choice of C or F of course) so that we can just manually match up the temp readings between Hubitat and YoLink dashboards? I am OK with either way (whichever way is easier to program for you). Again, thanks for all your work on this app. Really made my day when this came out (despite not being completely local, I really like the range and dependability of the YoLink LoRa).

When fixed, they should match in the YoLink app, Hubitat, and on the device.

New Device Support Added

  • Dimmer (YS5707-UC)
  1. Use HPM "Update" to update the YoLink Device Service app and download the new driver.
  2. Use the YoLink Device Service app on Hubitat to install the device.

The fix has been uploaded. Use HPM "Update" to get it. Thanks.

@SteveBarcus , I can confirm that all is well and synced with your latest updated temp sensor driver. Thank you! Great work!

@moh @SteveBarcus Maybe I am missing something, but it did not work for me. What is the calibration process described? I did not touch the calibration sliders on the YoLink app. The oly way I could get identical reporting is to repoll the devices in Hubitat. Am I missing something? I have "0" calibration offsets.

@moh @SteveBarcus Guys would you believe that all was solved by rebooting the Hubitat hub? Is this to be expected?

Hi @lkazanov , all I did was update through HPM and all my temp values ended up matching. Depending on your update rate for your Hubitat Dashboard, as well as the YoLink Hub sensor polling frequency (I think it connects upon temp change), perhaps it could also just have been a question of timing to sync all the data. Obviously, @SteveBarcus would be much more familiar than I regarding this, but mine synced up without any reboot. My guess would be that when you rebooted, you may have forced polling? Anyway, glad its working for you now. Thanks again to @SteveBarcus.

I updated today via HPM (Humidity/Temp Sensor driver shows v2.0.3) and rebooted my Hubitat but the temperature values are still only updating once each time I hit the Poll button on the device page, at which point the temp value then matches the "live" value shown on the YoLink mobile app.

Also, I am periodically getting clusters of error messages like this from the driver on all 3 of my temp/humidity sensors:

UPDATE: It's working now, polling and syncing temperatures on a 2-minute schedule after I re-ran the YoLink Device Service app without changing any of the existing parameters.

Was this a required step that I missed?

If you receive errors on a device in the future, please go to the device's settings in Hubitat and set Debug to True. When the error occurs again, send me the logs for that device and include several minutes before the error occurred.

Simply updating a driver should not required a reboot or running the Service App again. There are too many variables to say what might have caused the temperature's not to update - glad it's working now.

There are three ways that values get updated (assuming they've changed according to the YoLink Servers):

  1. When the device is polled by the YoLink Service app
  2. When you manually initiate a Poll command on a device
  3. When the YoLink servers send an update value via MQTT.

The YoLink Service app polls the devices every 5 minutes by default (as set in the Service app). To see if this part is working correctly, open the "Apps" in Hubitat and click on the Gear Icon next to it:
Scroll to the bottom and you should see a Scheduled Job running at the polling interval and the Prev Run Time should be within that timeframe from the current time. Below that is a list of the devices that are currently being polled:

The YoLink MQTT Listener Device listens for MQTT messages and passes them on to the appropriate device to be handle. Open the MQTT Listener Device and insure the current state for MQTT in "connected". Click "Initialize" to disconnect and reconnect the MQTT connection and make sure there are no errors.

@SteveBarcus My (desktop browser) web page for the YoLink Device Service Status looks very different than your example screenshot. As you can see, there are no Scheduled Jobs shown.

It appears also that timed polling has ceased once again. I can send you log info for this device but since there are no polled events there are also no log entries unless I poll manually. Perhaps the logs for the YoLink Device Service would be more useful.

I wonder if my latest update from HPM did not complete successfully?

Ah, I've found a bug if you specify a polling interval less than 5 minutes. I'll fix it.

1 Like

The fix is now available using HPM. Use HPM to update the YoLink Device Service app and then run the app to completion.

You should now be able to press the gear next to the app and see a Scheduled Job like the following (the "Next Run Time" should update at the Polling Interval you've set - there will be no "Prev Run Time" shown.):

If you look at the Hubitat Past Logs and set the Level to "trace" and the "Filter by app/device" to "YoLink Device Service" you should see the polling being scheduled at the interval you've set (5 Minutes in this example):

1 Like

OK I got the update from HPM and it now seems to be polling successfully on the set interval of 2 minutes. (It's ironic that I set the interval to 2 minutes specifically because I was trying to debug the lack of polling and didn't want to sit around waiting for each 5 minute polling interval :roll_eyes: )

As far as the display on the YoLink Device Service app's Status page, I am not seeing any Child Devices listed there (I have 3 YoLink temp/humidity sensors and a contact sensor.) Similarly, I do not see a filtering option to set the debug Level to "trace" on the Hubitat Past Logs page.

Is it possible that the Hubitat mobile app you appear to be using has more status display capability than the web-based Hubitat interface I'm using on my desktop machine?

Are all the devices selected for installation in the YoLink Service App drop-down?

That log display functionality is in the Hubitat firmware, not the app. Looks like your Hubitat firmware may need to be updated. I'm currently running version 2.3.3.133:
Select "Check for Updates" in the Hubitat Settings:

  1. Create and download a Backup
  2. Update Hub
1 Like