Aller au contenu

Kristiano

Membres confirmés
  • Compteur de contenus

    87
  • Inscription

  • Dernière visite

Tout ce qui a été posté par Kristiano

  1. Kristiano

    Support Gea

    Changed one line to "action = function (url)" But still the same error... Really happy with all suport. Thanks!
  2. Kristiano

    Support Gea

    @pepite Still gets the same error even changing to "=".
  3. Kristiano

    Support Gea

    Function issue GEA.options.httpRequest = { name = "HttpRequest" , action == function ( url ) local selfhttp = net . HTTPClient () selfhttp : request ( url , { options = { headers = selfhttp . ControlHeaders , method = 'PUT' , timeout = 5000 }, Success = function ( status ) fibaro : debug ( "STATUS" .. status . status ) fibaro : debug ( "DATA" .. status . data ) end , error = function ( err ) fibaro : debug ( "ERROR" .. err ) end }) end } end GEA.add({"Doorlock", id["UTILITY_DOOR"], 1}, -1, "", {"HttpRequest" , "https://10.0.1.1:80/set.php"}) I get the error that the Option is missing. "Option: HttpRequest is missing"
  4. Kristiano

    Support Gea

    Any idea to my problem about talking English? (I have know even changed the web dashboard to english). Still not working.
  5. Kristiano

    Support Gea

    I tried and it did not work. Just to be 100% sure its still "working" I removed the traduction and the above. Then the French is back again.
  6. Kristiano

    Support Gea

    Tried this but no speech is coming trough, only the push. Prev. it worked but only in French.
  7. Kristiano

    Support Gea

    Tried this but its now working. its really "en-EN" and not "en_EN" or "en_US"?
  8. Kristiano

    Support Gea

    Sweet! So I call the "central" function that I use for multiple urls and methods. How then to divert the different properties to different global variables? GEA.add({"JSONDecodeFromGlobal!", "MyVariable", "property_of_json",""}, 30, " {Result} ")
  9. Kristiano

    Support Gea

    Still struggling with my function that I got some help with. GEA.options.httpRequest = { name = "HttpRequest" , action == function ( url ) local selfhttp = net . HTTPClient () selfhttp : request ( url , { options = { headers = {["Authorization"] = 'Basic '..password, selfhttp . ControlHeaders , method = 'GET' , timeout = 5000 }, Success = function ( status ) fibaro : debug ( "STATUS" .. status . status ) fibaro : debug ( "DATA" .. status . data ) fibaro:setGlobal("MyVariable", status.data) end , error = function ( err ) fibaro : debug ( "ERROR" .. err ) end }) end } GEA.add({"JSONDecodeFromGlobal!", "MyVariable", "property_of_json",""}, 30, " {Result} ") How to call this function with multiple values? url and password. here is only the url. - How to add "password"? GEA.add({"Doorlock", id["UTILITY_DOOR"], 1}, -1, "", {"HttpRequest" , "https://10.0.1.1/get.php"}) - Can I share the function towards URLs that do not require a password? - Can I share the function if I want to use both GET/PUT? (Passing the method too)
  10. Kristiano

    Support Gea

    I did some check in the GEA code and it seems like its reading the "settings/info" to locate the language of the Fibaro Dashboard and since use Swedish there "se" the SonosTTS gets defaulted to French (Since Swedish is not available). Despite I set language "en" in my GEA code.
  11. Kristiano

    Support Gea

    My sonos is speaking French, why? The language is set to "en". Running GEA 6.06
  12. Kristiano

    Support Gea

    @nugget Thanks alot! And the GEA. add for the request would be like? How to pass the authorization? Should i create a local vable with the base64 encode? The result would be stored in a "temp" global variable with the complete structure decoded? How to get results? like result.status
  13. Kristiano

    Support Gea

    Hi, I have a struggle that I try to solve and hope that GEA could be the answer to my prayer. Id like to call a HTTPS service that response with a Json. Id like to read this Json and push the response to a virtual device. I need to create a external HTTPS service, done that. GEA.options.httpRequest = { name = "HttpRequest" , action == function ( url ) local selfhttp = net . HTTPClient () selfhttp : request ( url , { options = { headers = selfhttp . ControlHeaders , method = 'GET' , timeout = 5000 }, Success = function ( status ) fibaro : debug ( "STATUS" .. status . status ) fibaro : debug ( "DATA" .. status . data ) end , error = function ( err ) fibaro : debug ( "ERROR" .. err ) end }) end } - How to read the json response and put that to a virtual device. Eg. attributes as "Status" with key "On" or "Off". - How to trigger push notification when there is a status change. I guess I need to pass the response to a global variable to trigger the "-1" with GEA. Not only the virtual device text. - How to pass the authorization in the request as above? - Will it work passing a HTTPS request? The idea is to first by scene activation to trigger a PUT request to change an attribute. The value will be changed and then further on be picked up with the GET request and set the status change. This is for my Car charger. Trigger the charger to start and to catch the event that "Carcharging" is running. Thanks!
  14. Kristiano

    Support Gea

    ok, now i get it. First example with message translation the function both gets triggered and exists. trigger: local oldFunction = GEA . getMessage In this example we create another function but let the "gea.add" condition trigger the function. Thanks alot!
  15. Kristiano

    Support Gea

    Sweet! This worked and was exactly what I was looking for. Talking about functions, I currently created my own external REST call function. I created it outside of config() and setEvents() functions. correct? The GEA function and line like this. Is this correct? -- Custom functions function httpRequest(url) local selfhttp = net.HTTPClient() selfhttp:request(url, { options={ headers = selfhttp.controlHeaders, method = 'PUT', timeout = 5000 }, success = function(status) fibaro:debug("STATUS: "..status.status) fibaro:debug("DATA: "..status.data) end, error = function(err) fibaro:debug("ERROR: "..err) end }) end GEA.add({"Doorlock", id["UTILITY_DOOR"], 1}, -1, "", {{"Function", function() return httpRequest("https://10.0.1.1:80/start.php") end}})
  16. Kristiano

    Support Gea

    Thanks! This would def. work. But maybe its also possible to create a more generic function for all translation of substrings? eg. message = message:gsub("#date#", GEA.options.date.getValue()) message = message:gsub("#datefull#", GEA.options.datefull.getValue()) message = message:gsub("#trigger#", GEA.options.trigger.getValue()) message:gsub("#translate%(.-%)", function(c) local key, word = c:match("%((.-),(.-)%)") c = c:gsub("%[","%%%1"):gsub("%]","%%%1"):gsub("%(","%%%1"):gsub("%)","%%%1") message = message:gsub(c.."#", GEA.options.translate.getValue(key, word)) end) end -- Customer exit custom_exit_translation(message) return message function custome_exit_translation (message) message = message = message:gsub("#weekday#"), os.date("%A") end Becuse then i could store all custom translation in one generic custom exit and add multiple lines.
  17. Kristiano

    Support Gea

    I thought that in the message translation section were you substring eg. #time#, #datefull# etc that there Would be a custom exit to function customtranslation(message) and I could in this function write my own custom code for translations eg #weekday# today I need to enter your could to do my own translations and this requires some work upon upgrades. So I clean custom exit in “preferred” areas would be nice. @pepite @Steven
  18. Kristiano

    Support Gea

    Idea: Adding a function call in the translation section to a custom section. It would help to add my own translations. Like I now do for #weekday# to print Monday
  19. Kristiano

    Support Gea

    Thinking open minded, is it possible that the script starts at 21:59 and the the validation of the condition is true to turn it back on and then while passing on to the line to turn the light off the times goes and the clock reaches 22.00 and that condition is also true?
  20. Kristiano

    Support Gea

    Exactly! But the only automated turn off is at 22.00 and thats after 21.59. So it should not be considered.
  21. Kristiano

    Support Gea

    Yes but thats why i set the "force to keep it on to Sunset -> 21.59 rather then 22.00. The turn off is set to 22.00. So when if time is 21.59 and gets turned of manually the system will trigger a turnon. But if time were 22.00 it would not happen, and since the trigger for off is at 22.00 ->22.02 it should not get forced? i dont get it
  22. Kristiano

    Support Gea

    I have a problem that happens from time to time. I dont know if its the GEA code or the actual wallplug that couses this behavour. The problem is that at 10PM when the light supose to turn off, it turns off but goes immedately back to on. I cant recall whats cousing this "back to on" trigger. The actual light is only used in my GEA code and only in these lines. The "HALL_WALL" value is added as trigger in the top, to avoid the light to be turned off. Whats cousing this? GEA.add({"Time", "06:00", "06:02"}, 30, "", {"turnOn", id["HALL_WALL"]}) GEA.add({{"Days", "Weekdays"},{"Time", "09:00", "09:02"}}, 30, "", {"turnOff", id["HALL_WALL"]}) GEA.add({"Time", "Sunset-35", "Sunset-30"}, 30, "", {"turnOn", id["HALL_WALL"]}) GEA.add({"Time", "22:00", "22:02"}, 30, "", {"turnOff", id["HALL_WALL"]}) GEA.add({{"Value", id["HALL_WALL"], 0}, {"Time", "Sunset-35", "21:59"}}, -1, "", {"TurnOn", id["HALL_WALL"]})
  23. Kristiano

    Support Gea

    What about limitations in conditions and actions? How many can be used? eg. I got one GEA lines with 3 conditions but 8 actions. Is its better to use the same condition but split up the actions to multiple lines?
  24. Kristiano

    Support Gea

    Wishlist that I currently had to add my self: - External http request - Message translation “weekday” like Monday, Tuesday etc - Can get the Virtual device to work at all, its empty. My scene is called “GEA 6.04” - The VD to send a push notification if the GEA scene stopps. thanks!
  25. Kristiano

    Support Gea

    {"id":506,"name":"Förrådsdörr","roomID":473,"type":"com.fibaro.doorLock","baseType":"com.fibaro.securityMonitoring","enabled":true,"visible":true,"isPlugin":false,"parentId":0,"remoteGatewayId":1,"remoteDeviceID":32,"interfaces":["battery","fibaroFirmwareUpdate","pinCode","remoteGateway","zwave","zwaveAlarm"],"properties":{"alarmLevel":"0","alarmType":"0","batteryLevel":"100","batteryLowNotification":"true","configured":true,"dead":"false","defInterval":"0","deviceControlType":"0","deviceIcon":"1001","emailNotificationID":"0","emailNotificationType":"0","endPointId":"0","firmwareUpdate":"{\"info\":\"\",\"progress\":0,\"status\":\"UpToDate\",\"updateVersion\":\"1.0\"}","liliOffCommand":"","liliOnCommand":"","log":"","logTemp":"","manufacturer":"","markAsDead":"true","maxInterval":"0","maxUsers":"52","minInterval":"0","model":"","nodeId":"2","parameters":[],"parametersTemplate":"0","pollingTimeSec":0,"productInfo":"2,48,0,3,0,1,1,0","pushNotificationID":"0","pushNotificationType":"0","remoteGatewayId":"0","saveLogs":"true","secured":"255","serialNumber":"","smsNotificationID":"0","smsNotificationType":"0","stepInterval":"0","updateVersion":"","useTemplate":"false","userCodes":"[{\"id\":1,\"name\":\"\",\"status\":\"Unknown\",\"update\":\"InProgress\"},{\"id\":2,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":3,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":4,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":5,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":6,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":7,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":8,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":9,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":10,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":11,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":12,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":13,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":14,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":15,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":16,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":17,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":18,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":19,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":20,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":21,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":22,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":23,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":24,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":25,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":26,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":27,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":28,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":29,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":30,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":31,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":32,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":33,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":34,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":35,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":36,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":37,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":38,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":39,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":40,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":41,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":42,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":43,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":44,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":45,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":46,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":47,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":48,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":49,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":50,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":51,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"},{\"id\":52,\"name\":\"\",\"status\":\"Available\",\"update\":\"Ok\"}]","userDescription":"","value":"true","zwaveCompany":"","zwaveInfo":"3,4,5","zwaveVersion":"1.0"},"actions":{"abortUpdate":1,"getMaxUsers":0,"getUserCode":1,"reconfigure":0,"retryUpdate":1,"secure":0,"setInterval":1,"setUserCode":4,"startUpdate":1,"unsecure":0,"updateFirmware":1},"created":1515063713,"modified":1515063713,"sortOrder":162}
×
×
  • Créer...