15/05/2020, 19:51:33
(15/05/2020, 08:31:35)filou59 a écrit :Citation :Dans la partie knx.things le channel c'est bien la copie de la case fonction d'objet dans knx ?Précise un peu plus ta question car j'ai pas compris, tu parles de channel mais a quel niveau ? , et tu parles de case fonction d'objet dans knx , ou ca ?
Si besoin ajoute une capture d'ecran pour quon se comprenne.
Voici un petit exemple d'un test que j'avais commencé a effectué, faut que je m'y remette car je mettais arreté là :
KNX.things:
Code :Bridge knx:ip:WIEN731IP "Wienzierl IP Interface 731" @ "Platine de Test" [
type="TUNNEL",
ipAddress="192.168.1.8", //IP of KNX Gateway
portNumber=3671,
localIp="192.168.1.121", //IP of openhab Server
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
localSourceAddr="0.0.0",
autoReconnectPeriod=60 //optional, do not set <30 sec.
] {
Thing device KNX_AMI0816_1 "Sortie TOR + Mesure Conso" @ "Platine de Test" [ address="2.1.2", fetch=false, pinginterval=600, readinterval=0]
{
Type switch : Ch_ASw "A" [ ga="0/0/1+<0/1/1"]
Type switch : Ch_BSw "B" [ ga="0/0/2+<0/1/2"]
Type switch : Ch_CSw "C" [ ga="0/0/3+<0/1/3"]
Type switch : Ch_DSw "D" [ ga="0/0/4+<0/1/4"]
Type switch : Ch_ESw "E" [ ga="0/0/5+<0/1/5"]
Type switch : Ch_FSw "F" [ ga="0/0/6+<0/1/6"]
Type switch : Ch_GSw "G" [ ga="0/0/7+<0/1/7"]
Type switch : Ch_HSw "H" [ ga="0/0/8+<0/1/8"]
Type number : Ch_AIn "Courant A" [ ga="7.012:<0/2/1" ]
Type number : Ch_BIn "Courant B" [ ga="7.012:<0/2/2" ]
Type number : Ch_CIn "Courant C" [ ga="7.012:<0/2/3" ]
Type number : Ch_DIn "Courant D" [ ga="7.012:<0/2/4" ]
Type number : Ch_EIn "Courant E" [ ga="7.012:<0/2/5" ]
Type number : Ch_FIn "Courant F" [ ga="7.012:<0/2/6" ]
Type number : Ch_GIn "Courant G" [ ga="7.012:<0/2/7" ]
Type number : Ch_HIn "Courant H" [ ga="7.012:<0/2/8" ]
}
}
Bridge knx:ip:MDTROUTER "MDT SCN-IP100.02" @ "KNX Maison" [
type="ROUTER",
ipAddress="224.0.23.12",
portNumber=3671,
localIp="192.168.1.9",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
localSourceAddr="0.0.0",
autoReconnectPeriod=60 //optional, do not set <30 sec.
] {
Thing device KNX_AMS1216_1 "Sortie TOR + Mesure Conso" @ "TGBT" [ address="1.1.8", fetch=false, pinginterval=600, readinterval=0
//readInterval=3600 //optional, only used if reading values are present
] {
//Items configurations
//Status : 1/2/8
//Switch : 1/0/8
//L8 P11 Small LED
//Type switch : Ch_11 "Channel 1.1" [ ga="1/0/8+<1/2/8" ]
Type switch : Ch_ASw "PC Livebox" [ ga="3/1/1+<3/2/1"]
Type switch : Ch_BSw "PC Ampli SAT" [ ga="3/1/2+<3/2/2"]
Type switch : Ch_CSw "PC KVM IP" [ ga="3/1/3+<3/2/3"]
Type switch : Ch_DSw "PC Norco" [ ga="3/1/4+<3/2/4"]
Type switch : Ch_ESw "PC Fantec1 picoPSU" [ ga="3/1/5+<3/2/5"]
Type switch : Ch_FSw "PC Q431" [ ga="3/1/6+<3/2/6"]
Type switch : Ch_GSw "PC Q451" [ ga="3/1/7+<3/2/7"]
Type switch : Ch_HSw "PC Fantec2" [ ga="3/1/8+<3/2/8"]
Type switch : Ch_ISw "PC Switch 10/100" [ ga="3/1/9+<3/2/9"]
Type switch : Ch_JSw "PC Switch Giga" [ ga="3/1/10+<3/2/10"]
Type switch : Ch_KSw "PC Proxmox H2 Routeur" [ ga="3/1/11+<3/2/11"]
Type switch : Ch_LSw "PC Ecran 7p" [ ga="3/1/12+<3/2/12"]
Type number : Ch_AIn "Courant Livebox" [ ga="7.012:<3/3/1" ]
Type number : Ch_BIn "Courant Ampli SAT" [ ga="7.012:<3/3/2" ]
Type number : Ch_CIn "Courant KVM IP" [ ga="7.012:<3/3/3" ]
Type number : Ch_DIn "Courant Norco" [ ga="7.012:<3/3/4" ]
Type number : Ch_EIn "Courant Fantec1 picoPSU" [ ga="7.012:<3/3/5" ]
Type number : Ch_FIn "Courant Q431" [ ga="7.012:<3/3/6" ]
Type number : Ch_GIn "Courant Q451" [ ga="7.012:<3/3/7" ]
Type number : Ch_HIn "Courant Fantec2" [ ga="7.012:<3/3/8" ]
Type number : Ch_IIn "Courant Switch 10/100" [ ga="7.012:<3/3/9" ]
Type number : Ch_JIn "Courant Switch Giga" [ ga="7.012:<3/3/10" ]
Type number : Ch_KIn "Courant Proxmox H2 Routeur" [ ga="7.012:<3/3/11" ]
Type number : Ch_LIn "Courant Ecran 7p" [ ga="7.012:<3/3/12" ]
}
KNX.items :
Code PHP :Switch Ch_ASw "PC Livebox [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_ASw" }
Switch Ch_BSw "PC Ampli SAT [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_BSw" }
Switch Ch_CSw "PC KVM IP [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_CSw" }
Switch Ch_DSw "PC Norco [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_DSw" }
Switch Ch_ESw "PC Fantec1 picoPSU [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_ESw" }
Switch Ch_FSw "PC Q431 [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_FSw" }
Switch Ch_GSw "PC Q451 [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_GSw" }
Switch Ch_HSw "PC Fantec2 [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_HSw" }
Switch Ch_ISw "PC Switch 10/100 [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_ISw" }
Switch Ch_JSw "PC Switch Giga [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_JSw" }
Switch Ch_KSw "PC Proxmox H2 Routeur [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_KSw" }
Switch Ch_LSw "PC Ecran 7p [%s]" <switch> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_LSw" }
Number Ch_AIn "Courant Livebox [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_AIn" }
Number Ch_BIn "Courant Ampli SAT [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_BIn" }
Number Ch_CIn "Courant KVM IP [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_CIn" }
Number Ch_DIn "Courant Norco [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_DIn" }
Number Ch_EIn "Courant Fantec1 picoPSU [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_EIn" }
Number Ch_FIn "Courant Q431 [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_FIn" }
Number Ch_GIn "Courant Q451 [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_GIn" }
Number Ch_HIn "Courant Fantec2 [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_HIn" }
Number Ch_IIn "Courant Switch 10/100 [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_IIn" }
Number Ch_JIn "Courant Switch Giga [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_JIn" }
Number Ch_KIn "Courant Proxmox H2 Routeur [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_KIn" }
Number Ch_LIn "Courant Ecran 7p [%d mA]" <energy> { channel="knx:device:MDTROUTER:KNX_AMS1216_1:Ch_LIn" }
Switch P118_Ch_ASw "A" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_ASw" }
Switch P118_Ch_BSw "B" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_BSw" }
Switch P118_Ch_CSw "C" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_CSw" }
Switch P118_Ch_DSw "D" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_DSw" }
Switch P118_Ch_ESw "E" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_ESw" }
Switch P118_Ch_FSw "F" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_FSw" }
Switch P118_Ch_GSw "G" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_GSw" }
Switch P118_Ch_HSw "H" <switch> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_HSw" }
Number P118_Ch_AIn "Courant A [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_AIn" }
Number P118_Ch_BIn "Courant B [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_BIn" }
Number P118_Ch_CIn "Courant C [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_CIn" }
Number P118_Ch_DIn "Courant D [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_DIn" }
Number P118_Ch_EIn "Courant E [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_EIn" }
Number P118_Ch_FIn "Courant F [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_FIn" }
Number P118_Ch_GIn "Courant G [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_GIn" }
Number P118_Ch_HIn "Courant H [%d mA]" <energy> { channel="knx:device:WIEN731IP:KNX_AMI0816_1:Ch_HIn" }
Pour rappel il y a un petit script things2item.sh qui permet de générer le fichier a partir du 1er.
Voici la partie que j'ai deja ecrite :
Bridge knx:ip:bridge "Ip Interface N148/22" @ "KNX" [
type="TUNNEL",
ipAddress="192.168.50.230",
portNumber=3671,
localIp="192.168.50.113",
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=30,
localSourceAddr="1.0.123" ]{
Thing device A1 Act. stores/commut. REG-K/8x/16x/10 à cde. Manu. "Switch Actuator 16" @ "KNX" [ address="1.0.4", fetch=false, pingInterval=600, readInterval=0 ]
{
Type switch : Channel_1A "Channel 1.A" [ ga="0/0/25+<0/0/26" ]
Type switch : Channel_1B "Channel 1.B" [ ga="1/0/42+<1/2/43" ]
Type switch : Channel_2A "Channel 2.A" [ ga="0/0/45+<0/0/46" ]
Type switch : Channel_2B "Channel 2.B" [ ga="1/0/15+<1/2/15" ]
}
}
/* A1 */
Switch P11_Placard "P11 lacard " <switch> (gGF_P11_Chambre parent placard,gGF_Lumiere,gKNX) { channel="knx:device:N148/22:a:Ch_1A" }
Switch P11_Pc_com_droit "P11 Pc com droit" <switch> (gGF_P11_ch Parents,gGF_Lumiere,gKNX) { channel="knx:device:N148/22:a:Ch_1B" }
Switch P11_Placard "P11 Placard " <switch> (gGF_P11_salon placard,gGF_Lumiere,gKNX) { channel="knx:device:N148/22:a:Ch_2A" }
Switch P11_Plafond "P11 Plafond" <switch> (gGF_P11_ch Parents,gGF_Lumiere,gKNX) { channel="knx:device:N148/22:a:Ch_2B" }
Si je comprend bien, la partie que j'ai mi en rouge n'est pas importante, elle sert juste a ce repérer ? et la verte c'est celle qui apparait dans la partie visu de openhab ?
Avec les deux fichiers écrit il n'y a rien qui apparais dans paper iu, je pense que j ai du faire une erreur dans la prog de ma passerelle knx. Les 2 ip et le port sont ok, il n'y a que la partie la que je ne maitrise pas -> Bridge knx:ip:bridge "Ip Interface N148/22" @ "KNX" [ ? ou la partie items ?
Pour rappel il y a un petit script things2item.sh qui permet de générer le fichier a partir du 1er. Ou trouver ce script ?
Voit tu des erreurs ou des choses a améliorer ?
Merci
Bonne journée.