Script can not run inside Domoticz

All kinds of 'OS' scripts

Moderator: leecollings

vamp
Posts: 34
Joined: Saturday 06 October 2018 13:20
Target OS: Linux
Domoticz version:
Contact:

Re: Script can not run inside Domoticz

Post by vamp »

I already solve the problem, a very different way :)

I use Node-Red (inside Docker) so i catch the dummy switch state with MQTT and based the state, send a exec command to the docker host machine that run miio command (with ssh)

It working like a charm! :)
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Script can not run inside Domoticz

Post by waaren »

Good to hear your problem is solved.
Can you please test this last scriptmodification anyway?
IT might help other forum members in the future.
Thx !




Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sebastian
Posts: 2
Joined: Wednesday 27 November 2019 14:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Script can not run inside Domoticz

Post by Sebastian »

i lost some time for this error. Its all about tokens.
run miio discover as root.
tokens are not share between user and root
you need to add them seperatly for root and your ubuntu/pi user
HNBC84
Posts: 63
Joined: Tuesday 01 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Script can not run inside Domoticz

Post by HNBC84 »

I have a little bit of the same problem.
The script in putty works great.

But when i put it in domoticz in a dummy not al the parts work.

/home/pi/.local/bin/catt cast_site http://192.168.xxx.4:xxxx
sudo echo "Bin here 111" > /home/pi/domoticz/log.txt
> /dev/null 2>&1 &

The echo parts work i see them in log.txt, but the cast part nothing happens.
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Script can not run inside Domoticz

Post by jannl »

You most likely have a problem with your path settings. They are different in a shell script compared to running from domoticz or crontab. The program can not ne found I geuss. You could try with an echo of the path.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Script can not run inside Domoticz

Post by FireWizard »

HNBC84
Posts: 63
Joined: Tuesday 01 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Script can not run inside Domoticz

Post by HNBC84 »

FireWizard wrote: Sunday 09 August 2020 15:12 @HNBC84

See: https://www.domoticz.com/forum/viewtopi ... 07#p231907

Regards
Thnx de user PI script works like a charm!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest