Page 1 of 1

Need help with dzVents script

Posted: Friday 04 June 2021 11:13
by Fredom
Dear members,
The intention of this script is that a message is sent to Telegram if the set temperature exceeds the value
Only 1 freezer is currently in use, the other 2 are under construction.
Unfortunately the script gives a failure message that I can't figure out.
Who knows the solution?

Code: Select all

2021-06-03 23:02:57.291 Error: EventSystem: problem writing file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Temp Koelen/Vriezer.lua
2021-06-03 23:12:20.266 Error: EventSystem: problem writing file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Temp Koelen/Vriezer.lua
2021-06-04 10:30:16.258 Error: EventSystem: problem writing file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Temp Koelen/Vriezer.lua
2021-06-04 10:38:44.785 Error: EventSystem: problem writing file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Temp Koelen/Vriezer.lua
2021-06-04 10:41:20.027 Error: EventSystem: problem writing file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Temp Koelen/Vriezer.lua
2021-06-04 10:41:58.698 Error: EventSystem: problem writing file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Temp Koelen/Vriezer.lua

Code: Select all

return 
{
	    on = {
	 timer = {
			'Every 2 minutes' 
		}
	},

	logging = {
      level = domoticz.LOG_DEBUG,
     marker = "Temperatuur vrieskist/vrieskast/koelkast"
    },

	execute = function(domoticz, timer)
	    
        local TempVrieskist     = domoticz.devices('Vrieskist')
        --local TempVrieskast     = domoticz.devices('Vrieskast')
        --local TempKoelkast      = domoticz.devices('Koelkast')

        if tonumber(TempVrieskist.rawData[1]) > -16 then
            domoticz.notify('Temperatuur info', 'Temperatuur in de vrieskist is ' ..TempVrieskist.rawData[1].. ' graden. Dat is te hoog! Staat de deksel open?')
            domoticz.log('Timer event was triggered by ' .. timer.trigger, domoticz.LOG_INFO)
        end
        
        --if tonumber(TempVrieskast.rawData[1]) > -15 then  (under construction )
            --domoticz.notify('Temperatuur info', 'Temperatuur in de vrieskast is ' ..TempVrieskast.rawData[1].. ' graden. Dat is te hoog! Staat de deur open?')     (under construction )
            --domoticz.log('Timer event was triggered by ' .. timer.trigger, domoticz.LOG_INFO)   (under construction )
        --end
        
        --if tonumber(TempKoelkast.rawData[1]) > 6  then        (under construction )
            --domoticz.notify('Temperatuur info', 'Temperatuur in de koelkast is ' ..TempKoelkast.rawData[1].. ' graden. Dat is te hoog! Staat de deur open?')  (under construction )
            --domoticz.log('Timer event was triggered by ' .. timer.trigger, domoticz.LOG_INFO)     (under construction )
        --end
   end
}

Re: Need help with dzVents script

Posted: Friday 04 June 2021 11:42
by erem
most likely this is a permissions issue
make sure the user running domoticz has write rights to /home/pi/domoticz/scripts/dzVents/generated_scripts

or

Temp Koelen/Vriezer.lua DONT USE / in your names

Re: Need help with dzVents script

Posted: Friday 04 June 2021 11:52
by Fredom
erem wrote: Friday 04 June 2021 11:42 most likely this is a permissions issue
make sure the user running domoticz has write rights to /home/pi/domoticz/scripts/dzVents/generated_scripts

or

Temp Koelen/Vriezer.lua DONT USE / in your names
Thank you for the quick response.
I edited it and it works great now