On various Hardware and OS systems: pi / windows / routers / nas, etc
Moderator: leecollings
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Friday 09 April 2021 19:00
Gravityz wrote: ↑ Friday 09 April 2021 18:37
lot's of other errors which look like an old problem. i am using the latest docker build 13149
The JSON.lua file does reside in <domoticz dir>/scripts/lua/
Same for similar xml2lua.lua, XmlParser.lua and subdirectory xmlhandler
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
Gravityz
Posts: 587 Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:
Post
by Gravityz » Friday 09 April 2021 19:23
yes i know but apparently the container can not find it
when i login the container it is in
/opt/domoticz/scripts/lua
the path /opt/domoticz/userdata also contains a script directory but that one is missing the lua directory.
the errors i am getting is it tries to search in the userdata directory instead of the default directory
maybe there is a problem with the docker build because i am testing with a clean image with a brand new database
edit: i think the mapping outside the container is screwing up the default path inside the container.
if i place a copy of the JSON.lua outside the container in /docker/domoticz/scripts/dzvents the problem is gone.
it still is strange that mapping is causing this
i believe the opt/domoticz/scripts and the opt/domoticz/userdata/scripts inside the container image should be the same to avoid these problems
Last edited by
Gravityz on Wednesday 21 April 2021 12:39, edited 1 time in total.
smaus
Posts: 84 Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:
Post
by smaus » Wednesday 21 April 2021 12:28
where can i find my domoticz dir in docker, i cant find it.
Gravityz
Posts: 587 Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:
Post
by Gravityz » Wednesday 21 April 2021 12:42
/opt/domoticz
you get there by selecting the container from synology
press details
press terminal
presh create (a bash entry appears)
click the bash entry and you are inside the container and can modify stuff, copy things and install packages with apt-get
smaus
Posts: 84 Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:
Post
by smaus » Saturday 24 April 2021 15:52
when i look with winCSP i dont have /opt/domoticz/ i have only containerd
EddyG
Posts: 1042 Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:
Post
by EddyG » Saturday 24 April 2021 16:51
smaus wrote: ↑ Saturday 24 April 2021 15:52
when i look with winCSP i dont have /opt/domoticz/ i have only containerd
Carefully read the above and do those steps, don't use WinSCP but DSM
Gravityz
Posts: 587 Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:
Post
by Gravityz » Saturday 24 April 2021 16:52
read the instructions again. you can not get to the container from winscp(at least not easy)
you need to login the container through the terminal function in docker
so from the synology
goto docker
container
select the container domoticz
select details
select terminal
press create(bash will appear)
click on bash and you are logged into the container
smaus
Posts: 84 Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:
Post
by smaus » Sunday 25 April 2021 16:19
Reading the instructions attentively, and it works.
Gravityz
Posts: 587 Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:
Post
by Gravityz » Sunday 25 April 2021 16:44
nice.
now you can change things inside the container and they will be kept.
i use curl in my scripts but because docker continers can not start things outside the container it needs to be inside the container.
apt-get -qq update
apt-get -qq -y install curl
also my normal synology scripts use ash but docker uses bash so you need to xhange that in your old linux scripts
smaus wrote: ↑ Sunday 25 April 2021 16:19
Reading the instructions attentively, and it works.
knireis
Posts: 16 Joined: Wednesday 09 April 2014 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by knireis » Tuesday 27 April 2021 17:48
I changed my docker from the demydiuk/domoticz repo to the new official domoticz/domoticz one.
I had to import the database but further all ok exept i also have the issue that a simple DzVents script i created (to switch on a device after start of domoticz) is not running. I read this topic and the topic about the docker version but i have no clue what to do about this.
Is there a solution? If yes, can someone explain in simple steps how to achieve this?
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Tuesday 27 April 2021 19:00
knireis wrote: ↑ Tuesday 27 April 2021 17:48
A simple DzVents script i created (to switch on a device after start of domoticz) is not running. I read this topic and the topic about the docker version but i have no clue what to do about this.
Did you create the dzVents script using the internal event editor? If not copy paste your script into the event editor, save it and try again.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
knireis
Posts: 16 Joined: Wednesday 09 April 2014 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by knireis » Wednesday 28 April 2021 18:54
yes it is made with the internal editor
before the change to the new docker image i see this in the log of the switch: EventSystem//opt/domoticz/dzVents/runtime/dzVents.lua
now there is nothing exept for when i turn it on manual.
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Wednesday 28 April 2021 20:03
knireis wrote: ↑ Wednesday 28 April 2021 18:54
yes it is made with the internal editor
Can you share the loglines from domoticz start and from around the time you would expect the script to be executed?
Do you have other dzVents scripts that do work?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
knireis
Posts: 16 Joined: Wednesday 09 April 2014 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by knireis » Thursday 29 April 2021 10:43
sorry, where can i find the log? there is nothing in the /config or /userdata
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Thursday 29 April 2021 10:47
knireis wrote: ↑ Thursday 29 April 2021 10:43
sorry, where can i find the log? there is nothing in the /config or /userdata
If you have not configured it, you can only see it in the GUI. [Setup][Log]
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
knireis
Posts: 16 Joined: Wednesday 09 April 2014 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by knireis » Thursday 29 April 2021 10:50
2021-04-28 19:14:56.883 Status: Domoticz V2021.1 (build 13240) (c)2012-2021 GizMoCuz
2021-04-28 19:14:56.883 Status: Build Hash: d626bc52f, Date: 2021-04-28 07:52:07
2021-04-28 19:14:56.883 Status: Startup Path: /opt/domoticz/
2021-04-28 19:14:56.916 Status: PluginSystem: Started, Python version '3.7.3'.
2021-04-28 19:14:56.916 Status: : Using poll interval of 2 secs.
2021-04-28 19:14:56.919 Status: WebServer(HTTP) started on address: 0.0.0.0 with port 8080
2021-04-28 19:14:56.923 Status: WebServer(SSL) started on address: 0.0.0.0 with port 443
2021-04-28 19:14:56.925 Status: Proxymanager started.
2021-04-28 19:14:56.926 Status: TCPServer: shared server started...
2021-04-28 19:14:56.926 Status: RxQueue: queue worker started...
2021-04-28 19:14:58.926 Status: (Evohome) Worker started...
2021-04-28 19:14:58.926 Status: rfxcom: Worker started...
2021-04-28 19:14:58.926 Status: Hue: Worker started...
2021-04-28 19:14:58.927 Status: NotificationSystem: thread started...
2021-04-28 19:14:58.927 Status: EventSystem: reset all events...
2021-04-28 19:14:58.932 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/linphone-init.lua
2021-04-28 19:14:58.932 Status: EventSystem: reset all device statuses...
2021-04-28 19:14:58.975 Status: Python EventSystem: Initalizing event module.
2021-04-28 19:14:58.975 Status: EventSystem: Started
2021-04-28 19:14:58.975 Status: EventSystem: Queue thread started...
2021-04-28 19:14:59.927 Status: rfxcom: Using serial port: /dev/ttyUSB0
2021-04-28 19:15:08.927 Status: (Evohome) connect to Evohome server
2021-04-28 19:15:27.058 Status: PROXY: Authenticate result: success.
2021-04-28 19:16:18.958 Status: (Evohome) connect to Evohome server
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Thursday 29 April 2021 10:59
knireis wrote: ↑ Thursday 29 April 2021 10:50
2021-04-28 19:14:58.932 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/linphone-init.lua
So I assume linphone-init.lua is the script you refer to. Can you share it?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
knireis
Posts: 16 Joined: Wednesday 09 April 2014 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by knireis » Thursday 29 April 2021 11:10
Code: Select all
return
{
on =
{
system =
{
'start',
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'start',
},
execute = function(dz)
dz.devices('Linphone-S').switchOn().afterSec(10)
end
}
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Thursday 29 April 2021 11:34
This should work, or at least show some loglines.
Is dzVents still enabled in [Setup][Setttings][Other]?
dzVents .png (16.41 KiB) Viewed 1936 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
knireis
Posts: 16 Joined: Wednesday 09 April 2014 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by knireis » Thursday 29 April 2021 11:45
2021-04-29 11:42:14.346 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/linphone-init.lua
Seems to be an access issue?
Users browsing this forum: No registered users and 1 guest