Calling a rfxcmd python script gives error 256

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Calling a rfxcmd python script gives error 256

Post by solarboy »

I have created an sh script for rfxcmd.py that works beautifully if I directly execute it from the GUI or via putty.ssh. However if I try to call the script from within Domoticz (which is in the domoticz/scripts folder) I get error 256.

The rfxcmd.py script and associated files are in a directory within domoticz/scripts called "rfxcmd" and all files have execute permissions set for "anyone"

I am wondering if anyone has any thoughts on how I might resolve this ?
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
waltervl
Posts: 5409
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Calling a rfxcmd python script gives error 256

Post by waltervl »

Domoticz runs the script as the user that runs Domoticz.
Try to run the script with sudo to see if it still runs.
If you have file paths in your script have them absolute not relative.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Calling a rfxcmd python script gives error 256

Post by solarboy »

OK, sorry, I fixed this now, needed the full path, I already had sudo in there. Thanks Walter !
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests