Page 2 sur 2

Re: Weather Underground et THB

Publié : 04 janv. 2017, 17:18
par vil1driver
ah oui vu comme ça.. je comprends
ça ne m'a jamais dérangé d'avoir également l'humidité.. ainsi qu'un widget baro..
faut dire que je ne me sers pratiquement pas de l'interface de domoticz autrement que pour de la config

Re: Weather Underground et THB

Publié : 07 janv. 2017, 11:49
par Pixelman
Slt. Je reviens vers toi pour te proposer (peut-être) une solution pour l'affichage de tes deux valeurs.Dans le Wiki je suis tombé sur ça, regarde si ça fait le job en numérotant commandArray.

Code : Tout sélectionner

The commandArray also supports nested tables to send the same command type multiple times. To do this, give the command a numeric index (not alphanumeric with or without quotes!) and place the required action in a nested table:

 commandArray = {}
 commandArray[1]={['OpenURL']='www.cam1.com/api/movecamtopreset.cgi' }
 commandArray[2]={['OpenURL']='www.cam2.com/api/movecamtopreset.cgi' }
 commandArray[3]={['OpenURL']='www.cam3.com/api/movecamtopreset.cgi' }
 return commandArray

This will run three url commands with separate addresses. Always start the commandarray index at 1; Lua uses 1 based indexes, so commandArray[0] will not run.

Some examples (not meaningful, just to explain what will happen):

 commandArray = {}
 commandArray['Lamp']='On'
 commandArray[1]={['Lamp']='On'}
 commandArray[2]={['Lamp']='On'}
 commandArray[3]={['Lamp']='On'}
 commandArray['Lamp']='On'
 return commandArray

This will turn "Lamp" on 4 times (the last array item overwrites the first).

 commandArray = {}
 commandArray['Lamp']='On'
 commandArray[0]={['Lamp']='On'}
 commandArray[1]={['Lamp']='On'}
 commandArray[2]={['Lamp']='On'}
 commandArray['Lamp']='On'
 return commandArray

This will turn "Lamp" on 3 times (the last array item overwrites the first and the zero index is ignored)