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!
Script can not run inside Domoticz
Moderator: leecollings
- 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
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 !
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
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 2
- Joined: Wednesday 27 November 2019 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Script can not run inside Domoticz
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
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
-
- 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
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.
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.
-
- 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
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.
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
-
- 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
Thnx de user PI script works like a charm!FireWizard wrote: ↑Sunday 09 August 2020 15:12 @HNBC84
See: https://www.domoticz.com/forum/viewtopi ... 07#p231907
Regards
Who is online
Users browsing this forum: No registered users and 1 guest