Author Topic: Error in Lua and Conditional Scene Execution because of Internet connectivity  (Read 238 times)

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +2/-1
Sometimes Vera show Error in Lua for scenes and events when i have internet connectivity problems.
I think the reason it happen, it is because sometime i have problem with my internet connection and Vera cannot contact cloud device.
In a Conditional Scene Execution like this what can i change to prevent having error in lua... when i have connectivity problems?:

local dID = 89           -- Device ID of your DayTime plugin
local allow = true       -- true runs scene during daytime, false don t runs it at night
local status = luup.variable_get("urn:rts-services-com:serviceId:DayTime","Status",dID)
return ((status == "1") == allow)

Thanks

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +2/-1
English is not my native language, maybe explain in french?

Peut etre que les gens n ont pas compris ma question, car je suis pourris en anglais?

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1200
  • Karma: +56/-22
J'aimerai bien t'aider mais je ne vois aucune correlation entre ton script et une connection internet. Ton probl?me est ailleurs...
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (134 zwave nodes, 8 Zigbee nodes, 200 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +2/-1
Est ce quand m?me possible qu une mauvaise connexion internet puisse ?tre la cause de: Error in Lua for scenes and events?
Genre pour le plugin Wunderground Weather qui va chercher les infos sur le site de Wunderground.

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1200
  • Karma: +56/-22
Pas vraiment. Une mauvaise connection causera un luup reload qui a son tour peut cr?er un probl?me si le plugin ne redemarre pas totalement. Mais en general le plugin ou le code se crash en raison d'un bug ou d'un probl?me de timing parce que le vera n'a pas fini d'executer tous les codes dans le bon ordre.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (134 zwave nodes, 8 Zigbee nodes, 200 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +2/-1
Donc peut ?tre pas n?cessairement erreur dans mes conditions d ex?cution de scene, simplement erreur systeme.