Need help with dzVents script Topic is solved

Moderator: leecollings

Post Reply
Fredom
Posts: 160
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Krimpen aan den IJssel
Contact:

Need help with dzVents script

Post 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
}
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Trixie - Domoticz 2025.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: Need help with dzVents script

Post 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
Regards,

Rob
Fredom
Posts: 160
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Krimpen aan den IJssel
Contact:

Re: Need help with dzVents script

Post 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
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Trixie - Domoticz 2025.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest