logo elektroda
logo elektroda
X
logo elektroda

[Solved] Domoticz on Docker - Error Writing dzVents Script to /opt/domoticz/userdata

mjab 447 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20522179
    mjab

    Level 10  
    Hello,

    I installed Domoticz in Docker from the image "domoticz/domoticz:2021-beta.13738" and I need to run (previously working correctly on another machine) the script dzVents.

    However, the script does not work and I have in the logs such an error : Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/jHeating_TERMOSTATS.lua

    The script looks like this :

    local TERMOSTAT1 = 'Set Temp. Living Room'
    local TERMOSTAT2 = 'Set Temp. Bathroom'
    local TERMOSTAT3 = 'Set Temp. at Philip's'
    local TERMOSTAT4 = 'Set Temp. Bedroom'

    return {
    on = {
    devices = {
    TERMOSTAT1, TERMOSTAT2, TERMOSTAT3, TERMOSTAT4
    }
    },
    execute = function(dz, device)

    if (device.name == TERMOSTAT1) then
    local SetTemp = dz.devices(TERMOSTAT1).setPoint
    dz.log('The thermostat in the living room was set to '. SetTemp , dz.LOG_INFO)
    dz.openURL({
    url = 'http://192.168.0.6/ustaw/set_salon=' ... SetTemp,
    method = 'GET',
    })
    end

    if (device.name == TERMOSTAT2) then
    local SetTemp = dz.devices(TERMOSTAT2).setPoint
    dz.log('The thermostat in the Bathroom was set to '... SetTemp , dz.LOG_INFO)
    dz.openURL({
    url = 'http://192.168.0.6/ustaw/set_lazienka=' ... SetTemp,
    method = 'GET',
    })
    end

    if (device.name == TERMOSTAT3) then
    local SetTemp = dz.devices(TERMOSTAT3).setPoint
    dz.log('The thermostat at Philip's has been set to '... SetTemp , dz.LOG_INFO)
    dz.openURL({
    url = 'http://192.168.0.6/ustaw/set_ufilipa=' ... SetTemp,
    method = 'GET',
    })
    end

    if (device.name == TERMOSTAT4) then
    local SetTemp = dz.devices(TERMOSTAT4).setPoint
    dz.log('The thermostat in the Bedroom was set to '... SetTemp , dz.LOG_INFO)
    dz.openURL({
    url = 'http://192.168.0.6/ustaw/set_sypialnia=' ... SetTemp,
    method = 'GET',
    })
    end


    end
    }

    Can someone help me? :) .
  • ADVERTISEMENT
  • #2 20522185
    mjab

    Level 10  
    OK, problem solved you need to create all folders i.e. :
    mkdir scripts
    mkdir scripts/dzVents
    mkdir scripts/dzVentsgenerated_scripts

    then give :
    chmod -R 777 scripts
    chmod -R 777 scripts/*

    then restart the container with Domoticz and it worked.

    Of course we use the exec console :) .
ADVERTISEMENT