Google drive

It’s possible to use the drive.persist? I found only this:
http://tom-openhab-clone.googlecode.com/hg-history/410afe4eb92643562abe5774c60509f14c1a82e9/bundles/persistence/org.openhab.persistence.drive/README
but there isn’t an addon for google drive

See this GitHub issue. It appears that it was difficult to configure and use so the developer and leadership team decided to abandon it. It never became officially part of the supported openHAB binding set.

You can try to contact the author (see the link above) and see if you can get it from him and see whether it is something you can use.

Oh… great…
thanks for the response

You can always use IFTTT, webhooks, and google drive. This is how I am doing my greenhouse logging.

This is what my rule looks like:

rule "Greenhouse Log temp and hum"
when
	Time cron "0 0 * ? * *" // Once an hour
then
	var itemName = "Temperature"
	var value = GreenhouseTemperature.state
	sendHttpPostRequest("https://maker.ifttt.com/trigger/greenhouseLog/with/key/XXXXXXXXX-XXXXXXXXXXXX", "application/json", "{ \"value1\" : \"" + itemName + "\", \"value2\" : \"" + value + "\" }")
end

Then in IFTTT you make a new applet using if This (Webhooks) then that (Google Sheets).
Make sure you select the “Add row to spreadsheet” option. This is how I set up my applet.

2 Likes

Hello,
I’m trying to use your method (IFTTT) for pushing a values in a google sheet. I’ve created the applet and tested the webhook on IFTTT, and it does work fine, I can find every value I send in my google sheet.

Here you can find the rule I’m using. I’ve implemented a virtual switch ("SaveYesterdayKWvalue ") to starting manualy the rule execution:

when 
    Item SaveYesterdayKWvalue received command
then
    if (receivedCommand == ON) {
        var itemName = "sonoff_pow_gen_watted_yesterday"
        var value = sonoff_pow_gen_watted_yesterday.state
        sendHttpPostRequest("https://maker.ifttt.com/trigger/SonoffPowGeneraleWattedYesterday/with/key/******************","application/json", "{ \"value1\" : \"" + value + "\"}")
    }
end

When I try to send the value with the rule, sometimes it works pushing the value on google sheet, while at other times it gives me an error (see below):

[ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.TimeoutException: Total timeout 1000 ms elapsed

What can I do?

Solution:
I added a high “timout” value (10000) in “sendHttpPostRequest”. See below:

when 
    Item SaveYesterdayKWvalue received command
then
    if (receivedCommand == ON) {
        var itemName = "sonoff_pow_gen_watted_yesterday"
        var value = sonoff_pow_gen_watted_yesterday.state
        sendHttpPostRequest("https://maker.ifttt.com/trigger/SonoffPowGeneraleWattedYesterday/with/key/******************","application/json", "{ \"value1\" : \"" + value + "\"}",10000)
    }
end