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

That's correct. The actual battery levels reported by the YoLink devices are only 0, 1, 2, 3, and 4, which I translate as follows:
"0":0
'"1":25
'"2":50
'"3":75,
'"4":100

Ok, thanks much! The increments are fairly crude so I guess its not very useful unless I change all batteries when they reach 25%. Which BTW brings me to another question: I know it varies tremendously with use case but does anyone have any experience as to how long a sensor (say a leak sensor for example) will run once YoLink says it is at 25%? I suppose its just better to replace all the batteries once YoLink reports 25% but just curious if anyone has any experience. The two sensors/devices that seem to run the batteries down quicker in my use case is the Refrigerator/Freezer temp and humidity sensors (due to cold temps) and my Valve Controller (due to the power it takes to run the valve motor as well as the temperature variations where my valve controller is located). As always, thanks so much for your work on this and your help!

Updates to app and drivers released (Use HPM "Update" to install updated app and drivers):

  • New Functionality: COSmokeSensor Device event times formatted as specified by user
  • New Functionality: LeakSensor Device event time formatted as specified by user
  • Simplify donations

Current App and Driver Versions:
image

I can't help you much with that as many of my devices are fairly new. I would suggest that you use Lithium batteries in any devices that get cold, as they aren't as affected nearly as much as Alkaline batteries. They also tend to have a longer life, so you might want to use them in your valve manipulator as well.
I've had Lithiums in my deep freezer thermometer for several months (which is currently at -17.5°F) and they are still at 100%

1 Like

Thanks for the insight @SteveBarcus . I noted on all the YoLink product spec sheets that they always specify non-rechargeable Alkaline batteries (never mention Lithium batteries. Do you think they recommend this just due to the more linear discharge voltage compared to lithium batteries? Is their any problems with using lithium vs alkaline batteries in these devices. The only thing I can think of would be batteries indicating 100% with lithium batteries, then rapidly dropping to 25 or 0% suddenly rather than gradually going from 100%, then 75%, then 50%, then 25% with alkalines. Any insights/thoughts on this?

I tripped the contact sensor and it still is showing as closed. For the rule I have the trigger set for the when the door contact is open that it will send me a notification. Note the below picture that it still shows as contact "closed" when it is currently open

Event log for the rule shows no data, which is odd because I had tested this when I did the initial install and set up of this rule and hadn't changed anything between then and when it stopped working. :man_shrugging:

Umm, what type of device is this? I see the device's firmware doesn't match any of my door sensor devices.

Is this in fact a " Water Level Monitoring Sensor", because I see it's name "Water Storage Sensor"?
If so, that device is not supported yet. The different devices use the same driver name, but the responses and reports from the API may actually differ, If I don't yet have the device to see what those responses and reports are, then I'm not yet supporting it because I can't test it.

Currently Supported Devices

Thanks

I think most devices (not just YoLink) recommend using alkaline batteries vs plain old zinc-carbon batteries because of the voltage drain profile/capacity vs cost. Once you step up to Lithium the price is usually more prohibitive to use as your "default" battery choice.

Some manufacture's devices measure the actual voltage and allow specification of Alk vs Lithium to help compensate for the discharge profile in their "Battery Level" calculations. How low you allow a battery to go is usually dependent on the application, e.g., a temperature sensor used for non-critical monitoring you might let go to 25%, but a battery powered siren you might not want to go below 50%, or even 75%, lest they not have enough power left to sound the siren for a longer period of time.

I've never seen any battery-powered device warn that you can't use Lithium vs Alkalines.

Just my two cents. :slight_smile:

It's a contact sensor that I was planning on putting on my water storage tank. I am using the alkaline batteries that came with the device. This was just an example of one of the devices that I hadn't put up yet. The mailbox alert doesn't come through when the box is opened/closed. Mailbox is only about 200 feet away. For note, I do have this connected to HA (not sure if I mentioned that in the feed) and the alerts come through on there.

@SteveBarcus I really do appreciate your efforts and am still only a few months into the home automation set up. I did do an update and the alerts are still not coming across my phone. Maybe I should uninstall and reinstall the drivers on HA? I'm including a screen shot of the rule that I have set up for another contact sensor that may help diagnose my issue. The sensor isn't yet installed in its final location (sensor is presently sitting on my desk so that I can test it, and I don't really want to do the install in monsoon weather :wink:)

I have trigger this multiple times and the event log under this rule hasn't shown that it triggered. If there are additional screenshots that might be of help, I'd be happy to provide. Since I don't know 100% what information is sensitive, some of the data may be blocked out.

Try this:

  • Open the non-functioning device on the Hubitat in a browser window/tab.
  • Click the "Reset" command. This will reset all the internal settings and re-poll the device.
  • Look at the "Current States" :
    - If they correctly reflect the device's current state, then trigger the device and see if the states change to reflect the sensor's status. If not, then something's still not working.

If the Current States still aren't correctly reflecting the device's current state:

  • Open the Hubitat Logs in a NEW browser window/tab while leaving the device window/tab open.
  • Click the "Debug" command on the device with it set to "True" to enable the driver debugging.
  • In the log window, click on the device's name to see only the log entries for that device. The log should show that debugging was enabled.
  • Trigger the device and see if the log shows the device receiving alert messages.

@SteveBarcus

That solved the problem. Thank you, sir.

I'm not sure why this occurred, but the "lastResponse" changes from " API MQTT connected" to "Success" after I hit Reset

Hi @SteveBarcus,

Thanks for your insight. I actually called YoLink Support and after getting through some broken “Chinglish”, they also recommend (like you did) lithium batteries for low temp applications (like my frig/freezer sensors) and for potentially high drain applications (like my valve controller).

The only reason they do not list Lithium batteries in their recommended spec sheets for these devices (and only alkaline ones) is that they are concerned that people will inadvertently misunderstand and use Rechargeable Lithium Ion batteries (which we all know differ in the per cell voltage characteristics) instead of NON-rechargeable Lithium batteries which serve as a direct replacement for alkaline batteries of the same size (AA, AAA etc).

So once again, as in many things, it is primarily a legal/liability issue rather than a technical one (though I am not an electrical engineer, I could not figure out why they would not recommend using non-rechargeable lithium batteries in their devices over alkaline, except for the cost, hence my original question).

Interestingly, though, when speaking with the support tech, he mentioned that by using the lithium battery, I could expect up to 2 years or more or so of routine use (of course depending upon a number of factors), whereas with the alkaline batteries, I could expect about 6 months or so of use (at least in the frig/freezer use case). I just smiled at this “ah ha moment” as in all their spec sheets (which only recommend alkaline batteries), they state that the life expectancy for batteries in their devices is 2+ years of service, LOL. For what its worth though, my water leak sensors are going on 1 year now and still register 100% as they are not normally triggered (thank goodness). Don’t know how often they communicate with the hub though.

Anyway, thanks for taking the time to give me your input and experience (and thanks for the app!).

Resetting reestablishes the link with the YoLink cloud (API MQTT connected) and then polls the device ("Success"). The lastResponse is really only useful for debugging.

New Functionality: Updated SpeakerHub Driver to allow Rules Engine to send text message to the SpeakerHub. Use HPM to get the updated driver.

1 Like

Support has been added for the following devices:

  • Garage Door Controller (YS4906-UC)
  • Garage Door Sensor 2 (YS7706-UC)
  • Plug w/Power Monitoring (YS6602-UC)

Current App and Driver Versions:
image

The Garage Door Controller and Garage Door Sensor normally work independently of each other on Hubitat, i.e., you can use the Controller to open and close the door, but you must check the Sensor device to see the actual state of the sensor. However, I have added the ability to bind the Sensor to the Controller so you can use the Controller device to open and close the door and receive the state of the sensor on the Controller. Binding them is totally optional, but "GarageDoorControl" capabilities will not function properly on most dashboard apps unless a sensor is bound.

If you want to bind the Controller with the Sensor, here's how:

  1. Install both the Controller and Sensor on your YoLink Hub using the mobile app. The app will ask you to bind the two - THIS DOES NOT BIND THEM ON HUBITAT.

  2. Use the YoLink Device Service app on Hubitat to install the Controller and Sensor devices on your Hubitat. Verify that both devices are installed and working independently. The Controller should turn on momentarily to simulate a garage door button push and the Sensor indicates when the door is open and closed. (The Sensor should indicate "open" when it's facedown with the tape showing on top and "closed" when on its edge and you're reading the QR code on front like it's a book cover. If you lay it tape-side down it will not read "open"!)

  3. Open the Controller device on your Hubitat and scroll-down to the State Variables section. Your garage door sensor should be listed under "sensors" along with any other Door Sensors you have installed on Hubitat:

(If the Sensor is not shown, then scroll back up, click the "Scan" button, Close and Open the device window. The Sensor should now be showing in the list.)

  1. Select and Copy the device ID to the clipboard. You can copy just the part preceding the "=", or the whole line:

  2. Paste the ID into the Bind value in the top section and click the "Bind" button to bind the two devices:


    (Note: You can always unbind the devices by clicking "Bind" without any value specified)

  3. The device should show the devices are bound:

  4. Changes to the Door Sensor should now be reflected in the Controller (the bound Sensor is unaffected):

1 Like

Hubitat and Yolink integration is a fantastic marriage of the two. On 8/4/2022 the Yolink Speaker Hub started to return the following message:

confirmationBeep : false
wifi_enabled : true
type : SpeakerHub
wifi_ip : 192.168.**
tones : Emergency, Alert, Warn, Warning, Tip, Fire, Arpeggio, Chime-down, Chime-up, Warble, Whistle, Bing-Bong, Hi-Lo, Whoop
repeat : 0
wifi_mask : 255.255.255.0
wifi_ap : false
my_dni : yolink_SpeakerHub_d88b4c160400***
firmware : 0402
devId : d88b4c1604000***
lastText : Exception is: MqttException (0) - java.net.SocketTimeoutException: connect timed out
wifi_ssid : ***
debug : false
wifi_gateway : 192.168.*.*
ethernet_enabled : false
mute : unmuted
token : BFCDAB38237C2E346BDB73**********
volume : 16
driver : 1.0.4
lastPoll : 1662431220090
name : SpeakerHubOF
voiceResults : false
online : true
API : disconnected
homeID : a7c1d8c1340*********************

Preferences
Driver Version
YoLink™ SpeakerHub (YS1604-UC) v1.0.4

Has anyone else encountered this problem?

Is the hub functioning properly from the YoLink mobile app?
You're also not using the latest driver. Please use the Hubitat Package Manager "Update" function to get the latest drivers
Thanks.

The update to your program has resolved the problem. The speaker hubs are functioning properly in the Yolink and Hubitat apps.
Thank you

There seems to be a problem with the YoLink MQTT service connections timing out. I've asked YoLink to investigate.

This problem is causing SpeakerHubs to announce the error, "Unable to connect Speaker Hub to YoLink Cloud. Exception is: MqttException (0) - java.net.SocketTimeoutException: connect timed out". This happens every time the device is polled (every 5 minutes by default).

I've updated the SpeakerHub driver to stop the error announcement (it will still show in the Hubitat Log). Please use the Hubitat Package Manager "Update" function to get the latest SpeakerHub driver.