DOMOTICZ cannot save scripts Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
tec13
Posts: 18
Joined: Thu Apr 02, 2020 1:54 pm

DOMOTICZ cannot save scripts

Post by tec13 »

Domoticz cannot save the scripts.
I get the following error in domotic logs when I want to save a script :
2021-02-07 00:05:41.023 Error: EventSystem: problem writing file: /mnt/dietpi_userdata/domoticz/scripts/dzVents/generated_scripts/Script #1.lua
----
My version is: DietPi v6.34.3 : 00:03 - Sun 02/07/21
I have only installed domoticz in dieptpi

Image

Image
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: DOMOTICZ cannot save scripts

Post by Joulinar »

Hi,

probably file system structure is missing. You could try following

Code: Select all

mkdir -p /mnt/dietpi_userdata/domoticz/scripts/dzVents/generated_scripts/
chown -R domoticz:domoticz /mnt/dietpi_userdata/domoticz/scripts/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tec13
Posts: 18
Joined: Thu Apr 02, 2020 1:54 pm

Re: DOMOTICZ cannot save scripts

Post by tec13 »

Thanks for your answer
Now the scripts are saved, but more errors appear
Image
Last edited by tec13 on Sun Feb 07, 2021 1:12 am, edited 2 times in total.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: DOMOTICZ cannot save scripts

Post by Joulinar »

looks like your system is searching for some JSON file in all kind of directories. Did you specified it somewhere?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tec13
Posts: 18
Joined: Thu Apr 02, 2020 1:54 pm

Re: DOMOTICZ cannot save scripts

Post by tec13 »

In the installation of domotics in raspibian you do not have to specify anything about Json.

When domoticz is installed in raspibian, when starting to create a script, a template appears.
Image


When I start to create a script in Dietpi Domoticz, it appears blank, that is another problem
Image
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: DOMOTICZ cannot save scripts

Post by Joulinar »

ok I had a closer look regarding the missing templates. It seems the templates are expected on userdata_path directory and this is specified as /mnt/dietpi_userdata/domoticz.

This as well explains why you where not able to store the script at the beginning. It's quite simple to fix

Code: Select all

cp -p -r /opt/domoticz/scripts /mnt/dietpi_userdata/domoticz/
Now you should get templates if you create a new event
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tec13
Posts: 18
Joined: Thu Apr 02, 2020 1:54 pm

Re: DOMOTICZ cannot save scripts

Post by tec13 »

Now it works, thanks a lot for the help
I will keep testing!
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: DOMOTICZ cannot save scripts

Post by Joulinar »

did you faced the JSON issue again? I have seen it once on my test system but I did not find out what the trigger was. It is probably related to Perl. Maybe it is required, but not installed in DietPi by default.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tec13
Posts: 18
Joined: Thu Apr 02, 2020 1:54 pm

Re: DOMOTICZ cannot save scripts

Post by tec13 »

No problem with Json
Everything I've tried so far works fine.

cp -p -r /opt/domoticz/scripts /mnt/dietpi_userdata/domoticz/ is the solution.

Thanks!
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: DOMOTICZ cannot save scripts

Post by Joulinar »

ok I opened PR to have it added by default https://github.com/MichaIng/DietPi/pull/4096
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply