Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Météo openweathermap
#20
Hello Eric64,

Ca fonctionne  Big Grin avec le code si dessous...
Ca ne s'affiche pas sur l'Iphone Confused  mais sur le CalaosWeb  OUI
Pas encore installer mon écran tactile donc sur Calaos OS je sais pas...

Actions sur Calaos Installeur
Créer Input --> WebInputAnalog (Orientation du Vent) et le masquer (visible == false)
Créer Output --> Créer InternalString (Orientation du Vent)
Ajouter Règle --> Human reading - Orinentation vent
Ajouter Condition --> Orientation du Vent == changed  
Ajouter Actions --> Script

Code:
-- Initialisation des variables
local wind_direction = calaos:getInputValue('input_44')
local str = 'Nord'
-- On positionne direct a 'nord'... si on rentre pas dans une condition du if c'est que c'est Nord...
if wind_direction >= 45 and wind_direction < 135 then
str = 'Est'
elseif wind_direction >= 135 and wind_direction < 225 then
str = 'Sud'
elseif wind_direction >= 225 and wind_direction < 315 then
str = 'Ouest'
end
str=str..' ('..tostring(wind_direction)..'°)' -- Affiche Ouest(272.5°)
calaos:setOutputValue('intern_1', str)
return true;

Voilou et Merci pour l'idée Wink
++
Cyridle
Calaos user
Calaos V2 Advantech 212D | Wago 750-849 | DALI | DMX RGBW | Sondes NTC sur 750-464 | Ecran tactile ELO | LMS/Squeezelite | NAS Synology 1515+

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)