So here is what I am trying to do. I want to somehow read a table data element from a website and have that data either populate in my Cayenne dashboard or use it to trigger an event.
Right now I have a Google Sheet that is populated with a lake’s water depth off of a website. I want to somehow trigger an event based on changes to the water depth data item. is there a way to somehow do this using either Google sheets or some other way?
I have a floating boat dock on Norris Lake in TN. Right now I am using a Cayenne dashboard to actuate winches that adjust the cables for fluctuations in lake water level. The lake level is constantly updated and I have that feeding into a Google Sheet - I want to somehow use a trigger or otherwise to automatically trigger an alert and actuate my cable winches for a certain drop or increase in lake level.
Is there a way to do this?
why don’t you directly measure water level and send it to cayenne with a microcontroller and water level sensor?
that’s a fair question. I have not been able to find a sensor that will measure water depth down to 25-30 feet- which is what I am dealing with off the dock. Is there one that will work with Cayenne?
you got to find the sensor which can get connected to supported hardware Cayenne Docs then it will work with cayenne.
My other concern: As the water rises the dock cables are pulled in and the dock “travels” up a sloped bank via wheels on the shore-side of the ramp. The sensor is likely to encounter rocks and ledges that will throw off the reading. Since multiple sites publish and update the lake level daily as a function of feet above sea level - I thought that would be most reliable if I can somehow get Cayenne to recognize it
there will be API where you get the sensor data using python and send it to cayenne using GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API
Thank you - but is this saying there will be an API or there is already a solution? Sorry but I am not a computer programmer - is there a narrative or description? The GitHub link does not especially help me
You are getting your data from a website? so the process will be:-
Website Data -----> API ------> Get Data (request library) -----> Send Data (Cayenne Python Library) -----> Cayenne.
This all will be done in a single python code. you will need to get the data using the python request
library by calling the get method Requests: HTTP for Humans™ — Requests 2.28.1 documentation then parse the required data and send it to cayenne using GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API
Awesome – this looks like it will provide me the resources I need.
Thank You! – and I will let you know how it works out
i also came across this tutorial on google sheet API https://www.analyticsvidhya.com/blog/2020/07/read-and-update-google-spreadsheets-with-python/
so you can use the data from the google sheet directly.