I posted in the integration category today. I’ll let you know if I get anything.
Have you tried using Webcore? I’m able to populate a virtual temp sensor with a hardcoded string value. I’m looking to see how to import from Google Sheets with a “GET” command.
I figured out how to do this with Webcore and the Google Sheets API.
Can you describe your use scenario so I can point you in the right direction?
-What data are you trying to obtain (string, integer, etc)?
-How many cells do you want to gather data from?
You need to get an API key from Google associated with your Google account. This is a private number that I don’t think you want others to have access to. Go here to see how to get the key:
Essentially, you need to modify the portions in the brackets of the link below:
https://sheets.googleapis.com/v4/spreadsheets/[enter your spreadsheet ID here]/values/[enter your worksheet name here]![enter your cell that you want to read here]?key=[enter your API key here]
Paste this into the URL box of your browser and check what it returns on your screen. If everything worked correctly, you should see your value show up in a matrix. It will also tell you if you have an error. You can replace the cell portion with a range of cells by following the developers guide on Google.
This is what I get when I type in my URL:
“Report” is my worksheet.
“B23” is the cell I am reading.
“1.263” is the value of “B23” that I am interested in.
Let me know if this works for you, and I will explain the next steps of how to process the information in Smartthings.
Good. Now you should be able to login to the webCoRE dashboard from your computer and import this piston that I created with the import code 0mzz. You will need to modify some of the variable definitions with your API key, etc. You can also change how often it updates, but I suggest you let it stay at 30 seconds until you know it works.
Select your device you created in the second “with” command. In the photos it is “unknown device 3”.
There is a log you can watch after you save the piston. The log will output certain variables when the piston runs to verify that you are pulling the data.