Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Météo openweathermap
#8
J'ai essayé ça... mais je suis pas doué... Blush

Si j'ai bien compris pour créer la variable interne string:
- je crée un "internal variable"
- je coche texte pour avoir un "internalString"
- en "Value", je lui met le lien internet correspondant à la direction du vent

Pour créer le script LUA :
- Je crée une nouvelle règle
- en "conditions" je met la variable interne que je viens de créer ?
- en "Actions" je fais un "Script Action" dans lequel je met le script qui va bien ?

J'ai bon ? J'ai oublié des choses ?


J'ai essayé de faire comme ca... et j'obtiens une erreur

Voila le script après modif :
local wind_direction = calaos:getInputValue("input_71")
if wind_direction >= 0 and wind_direction < 45 then
-- Nord
str = "Nord"
elseif wind_direction >= 315 and wind_direction < 0 then
-- Nord
str = "Nord"
elseif wind_direction >= 45 and wind_direction < 135 then
-- Est
str = "Est"
elseif wind_direction >= 135 and wind_direction < 225 then
-- Sud
str = "Sud"
elseif wind_direction >= 225 and wind_direction < 315 then
-- Ouest
str = "Ouest"

end
calaosConfusedetOutputValue("output_71", str)


Question :
- le "getInputValue("input_71")" : je met bien la valeur input de la variable que j'ai créée ?
- le setOutputValue("output_71", str) : La j'ai mis au pif... je sais pas à quoi ca correspond...


L'erreur obtenue :
Error Runtime error :
[string "CalaosScript"]:2: attempt to compare number with string
CALAOS V3 | WAGO 750-849 | NUC NUC5PPYH | Ecran tactile ELO 1537L avec Ampli VGA et adaptateur USB/RS232 Grillé Angry  |
Sondes PT1000 | DMX RGBW pour Rubans Leds 24v | Caméras POE Weisky
Reply


Messages In This Thread
Météo openweathermap - by Eric64 - 11-05-2014, 06:35 PM
RE: Météo openweathermap - by azerty - 11-05-2014, 07:11 PM
RE: Météo openweathermap - by captainigloo - 11-05-2014, 10:45 PM
RE: Météo openweathermap - by ActionProd - 01-02-2015, 03:23 PM
RE: Météo openweathermap - by Eric64 - 01-26-2015, 09:17 PM
RE: Météo openweathermap - by captainigloo - 01-26-2015, 09:44 PM
RE: Météo openweathermap - by Eric64 - 01-28-2015, 03:18 PM
RE: Météo openweathermap - by Eric64 - 01-30-2015, 11:32 PM
RE: Météo openweathermap - by Eric64 - 02-06-2015, 11:56 AM
RE: Météo openweathermap - by Eric64 - 03-11-2015, 05:03 PM
RE: Météo openweathermap - by raoulh - 03-12-2015, 09:43 AM
RE: Météo openweathermap - by Eric64 - 03-13-2015, 10:20 AM
RE: Météo openweathermap - by Eric64 - 03-23-2015, 07:24 PM
RE: Météo openweathermap - by raoulh - 03-23-2015, 08:46 PM
RE: Météo openweathermap - by Eric64 - 03-25-2015, 08:51 AM
RE: Météo openweathermap - by raoulh - 03-25-2015, 09:32 AM
RE: Météo openweathermap - by Eric64 - 03-25-2015, 02:28 PM
RE: Météo openweathermap - by Eric64 - 03-29-2015, 12:38 PM
RE: Météo openweathermap - by Eric64 - 05-15-2015, 02:50 PM
RE: Météo openweathermap - by Cyridle - 05-22-2015, 08:40 AM
RE: Météo openweathermap - by Eric64 - 05-26-2015, 10:14 PM
RE: Météo openweathermap - by Cyridle - 05-28-2015, 04:36 PM
RE: Météo openweathermap - by bernievds - 02-01-2017, 10:08 PM
RE: Météo openweathermap - by raoulh - 02-02-2017, 10:34 AM
RE: Météo openweathermap - by bernievds - 02-02-2017, 11:03 AM
RE: Météo openweathermap - by raoulh - 02-02-2017, 11:08 AM
RE: Météo openweathermap - by davidinfo - 02-05-2017, 01:58 AM
RE: Météo openweathermap - by bernievds - 02-13-2017, 07:39 PM
RE: Météo openweathermap - by davidinfo - 02-17-2017, 12:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)