[667] Ability to execute script:/// from Blocky

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

User avatar
Laulo7
Posts: 1
Joined: Sunday 18 March 2018 14:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9030
Location: france (vaucluse)
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by Laulo7 »

Hello,

add "1/" in parameter(s)

Image
Attachments
Capture.PNG
Capture.PNG (5.95 KiB) Viewed 3127 times
It's a long way to the top..
DennisD
Posts: 51
Joined: Friday 18 September 2015 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by DennisD »

Having the same issue, strangely tho was that the scripts did work. If i call them directly in terminal the script (sending a snapshot to my telegram) works flawlessly but when i true to call the script through domoticz nothing happens. I did try changing the url, adding "1/" in the parameters even the space after the script text area. After adding the space or changing the url i get no error msgs but i don't get the script to run

I am running the latest (beta)version 3.9052 but come to think of it i did have it before that build (not sure which one).
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by tontze »

Laulo7 wrote: Sunday 18 March 2018 14:46 Hello,

add "1/" in parameter(s)

Image
Why ? where are you referring to ? To remove # ?
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
DennisD
Posts: 51
Joined: Friday 18 September 2015 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by DennisD »

If you run the whole path the backspace isn't needed mine is in /home/pi/domoticz/scripts/bash/ and specify it like that and i have no #.

Strange problem with my problem is that the script seems to work partially, since the snapshot is uploaded to the directory which is specified in the script, i how ever don't get a msg via telegram (it does so when i locally call the script)
dnlauto
Posts: 4
Joined: Saturday 05 May 2018 23:27
Target OS: Linux
Domoticz version:
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by dnlauto »

Did you ever get this resolved? I have the same issue. Adding "1/" as a parameter does not help for me.
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by olafmarcos »

I'm in the same situation:
Spoiler: show
2018-08-27 12:54:56.672 Status: Executing script: /usr/local/domoticz/var/scripts/tv_alert.sh#
2018-08-27 12:54:56.682 Error: Error executing script command (/usr/local/domoticz/var/scripts/tv_alert.sh#). returned: 32512
The script runs perfectly from CLI.

For workaround, i add a blankspace and ampersand to send the job to background and it seems to work.
script.jpg
script.jpg (9.5 KiB) Viewed 2385 times
Status: Executing script: /usr/local/domoticz/var/scripts/tv_alert.sh &#

Any advances?
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
dakarli
Posts: 5
Joined: Monday 16 March 2020 10:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by dakarli »

Hi guys,

i know this topic is very old but i was also struggeling with this issue and found no solution in the forums.

But I could now figuere out when this problem happen:
It happens ONLY if there are more then the "start script" action in the doing.

Example:

If a Blockly Script looks like this (only the Start Script action is selected, it will work:
blocky_working.png
blocky_working.png (7.19 KiB) Viewed 1758 times

If there are other actions in the "Do" section, Domoticz will tail the # after the script:
blocky_not_working.png
blocky_not_working.png (15.66 KiB) Viewed 1758 times


My Workaround: - "SOLUTION"
I Create a Dummy-Item (Push On Button) and added my script to the "action at on" field.
In the Blockly Script i will just set this dummy button to ON - then the Script will be executed.

I hope this can help other people with the same Issue.
OldPensionado
Posts: 22
Joined: Wednesday 01 March 2017 9:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by OldPensionado »

Thanks to all of you bringing up this problem!
And of course I realize that this is an old topic but anyway I would like to contribute to this problem and possible solutions.

I ran into the same problem (the logfile says: " Error: Error executing script command (/home/pi/domoticz/scripts/buzzer.py#). returned: 32512").
In addition to the solution of @dakarli I found out that just adding a space right after the name of the script (in my case /home/pi/domoticz/scripts/buzzer.py solves my problem.
[Edit] It looks to me like a parsing problem.
Even if you are running more than one script, just add a space after the name of the script and it works as expected. There is no need for an ampersand (&).
I'll hope anyone will benefit of this.
RPi 1, model B, Rev. 2; RPi 3B+; RPi Zero; RPi 4B
Raspbian 10 (Buster)
Domoticz V2022.2

Well, such is life. And it's getting sucher and sucher...
OldPensionado
Posts: 22
Joined: Wednesday 01 March 2017 9:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by OldPensionado »

Thanks to the update to V2022.1 the parsing problem is gone!
So if you encounter the problem as described I suggest update Domoticz to V2022.1.

Thank you Gizmocus!
RPi 1, model B, Rev. 2; RPi 3B+; RPi Zero; RPi 4B
Raspbian 10 (Buster)
Domoticz V2022.2

Well, such is life. And it's getting sucher and sucher...
Philosifer
Posts: 17
Joined: Thursday 07 January 2016 18:38
Target OS: Linux
Domoticz version: 2.4223
Location: United Kingdom
Contact:

Re: [667] Ability to execute script:/// from Blocky

Post by Philosifer »

I have this problem V2022.2 still.

Weirdly I have two scripts and one works fine and the other gets the # added on the end and fails.

The only difference in the text is one ends in off.sh and works fine and the other ends in on.sh and gets the # added. I've tried removing and re-adding the broken one but it didn't help. Adding a space as a workaround works but the # is still appended so it doesn't seem to be related to the length of the text as with the space added they would be the same length.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest