aide pour réalisation script en lua

Forum dédié aux problématiques concernant les scripts pour DomoticZ.
Entourez votre code et les logs avec les balises nommées code grâce au bouton <\>.
vr6man
Messages : 627
Inscription : 18 juil. 2017, 12:15

Re: aide pour réalisation script en lua

Message par vr6man »

impossible d'obtenir les 2 en même temps

J'ai cliquez 30 fois sur Nuit
  • 2020-05-13 21:33:45.601 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:45.601 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:45.638 Status: User: Admin initiated a switch command (539/Nuit/Off)
    2020-05-13 21:33:45.722 Status: LUA: Device based event fired on 'Lumiere Chalet', value 'Off'
    2020-05-13 21:33:45.722 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:45.722 Status: LUA: End event fired on Lumiere Chalet
    2020-05-13 21:33:45.838 Status: LUA: Device based event fired on 'Lumiere Terrasse_Temperature', value '9.5'
    2020-05-13 21:33:45.838 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:45.838 Status: LUA: End event fired on Lumiere Terrasse_Temperature
    2020-05-13 21:33:45.838 Status: LUA: Device based event fired on 'Lumiere Terrasse', value 'Off'
    2020-05-13 21:33:45.838 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:45.838 Status: LUA: End event fired on Lumiere Terrasse
    2020-05-13 21:33:45.897 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_fermeture_store.lua
    2020-05-13 21:33:45.956 Status: LUA: Device based event fired on 'Nuit', value 'On'
    2020-05-13 21:33:45.956 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:45.956 Status: LUA: Device Nuit detected
    2020-05-13 21:33:45.956 Status: LUA: Nuit is On
    2020-05-13 21:33:45.956 Status: LUA: otherdevices['Store Terrasse'] Off
    2020-05-13 21:33:45.956 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:45.957 Status: EventSystem: Script event triggered: Script #1
    2020-05-13 21:33:46.074 Status: LUA: Device based event fired on 'Lumiere TV', value 'Off'
    2020-05-13 21:33:46.074 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:46.074 Status: LUA: End event fired on Lumiere TV
    2020-05-13 21:33:46.331 Status: LUA: Device based event fired on 'conso vmc_Utility', value '9.3999996185303'
    2020-05-13 21:33:46.331 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:46.331 Status: LUA: End event fired on conso vmc_Utility
    2020-05-13 21:33:46.331 Status: LUA: Device based event fired on 'conso vmc', value '9.4'
    2020-05-13 21:33:46.331 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:46.331 Status: LUA: End event fired on conso vmc
    2020-05-13 21:33:46.446 Status: LUA: Device based event fired on 'kWh Meter vmc', value '9.400;53200.000'
    2020-05-13 21:33:46.447 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:46.447 Status: LUA: End event fired on kWh Meter vmc
    2020-05-13 21:33:46.447 Status: LUA: Device based event fired on 'kWh Meter vmc_Utility', value '9.3999996185303'
    2020-05-13 21:33:46.447 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:46.447 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:46.476 Status: LUA: Eclairage Chalet a été éteint
    2020-05-13 21:33:46.476 Status: LUA: Eclairage TV a été éteint
    2020-05-13 21:33:46.476 Status: LUA: Eclairage terrasse a été éteint
    2020-05-13 21:33:46.478 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_CtrlLumiereJardin.lua
    2020-05-13 21:33:46.497 Status: User: Admin initiated a switch command (539/Nuit/On)
    2020-05-13 21:33:46.518 Status: Notification: Extinction Lumiere Chalet
    2020-05-13 21:33:46.570 Status: LUA: Device based event fired on 'Nuit', value 'Off'
    2020-05-13 21:33:46.570 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:46.570 Status: LUA: Device Nuit detected
    2020-05-13 21:33:46.570 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:46.602 Status: Notification: Extinction Lumiere Terrasse
    2020-05-13 21:33:46.779 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_fermeture_store.lua
    2020-05-13 21:33:46.845 Status: LUA: Device based event fired on 'Nuit', value 'On'
    2020-05-13 21:33:46.845 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:46.845 Status: LUA: Device Nuit detected
    2020-05-13 21:33:46.845 Status: LUA: Nuit is On
    2020-05-13 21:33:46.845 Status: LUA: otherdevices['Store Terrasse'] Off
    2020-05-13 21:33:46.845 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:46.846 Status: EventSystem: Script event triggered: Script #1
    2020-05-13 21:33:46.971 Status: LUA: Device based event fired on 'Lumiere Chalet', value 'Off'
    2020-05-13 21:33:46.971 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:46.971 Status: LUA: End event fired on Lumiere Chalet
    2020-05-13 21:33:47.222 Status: User: Admin initiated a switch command (539/Nuit/Off)
    2020-05-13 21:33:47.230 Status: LUA: Device based event fired on 'Lumiere TV', value 'Off'
    2020-05-13 21:33:47.231 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:47.231 Status: LUA: End event fired on Lumiere TV
    2020-05-13 21:33:47.351 Status: LUA: Device based event fired on 'Lumiere Terrasse', value 'Off'
    2020-05-13 21:33:47.351 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:47.351 Status: LUA: End event fired on Lumiere Terrasse
    2020-05-13 21:33:47.351 Status: LUA: Device based event fired on 'Lumiere Terrasse_Temperature', value '9.5'
    2020-05-13 21:33:47.351 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:47.351 Status: LUA: End event fired on Lumiere Terrasse_Temperature
    2020-05-13 21:33:47.531 Status: LUA: Eclairage Chalet a été éteint
    2020-05-13 21:33:47.531 Status: LUA: Eclairage TV a été éteint
    2020-05-13 21:33:47.532 Status: LUA: Eclairage terrasse a été éteint
    2020-05-13 21:33:47.533 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_CtrlLumiereJardin.lua
    2020-05-13 21:33:47.541 Status: Notification: Extinction Lumiere Terrasse
    2020-05-13 21:33:47.628 Status: Notification: Extinction Lumiere Chalet
    2020-05-13 21:33:47.635 Status: LUA: Device based event fired on 'Nuit', value 'Off'
    2020-05-13 21:33:47.635 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:47.635 Status: LUA: Device Nuit detected
    2020-05-13 21:33:47.635 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:47.895 Status: LUA: Device based event fired on 'Lumiere Terrasse_Temperature', value '9.5'
    2020-05-13 21:33:47.897 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:47.897 Status: LUA: End event fired on Lumiere Terrasse_Temperature
    2020-05-13 21:33:47.897 Status: LUA: Device based event fired on 'Lumiere Terrasse', value 'Off'
    2020-05-13 21:33:47.897 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:47.897 Status: LUA: End event fired on Lumiere Terrasse
    2020-05-13 21:33:48.011 Status: LUA: Device based event fired on 'Lumiere TV', value 'Off'
    2020-05-13 21:33:48.011 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:48.011 Status: LUA: End event fired on Lumiere TV
    2020-05-13 21:33:48.048 Status: User: Admin initiated a switch command (539/Nuit/On)
    2020-05-13 21:33:48.128 Status: LUA: Device based event fired on 'Lumiere Chalet', value 'Off'
    2020-05-13 21:33:48.128 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:48.128 Status: LUA: End event fired on Lumiere Chalet
    2020-05-13 21:33:48.145 Status: OpenZWave: Received timeout notification from HomeID: 3616049346, NodeID: 56 (0x38)
    2020-05-13 21:33:48.330 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_fermeture_store.lua
    2020-05-13 21:33:48.386 Status: LUA: Device based event fired on 'Nuit', value 'On'
    2020-05-13 21:33:48.388 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:48.388 Status: LUA: Device Nuit detected
    2020-05-13 21:33:48.388 Status: LUA: Nuit is On
    2020-05-13 21:33:48.388 Status: LUA: otherdevices['Store Terrasse'] Off
    2020-05-13 21:33:48.388 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:48.388 Status: EventSystem: Script event triggered: Script #1
    2020-05-13 21:33:48.819 Status: User: Admin initiated a switch command (539/Nuit/Off)
    2020-05-13 21:33:51.556 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_fermeture_store.lua
    2020-05-13 21:33:51.612 Status: LUA: Device based event fired on 'Nuit', value 'On'
    2020-05-13 21:33:51.612 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:51.612 Status: LUA: Device Nuit detected
    2020-05-13 21:33:51.612 Status: LUA: Nuit is On
    2020-05-13 21:33:51.612 Status: LUA: otherdevices['Store Terrasse'] Off
    2020-05-13 21:33:51.612 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:51.613 Status: EventSystem: Script event triggered: Script #1
    2020-05-13 21:33:51.724 Status: LUA: Device based event fired on 'Lumiere Chalet', value 'Off'
    2020-05-13 21:33:51.724 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:51.724 Status: LUA: End event fired on Lumiere Chalet
    2020-05-13 21:33:51.834 Status: LUA: Device based event fired on 'Lumiere Terrasse_Temperature', value '9.5'
    2020-05-13 21:33:51.834 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:51.835 Status: LUA: End event fired on Lumiere Terrasse_Temperature
    2020-05-13 21:33:51.835 Status: LUA: Device based event fired on 'Lumiere Terrasse', value 'Off'
    2020-05-13 21:33:51.835 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:51.835 Status: LUA: End event fired on Lumiere Terrasse
    2020-05-13 21:33:51.945 Status: LUA: Device based event fired on 'Lumiere TV', value 'Off'
    2020-05-13 21:33:51.945 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:51.945 Status: LUA: End event fired on Lumiere TV
    2020-05-13 21:33:51.999 Status: User: Admin initiated a switch command (539/Nuit/On)
    2020-05-13 21:33:52.113 Status: LUA: Eclairage Chalet a été éteint
    2020-05-13 21:33:52.113 Status: LUA: Eclairage TV a été éteint
    2020-05-13 21:33:52.113 Status: LUA: Eclairage terrasse a été éteint
    2020-05-13 21:33:52.115 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_CtrlLumiereJardin.lua
    2020-05-13 21:33:52.213 Status: LUA: Device based event fired on 'Nuit', value 'Off'
    2020-05-13 21:33:52.213 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:52.213 Status: LUA: Device Nuit detected
    2020-05-13 21:33:52.213 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:52.223 Status: Notification: Extinction Lumiere Chalet
    2020-05-13 21:33:52.245 Status: Notification: Extinction Lumiere Terrasse
    2020-05-13 21:33:52.455 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_fermeture_store.lua
    2020-05-13 21:33:52.516 Status: LUA: Device based event fired on 'Nuit', value 'On'
    2020-05-13 21:33:52.516 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:52.516 Status: LUA: Device Nuit detected
    2020-05-13 21:33:52.516 Status: LUA: Nuit is On
    2020-05-13 21:33:52.516 Status: LUA: otherdevices['Store Terrasse'] Off
    2020-05-13 21:33:52.516 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:52.517 Status: EventSystem: Script event triggered: Script #1
    2020-05-13 21:33:52.543 Status: User: Admin initiated a switch command (539/Nuit/Off)
    2020-05-13 21:33:52.640 Status: LUA: Device based event fired on 'conso vmc_Utility', value '8.3999996185303'
    2020-05-13 21:33:52.640 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:52.640 Status: LUA: End event fired on conso vmc_Utility
    2020-05-13 21:33:52.640 Status: LUA: Device based event fired on 'conso vmc', value '8.6'
    2020-05-13 21:33:52.640 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:52.640 Status: LUA: End event fired on conso vmc
    2020-05-13 21:33:52.752 Status: LUA: Device based event fired on 'kWh Meter vmc_Utility', value '8.3999996185303'
    2020-05-13 21:33:52.753 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:52.753 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:52.753 Status: LUA: Device based event fired on 'kWh Meter vmc', value '8.600;53200.000'
    2020-05-13 21:33:52.753 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:52.753 Status: LUA: End event fired on kWh Meter vmc
    2020-05-13 21:33:52.864 Status: LUA: Device based event fired on 'Lumiere TV', value 'Off'
    2020-05-13 21:33:52.864 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:52.864 Status: LUA: End event fired on Lumiere TV
    2020-05-13 21:33:53.095 Status: User: Admin initiated a switch command (539/Nuit/On)
    2020-05-13 21:33:53.125 Status: LUA: Device based event fired on 'Lumiere Chalet', value 'Off'
    2020-05-13 21:33:53.127 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.127 Status: LUA: End event fired on Lumiere Chalet
    2020-05-13 21:33:53.238 Status: LUA: Device based event fired on 'Lumiere Terrasse', value 'Off'
    2020-05-13 21:33:53.238 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.238 Status: LUA: End event fired on Lumiere Terrasse
    2020-05-13 21:33:53.238 Status: LUA: Device based event fired on 'Lumiere Terrasse_Temperature', value '9.5'
    2020-05-13 21:33:53.238 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.238 Status: LUA: End event fired on Lumiere Terrasse_Temperature
    2020-05-13 21:33:53.349 Status: LUA: Device based event fired on 'Electrovanne AR', value '14.0'
    2020-05-13 21:33:53.349 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.349 Status: LUA: End event fired on Electrovanne AR
    2020-05-13 21:33:53.349 Status: LUA: Device based event fired on 'Electrovanne AR_Temperature', value '14.0'
    2020-05-13 21:33:53.349 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.349 Status: LUA: End event fired on Electrovanne AR_Temperature
    2020-05-13 21:33:53.462 Status: LUA: Device based event fired on 'Conso Vanne 3 voies', value '1.2'
    2020-05-13 21:33:53.462 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.462 Status: LUA: End event fired on Conso Vanne 3 voies
    2020-05-13 21:33:53.572 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies', value '1.200;1000.000'
    2020-05-13 21:33:53.573 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.573 Status: LUA: End event fired on kWh Meter Vanne 3 voies
    2020-05-13 21:33:53.695 Status: LUA: Device based event fired on 'conso vmc_Utility', value '8.3999996185303'
    2020-05-13 21:33:53.695 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.695 Status: LUA: End event fired on conso vmc_Utility
    2020-05-13 21:33:53.695 Status: LUA: Device based event fired on 'conso vmc', value '8.4'
    2020-05-13 21:33:53.695 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:53.695 Status: LUA: End event fired on conso vmc
    2020-05-13 21:33:53.696 Status: User: Admin initiated a switch command (539/Nuit/Off)
    2020-05-13 21:33:53.822 Status: LUA: Device based event fired on 'kWh Meter vmc_Utility', value '8.3999996185303'
    2020-05-13 21:33:53.822 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:53.823 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:53.823 Status: LUA: Device based event fired on 'kWh Meter vmc', value '8.400;53200.000'
    2020-05-13 21:33:53.823 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:53.823 Status: LUA: End event fired on kWh Meter vmc
    2020-05-13 21:33:53.850 Status: LUA: Eclairage Chalet a été éteint
    2020-05-13 21:33:53.851 Status: LUA: Eclairage TV a été éteint
    2020-05-13 21:33:53.851 Status: LUA: Eclairage terrasse a été éteint
    2020-05-13 21:33:53.852 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_CtrlLumiereJardin.lua
    2020-05-13 21:33:53.866 Status: Notification: Extinction Lumiere Terrasse
    2020-05-13 21:33:53.881 Status: Notification: Extinction Lumiere Chalet
    2020-05-13 21:33:53.945 Status: LUA: Device based event fired on 'Nuit', value 'Off'
    2020-05-13 21:33:53.945 Status: LUA: otherdevices['Nuit'] Off
    2020-05-13 21:33:53.945 Status: LUA: Device Nuit detected
    2020-05-13 21:33:53.945 Status: LUA: End event fired on Nuit
    2020-05-13 21:33:56.477 Status: LUA: Device based event fired on 'conso vmc_Utility', value '8.5'
    2020-05-13 21:33:56.477 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.477 Status: LUA: End event fired on conso vmc_Utility
    2020-05-13 21:33:56.595 Status: LUA: Device based event fired on 'kWh Meter vmc', value '8.500;53200.000'
    2020-05-13 21:33:56.595 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.595 Status: LUA: End event fired on kWh Meter vmc
    2020-05-13 21:33:56.595 Status: LUA: Device based event fired on 'kWh Meter vmc_Utility', value '8.5'
    2020-05-13 21:33:56.595 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.595 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:56.712 Status: LUA: Device based event fired on 'Conso Vanne 3 voies', value '2.1'
    2020-05-13 21:33:56.712 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.712 Status: LUA: End event fired on Conso Vanne 3 voies
    2020-05-13 21:33:56.712 Status: LUA: Device based event fired on 'Conso Vanne 3 voies_Utility', value '2.0999999046326'
    2020-05-13 21:33:56.712 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.712 Status: LUA: End event fired on Conso Vanne 3 voies_Utility
    2020-05-13 21:33:56.829 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies', value '2.100;1000.000'
    2020-05-13 21:33:56.829 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.829 Status: LUA: End event fired on kWh Meter Vanne 3 voies
    2020-05-13 21:33:56.829 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies_Utility', value '2.0999999046326'
    2020-05-13 21:33:56.829 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:56.829 Status: LUA: End event fired on kWh Meter Vanne 3 voies_Utility
    2020-05-13 21:33:57.091 Status: LUA: Device based event fired on 'Conso Vanne 3 voies_Utility', value '2.0999999046326'
    2020-05-13 21:33:57.093 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.093 Status: LUA: End event fired on Conso Vanne 3 voies_Utility
    2020-05-13 21:33:57.093 Status: LUA: Device based event fired on 'Conso Vanne 3 voies', value '2.1'
    2020-05-13 21:33:57.093 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.093 Status: LUA: End event fired on Conso Vanne 3 voies
    2020-05-13 21:33:57.223 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies', value '2.100;1000.000'
    2020-05-13 21:33:57.223 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.223 Status: LUA: End event fired on kWh Meter Vanne 3 voies
    2020-05-13 21:33:57.223 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies_Utility', value '2.0999999046326'
    2020-05-13 21:33:57.223 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.223 Status: LUA: End event fired on kWh Meter Vanne 3 voies_Utility
    2020-05-13 21:33:57.358 Status: LUA: Device based event fired on 'Volet aurelia_Temperature', value '142.0'
    2020-05-13 21:33:57.358 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.358 Status: LUA: End event fired on Volet aurelia_Temperature
    2020-05-13 21:33:57.358 Status: LUA: Device based event fired on 'Volet aurelia', value '142.0'
    2020-05-13 21:33:57.358 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.358 Status: LUA: End event fired on Volet aurelia
    2020-05-13 21:33:57.616 Status: LUA: Device based event fired on 'conso vmc_Utility', value '10.10000038147'
    2020-05-13 21:33:57.616 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.616 Status: LUA: End event fired on conso vmc_Utility
    2020-05-13 21:33:57.616 Status: LUA: Device based event fired on 'conso vmc', value '10.1'
    2020-05-13 21:33:57.616 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.616 Status: LUA: End event fired on conso vmc
    2020-05-13 21:33:57.744 Status: LUA: Device based event fired on 'kWh Meter vmc_Utility', value '10.10000038147'
    2020-05-13 21:33:57.744 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.744 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:57.744 Status: LUA: Device based event fired on 'kWh Meter vmc', value '10.100;53200.000'
    2020-05-13 21:33:57.744 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:57.744 Status: LUA: End event fired on kWh Meter vmc
    2020-05-13 21:33:58.005 Status: LUA: Device based event fired on 'conso vmc_Utility', value '10.10000038147'
    2020-05-13 21:33:58.007 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.007 Status: LUA: End event fired on conso vmc_Utility
    2020-05-13 21:33:58.007 Status: LUA: Device based event fired on 'conso vmc', value '10.1'
    2020-05-13 21:33:58.007 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.007 Status: LUA: End event fired on conso vmc
    2020-05-13 21:33:58.118 Status: LUA: Device based event fired on 'kWh Meter vmc', value '10.100;53200.000'
    2020-05-13 21:33:58.118 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.118 Status: LUA: End event fired on kWh Meter vmc
    2020-05-13 21:33:58.118 Status: LUA: Device based event fired on 'kWh Meter vmc_Utility', value '10.10000038147'
    2020-05-13 21:33:58.118 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.118 Status: LUA: End event fired on kWh Meter vmc_Utility
    2020-05-13 21:33:58.234 Status: LUA: Device based event fired on 'Conso Prise Chambre', value '0.9'
    2020-05-13 21:33:58.234 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.234 Status: LUA: End event fired on Conso Prise Chambre
    2020-05-13 21:33:58.235 Status: LUA: Device based event fired on 'Conso Prise Chambre_Utility', value '0.89999997615814'
    2020-05-13 21:33:58.235 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.235 Status: LUA: End event fired on Conso Prise Chambre_Utility
    2020-05-13 21:33:58.360 Status: LUA: Device based event fired on 'kWh Meter Prise Chambre', value '0.928;11850.000'
    2020-05-13 21:33:58.360 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.361 Status: LUA: End event fired on kWh Meter Prise Chambre
    2020-05-13 21:33:58.361 Status: LUA: Device based event fired on 'kWh Meter Prise Chambre_Utility', value '0.92799997329712'
    2020-05-13 21:33:58.361 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.361 Status: LUA: End event fired on kWh Meter Prise Chambre_Utility
    2020-05-13 21:33:58.482 Status: LUA: Device based event fired on 'Electrovanne AR', value '13.9'
    2020-05-13 21:33:58.482 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.482 Status: LUA: End event fired on Electrovanne AR
    2020-05-13 21:33:58.482 Status: LUA: Device based event fired on 'Electrovanne AR_Temperature', value '13.89999961853'
    2020-05-13 21:33:58.482 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.482 Status: LUA: End event fired on Electrovanne AR_Temperature
    2020-05-13 21:33:58.596 Status: LUA: Device based event fired on 'Conso Vanne 3 voies', value '0.2'
    2020-05-13 21:33:58.596 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.596 Status: LUA: End event fired on Conso Vanne 3 voies
    2020-05-13 21:33:58.596 Status: LUA: Device based event fired on 'Conso Vanne 3 voies_Utility', value '1.2000000476837'
    2020-05-13 21:33:58.596 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.596 Status: LUA: End event fired on Conso Vanne 3 voies_Utility
    2020-05-13 21:33:58.707 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies_Utility', value '1.2000000476837'
    2020-05-13 21:33:58.707 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.707 Status: LUA: End event fired on kWh Meter Vanne 3 voies_Utility
    2020-05-13 21:33:58.707 Status: LUA: Device based event fired on 'kWh Meter Vanne 3 voies', value '0.200;1000.000'
    2020-05-13 21:33:58.707 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.707 Status: LUA: End event fired on kWh Meter Vanne 3 voies
    2020-05-13 21:33:58.797 Status: OpenZWave: Received timeout notification from HomeID: 3616049346, NodeID: 56 (0x38)
    2020-05-13 21:33:58.963 Status: LUA: Device based event fired on 'CPU_Usage RPI', value '31.25'
    2020-05-13 21:33:58.963 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.963 Status: LUA: End event fired on CPU_Usage RPI
    2020-05-13 21:33:58.963 Status: LUA: Device based event fired on 'CPU_Usage RPI_Utility', value '31.25'
    2020-05-13 21:33:58.963 Status: LUA: otherdevices['Nuit'] On
    2020-05-13 21:33:58.963 Status: LUA: End event fired on CPU_Usage RPI_Utility
    © 2012-2020 Domoticz | WWW: Domoticz.com
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: aide pour réalisation script en lua

Message par vil1driver »

Si c'est bon :D
Le device Nuit passe le test
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
vr6man
Messages : 627
Inscription : 18 juil. 2017, 12:15

Re: aide pour réalisation script en lua

Message par vr6man »

ok je l'avais pas vu

content que ca aille et maintenant je fais quoi ?
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: aide pour réalisation script en lua

Message par vil1driver »

Maintenant tu attends le retour de thier ou keros..
Je n'ai pas suffisamment suivi le fil pour aider d'avantage.
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
vr6man
Messages : 627
Inscription : 18 juil. 2017, 12:15

Re: aide pour réalisation script en lua

Message par vr6man »

pas de soucis merci a toi

Je reviendrais vers toi ensuite pour ton aide sur les valeurs du vent et soleil a intégrer
Keros
Messages : 6638
Inscription : 23 juil. 2019, 20:57

Re: aide pour réalisation script en lua

Message par Keros »

vil1driver a écrit : 13 mai 2020, 21:54 Maintenant tu attends le retour de thier ou keros..
Je n'ai pas suffisamment suivi le fil pour aider d'avantage.
Je suis de retour, Merci vil1driver de ton aide ;)

Il va aussi falloir que je retrouve le fil dans ces 26 pages ... Laisse moi quelque minutes.

Déjà, tu peux désactiver le dernier script qu'on a mis dans Évènements de DomoticZ.
Comment bien utiliser le forum : Poser une question, Mettre un script, un fichier, une image ou des logs
Mes petits guides : Débuter en programmation, Le débogage, Le choix de matériel, Les sauvegardes
Ma présentation - Mes Tutos
Keros
Messages : 6638
Inscription : 23 juil. 2019, 20:57

Re: aide pour réalisation script en lua

Message par Keros »

Si je remonte le fil, nous étions bloqué sur script_device_fermeture_store.lua car nous n'avions pas la fermeture du store :

Code : Tout sélectionner

commandArray={}
print ('Lancement du script de fermeture')
print('otherdevices[\'Store Terrasse\'] avant = '..otherdevices['Store Terrasse'])
print('otherdevices[\'Nuit\'] '..otherdevices['Nuit'])
-- Fermeture du Store Terrasse
if (devicechanged['Nuit']=='On') then
print ('Le device Nuit est passé à On')
commandArray['Store Terrasse']='Off'
end
print('otherdevices[\'Store Terrasse\'] après = '..otherdevices['Store Terrasse'])
print ('Fin du script de fermeture')
return commandArray
Le script_device_store.lua

Code : Tout sélectionner

commandArray={}

  print('otherdevices[\'Store Terrasse\'] '..otherdevices['Store Terrasse'])

--pour connaitre les valeurs on met des print. Tu les commentes avec -- quand tu n'en as plus besoin.
       -- print('otherdevices[\'UV\'] '..otherdevices['UV'])
        --print('otherdevices[\'Pluie\'] '..otherdevices['Pluie'])
       -- print('otherdevices[\'Nuit\'] '..otherdevices['Nuit'])
       -- print('otherdevices[\'Vent\'] '..otherdevices['Vent'])
       -- print('otherdevices[\'Absence\'] '..otherdevices['Absence'])
       -- print('otherdevices[\'Store Terrasse\'] '..otherdevices['Store Terrasse'])
       -- print('otherdevices[uservariables["store exterieur"]] '..uservariables["store exterieur"])

-- Ouverture Store Terrasse
if (devicechanged['Store Terrasse']=='On' and uservariables["store exterieur"] == 'ferme' and otherdevices['Absence']=='Off') then
        commandArray['Ouverture Store Terrasse']='On'
        print('Ouverture Store Terrasse')
        commandArray ['Variable:store exterieur']='ouvert'
        commandArray['SendNotification']='Store Terrasse#Ouverture Store Terrasse'

-- Fermeture du Store Terrasse
elseif (devicechanged['Store Terrasse']=='Off' and uservariables["store exterieur"] == 'ouvert' and otherdevices['Absence']=='Off') then
        commandArray['Fermeture Store Terrasse']='On'
        print('Fermeture Store Terrasse')
        commandArray ['Variable:store exterieur']='ferme'
        commandArray['SendNotification']='Store Terrasse#Fermeture Store Terrasse'
end

return commandArray
Alors, il faudrait que tu remettes ces deux scripts. J'ai mis à jour script_device_store.lua pour enlever des print.

Ensuite, tu mets ton Store Terrasse à on(store ouvert) et Nuit à Off.

Une fois que c'est fait, tu passe une fois (pas besoin de plus) Nuit à On et tu nous donnes les résultats qu'il y a eu dans les log.
Comment bien utiliser le forum : Poser une question, Mettre un script, un fichier, une image ou des logs
Mes petits guides : Débuter en programmation, Le débogage, Le choix de matériel, Les sauvegardes
Ma présentation - Mes Tutos
thier
Messages : 807
Inscription : 26 sept. 2015, 10:32
Localisation : charente

Re: aide pour réalisation script en lua

Message par thier »

J'avais laché l'affaire en proposant une commande curl pour remplacer commandarray['Store Terasse']='Off' au cas ou cette dernière commande soit sans effet.
PI3+, Buster, Domoticz V2020.2, rflink, zwave, chauffage piloté par qubino, sondes oregon et Vil1d, boite aux lettres détection passage facteur, volets roulants qubino fibaro.
vr6man
Messages : 627
Inscription : 18 juil. 2017, 12:15

Re: aide pour réalisation script en lua

Message par vr6man »

ok Keros c'est fait en suivant ta procédure et en écrasant les anciens scripts par ceux que tu viens de mettre

le store ne se ferme toujours pas en passant Nuit à On

quand j'ouvre le store la variable est bien passé à ouvert

voici les logs
  • Tout
    Statut
    Filtre: X
    2020-05-14 07:45:12.948 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:12.948 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:12.948 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:12.987 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.040 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.040 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.040 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.040 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.040 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:13.078 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.267 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.267 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.267 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.267 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.267 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:13.306 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.494 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.494 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.494 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.494 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.494 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:13.532 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.585 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.586 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.586 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.586 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.586 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:13.624 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.679 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.679 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.679 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.679 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.679 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:13.718 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.908 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.909 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.909 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.909 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.909 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:13.948 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:13.999 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:13.999 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:13.999 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:13.999 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:13.999 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:14.040 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:14.224 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:14.224 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:14.224 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:14.224 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:14.224 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:14.290 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:14.531 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:14.531 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:14.531 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:14.531 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:14.531 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:14.572 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:14.621 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:14.621 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:14.621 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:14.621 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:14.621 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:14.659 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:14.709 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:14.709 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:14.709 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:14.709 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:14.709 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:14.746 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:14.938 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:14.938 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:14.938 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:14.939 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:14.939 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:14.975 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:15.026 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:15.026 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:15.026 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:15.026 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:15.026 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:15.063 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:15.112 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:15.112 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:15.112 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:15.112 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:15.112 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:15.149 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:15.198 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:15.199 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:15.199 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:15.199 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:15.199 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:15.235 Status: LUA: otherdevices['Store Terrasse'] On
    2020-05-14 07:45:15.417 Status: LUA: Lancement du script de fermeture
    2020-05-14 07:45:15.417 Status: LUA: otherdevices['Store Terrasse'] avant = On
    2020-05-14 07:45:15.417 Status: LUA: otherdevices['Nuit'] On
    2020-05-14 07:45:15.417 Status: LUA: otherdevices['Store Terrasse'] après = On
    2020-05-14 07:45:15.417 Status: LUA: Fin du script de fermeture
    2020-05-14 07:45:15.454 Status: LUA: otherdevices['Store Terrasse'] On

Et si je cherche par la suite le store via le device store terrasse la variable passe a ferme
Keros
Messages : 6638
Inscription : 23 juil. 2019, 20:57

Re: aide pour réalisation script en lua

Message par Keros »

vr6man a écrit : 14 mai 2020, 07:47 quand j'ouvre le store la variable est bien passé à ouvert
...
Et si je cherche par la suite le store via le device store terrasse la variable passe a ferme
Ca c'est un autre script : on se concentre sur script_device_fermeture_store.lua

Si tu analyses tes log, tu verras que print ('Le device Nuit est passé à On') n'apparait jamais. Donc derrière, aune action possible sur le store.

Je ne vois pas d'action sur Nuit. On devrait voir ceci :
vr6man a écrit : 13 mai 2020, 20:39
  • 2020-05-13 20:38:37.981 Status: User: Admin initiated a switch command (539/Nuit/On)
    2020-05-13 20:38:38.768 Status: User: Admin initiated a switch command (539/Nuit/Off)
Comment bien utiliser le forum : Poser une question, Mettre un script, un fichier, une image ou des logs
Mes petits guides : Débuter en programmation, Le débogage, Le choix de matériel, Les sauvegardes
Ma présentation - Mes Tutos
Répondre