Skip to content

Instantly share code, notes, and snippets.

@EmmanuelDemey
Created August 2, 2014 16:40
Show Gist options
  • Save EmmanuelDemey/1d916da0101494a2e2bf to your computer and use it in GitHub Desktop.
Save EmmanuelDemey/1d916da0101494a2e2bf to your computer and use it in GitHub Desktop.
var ZIBASE = "xxxxxxxxx";
var TOKEN = "xxxxxxx";
var action = "rowzibasecommand";
function runScenario () {
//Run the scénario 3
var param1 = "1";
var param2 = "3";
var param3 = "";
var param4 = "";
envoi = UrlFetchApp.fetch("https://zibase.net/m/zapi_remote_zibase_set.php?device=" + ZIBASE + "&token="+ TOKEN +
"&action="+action+"&param1=" + param1 + "&param2="+ param2 + "&param3=" + param3 + "&param4=" + param4);
}
function switchLight () {
//Switch on the light Chacon G2
var param1 = "0";
var param2 = "769";
var param3 = "1";
var param4 = "6";
envoi = UrlFetchApp.fetch("https://zibase.net/m/zapi_remote_zibase_set.php?device=" + ZIBASE + "&token="+ TOKEN +
"&action="+action+"&param1=" + param1 + "&param2="+ param2 + "&param3=" + param3 + "&param4=" + param4);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment