Code Monkey home page Code Monkey logo

device-plantlink-direct's Introduction

PlantLink Direct Device

SmartThings Direct Implementation of the PlantLink Moisture Sensor. This is an "offline" implementation of Oso Tech's PlantLink device. This is a very affordable dynamic range Zigbee moisture sensor that only costs $30. The battery life is excellent, the durability is fairly good -- just don't waterlog them for too long or leave them outside in the winter.

This SmartThings device type removes the need for the PlantLink Hub. It saves you money, but you also lose some of the Oso Tech functionality like being able to specify alerts based on your plant type. This implementation still allows you to get alerts based on your soil type, which is also very important.

You can set alerts based on Moisture (Dry/Wet) or by a Relative Humidity percentage. Both are supported by the device capabilities and should be compatible with most SmartApps.

Installation

  • Open the SmartThings Device Types console. Click "From Code" and paste the device type.
  • Open your SmartThings UI and click "Add new device"
  • Pull the batteries from your Link and wait 30 seconds. Then insert the batteries and hit the only button on the device.
  • SmartThings should instantly recognize your Plant Link and will report your first measurement within 20 minutes.
  • When you open the new device for the first time, hit "Preferences"

  • From here you can pick a soil type. Picking the wrong soil type will give you a completely different reading so try to get close!

* That's it, you're done! Wait 15-20 minutes and you will get your first reading. Each additional reading will come in every 15 minutes or so until the Link runs out of batteries.

Picking Soil

This device works by calculating the resistance of an electrical current through the soil. Dry soil is known to resist at a certain value. The resistance can change depending on the soil salinity, temperature and, most importantly, moisture. Soil types are defined in the United States by this handy chart.

If you don't know what kind of soil you have, CSU has this nifty chart:

Source: Colorado Master Gardener Program

Troubleshooting

After interacting with Plant Link for some time, there are a few caveats I noticed. The Plant Links will not mesh with each other, or any other battery powered Zigbee device. You can use a Zigbee wall switch like a SmartThings SmartPower to mesh your network. However, if you put your Links far away from the SmartThings Hub, you will probably have dropped reports from time to time.

Getting the Links to pair can be tricky if you have already paired the devices with a Hub. Just keep repeating the process, it will work if you are patient.

Exposing your Links to excessive water can be a bad thing. The housing is reasonably water proof, but if you leave it in standing water, particularly with fluctuating temperatures, water will get into the PCB and start to corode the components. Mine have taken a pretty solid beating, but you will get more life out of your Links if you keep them away from standing water.

Notes

This is literally my third attempt at creating a PlantLink device type for SmartThings. I previously created a device that only read the PlantLink API, and the device was not paired with the SmartThings Hub. Dan Widing at Oso Tech then worked with me to create a second device and connector SmartApp that would pair the Link with the ST Hub, but then communicate with the PlantLink API to get the resistivity measurements to then calculate moisture. Although this was a noble goal, it had a lot of complexity that was difficult to work through.

This attempt calculates the resistance of the soil based on the internal voltage reading from the PlantLink device. Oso Tech very generously provided me with guidance on how to calculate the resistance given this measurement.

Bugs

The PlantLink device does not broadcast out a moisture reading. It instead broadcasts a voltage that has to be converted to a resistance value based on a whole bunch of assumptions, including the soil type (which you defined) and temperature, salinity, etc.

Temperature is currently not taken into account with this device. This will not affect most Links that are inside, or Links that stay between 50°F and 100°F. At 32°F, the PlantLink will report at or near 0%. In between 32°F and 50°F, your PlantLink will probably report a lower moisture % than really exists.

License

Copyright (c) 2015, Kristopher Kubicki, Oso Tech, The Product Manufactory, SmartThings and Stan Dotson All rights reserved.

device-plantlink-direct's People

Contributors

kristopherkubicki avatar

Stargazers

 avatar James Cocker avatar Katie Te Nahu Owen avatar Ryan Ray Neff avatar  avatar  avatar Paul Picazo avatar  avatar David Abigt avatar Dillan Laughlin avatar Jesse Newland avatar Stan avatar  avatar

Watchers

 avatar James Cloos avatar  avatar Stan avatar  avatar  avatar  avatar

device-plantlink-direct's Issues

Moisture level always at 0%

Unfortunately the moisture level is always at 0% for me using your implementation.

The Plantlink Sensor is connected properly and the battery status is accurate, but regardless of the soil type or water needs the moisture level never changes.

I am afraid this code is no longer working with the current SmartThings API?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.