Hello,
I am a French newbee on Domoticz and I have a minor problem that I don't understand.
APIR-2150 is a movie sensor with "Action off= nothing" and "Action on= script://CmdEclairageExt.lua" a lua program stocked in DataBase (domoticz.db)
This script switch On a lamp at night when a movie sensor is detected
log
1) 2019-03-07 11:32:25.429 (RFXtrx433XL Somfy) Lighting 2 (APIR-2150)
2) 2019-03-07 11:32:25.430 Status: LUA: Script Started ...DB
3) 2019-03-07 11:32:25.430 Status: LUA: Script Finished ...DB
4) 2019-03-07 11:32:25.427 Error: SQLHelper: Error script not found '/usr/local/domoticz/var/scripts/CmdEclairageExt.lua'
5) 2019-03-07 11:32:26.087 (RFXtrx433XL Somfy) Lighting 2 (APIR-2150)
6) 2019-03-07 11:32:26.088 Status: LUA: Script Started ...DB
7) 2019-03-07 11:32:26.088 Status: LUA: Script Finished ...DB
8) 2019-03-07 11:32:26.085 Error: SQLHelper: Error script not found '/usr/local/domoticz/var/scripts/CmdEclairageExt.lua'
9) 2019-03-07 11:33:03.395 Status: Notification sent (Email) [/size][/size]
No scripts are stored in domoticz directory.
At line 4 and 8 Why a SQL error is send before the script started ?
I suppose it is a request for the script CmdEclairageExt.lua in the DB.
Why it says I can't find it when he executes it a few hundredths of a second later ?
thank you for your answers
SQLHelper: Error script not found
Moderator: leecollings
-
- Posts: 46
- Joined: Thursday 07 March 2019 11:40
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.4
- Location: France
- Contact:
SQLHelper: Error script not found
NAS Syno DS718+ with 12Go ram
RFXtrx433XL v1044 with 3dBi antenna
Domoticz 2024.4 on Docker
TFA rain gauge, 4 ways automatic watering program, LINKY consumption, waterflow counter
RFXtrx433XL v1044 with 3dBi antenna
Domoticz 2024.4 on Docker
TFA rain gauge, 4 ways automatic watering program, LINKY consumption, waterflow counter
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: SQLHelper: Error script not found
domoticz Lua and dzVents scripts in domoticz are not to be used in the On or Off section as script:// types.
It will not work as they need domoticz data that is not available to OS level Lua scripts.
The script:// in the "Action on" section of the device refer to an OS script. The error message tells you that that script does not exist in the directory domoticz is looking for it.
It looks like the script is created and saved using the internal event editor and triggered by the event system. If that's the case, you don't have to refer to it in the On section.
What do you see / experience when you remove the script from the On section ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 46
- Joined: Thursday 07 March 2019 11:40
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.4
- Location: France
- Contact:
Re: SQLHelper: Error script not found
Thank's for your response.waaren wrote: ↑Thursday 07 March 2019 14:26 It looks like the script is created and saved using the internal event editor and triggered by the event system. If that's the case, you don't have to refer to it in the On section.
What do you see / experience when you remove the script from the On section ?
I have deleted "Action on=empty" and it has worked without an error message! but if there are several scripts, how the system does it to assign them to different events without error ?
NAS Syno DS718+ with 12Go ram
RFXtrx433XL v1044 with 3dBi antenna
Domoticz 2024.4 on Docker
TFA rain gauge, 4 ways automatic watering program, LINKY consumption, waterflow counter
RFXtrx433XL v1044 with 3dBi antenna
Domoticz 2024.4 on Docker
TFA rain gauge, 4 ways automatic watering program, LINKY consumption, waterflow counter
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: SQLHelper: Error script not found
The way that's handled depends on the script type. Is it a standard Lua script or a dzVents Lua script.boggiz wrote: ↑Thursday 07 March 2019 18:09Thank's for your response.waaren wrote: ↑Thursday 07 March 2019 14:26 It looks like the script is created and saved using the internal event editor and triggered by the event system. If that's the case, you don't have to refer to it in the On section.
What do you see / experience when you remove the script from the On section ?
I have deleted "Action on=empty" and it has worked without an error message! but if there are several scripts, how the system does it to assign them to different events without error ?
DzVents identify when a script needs to be activated based on the "on = " section.
In standard Lua it can be based on the name of the script or inside the code . https://www.domoticz.com/wiki/LUA_commands#Devices
I can only comment on the way it is handled in your script if you include name and code in your post.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 46
- Joined: Thursday 07 March 2019 11:40
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.4
- Location: France
- Contact:
Re: SQLHelper: Error script not found
Thank you for your answer.
Here is my basic code:
---------------------------------------
-- External Lighting Control
---------------------------------------
commandArray = {}
print ('Script Started...Database')
if (devicechanged['APIR-2150'] =='On' and other devices['NIGHT'] =='On') then
commandArray['Ext Lighting']='On'
end
print ('Script Finished...Database')
return commandArray
If I understood correctly, the whole Blockly and LUA code stored in the database is executed as soon as an event is sent by Domoticz.
For Dzevents and all other languages, only the event programmed in "Action on" or "off" is processed not by the database but by the OS.
Here is my basic code:
---------------------------------------
-- External Lighting Control
---------------------------------------
commandArray = {}
print ('Script Started...Database')
if (devicechanged['APIR-2150'] =='On' and other devices['NIGHT'] =='On') then
commandArray['Ext Lighting']='On'
end
print ('Script Finished...Database')
return commandArray
If I understood correctly, the whole Blockly and LUA code stored in the database is executed as soon as an event is sent by Domoticz.
For Dzevents and all other languages, only the event programmed in "Action on" or "off" is processed not by the database but by the OS.
NAS Syno DS718+ with 12Go ram
RFXtrx433XL v1044 with 3dBi antenna
Domoticz 2024.4 on Docker
TFA rain gauge, 4 ways automatic watering program, LINKY consumption, waterflow counter
RFXtrx433XL v1044 with 3dBi antenna
Domoticz 2024.4 on Docker
TFA rain gauge, 4 ways automatic watering program, LINKY consumption, waterflow counter
Who is online
Users browsing this forum: No registered users and 1 guest