problems saving a blocky script [Solved] Topic is solved

Moderator: leecollings

Post Reply
runskater
Posts: 5
Joined: Wednesday 05 June 2019 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

problems saving a blocky script [Solved]

Post by runskater »

Hi,
I have a question regarding the usage of Blocky scripts. I have created a blocky scripting after creation I push the SAVE button but I have no idea where the script has been saved.
I have created a Switch which uses the script to send a notification. But when I activate this Switch nothing happens and I see the following error in de domoticz log:
Error script not found '/home/pi/domoticz/scripts/wim-komt-thuis'

So I wonder where the script has been saved. I am brand new to domoticz, so I did a lot of reading before starting to work with domoticz but I could not find an answer to this problem.
Hopefully anyone can help me with this problem.

Regards,
Runskater

Version: 4.10717
Platform: Raspi 3
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: problems saving a blocky script

Post by waaren »

runskater wrote: Wednesday 05 June 2019 22:33 I have created a blocky scripting after creation I push the SAVE button but I have no idea where the script has been saved.
A Blockly script is stored in the domoticz database.
I have created a Switch which uses the script to send a notification. But when I activate this Switch nothing happens and I see the following error in de domoticz log: Error script not found '/home/pi/domoticz/scripts/wim-komt-thuis'
My understanding; from what I read in your post is that you try to trigger the script from the On Action field in the [edit] tab of the switch.
If my assumption is correct that I am afraid this will not work. The scripts referred to in the On Action field are external scripts.

If you have a problem with a script or a blockly than please include them in your post. For text based scripts between code </> tags and for Blockly as a screenshot.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
runskater
Posts: 5
Joined: Wednesday 05 June 2019 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: problems saving a blocky script

Post by runskater »

Hello warren,

your assumption is right, I want to trigger the script from the On Action field
What I want is the following, just for learning to work with domoticz purposes:
- create a on/off switch, called 'iPhone-Wim'
- when I pushed on my iPhone the on/off switch from the Switch panel in domoticz I want to receive a notification and an email which tells me that the switch has been switched on or off.

Regards,
Willem
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: problems saving a blocky script

Post by waaren »

runskater wrote: Thursday 06 June 2019 18:38 I want to receive a notification and an email which tells me that the switch has been switched on or off.
Again that is not going to work with a Blockly script from the On Action field. But the good news is that it can be done with Blockly. Can you share a screenshot from the Blockly you created ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
runskater
Posts: 5
Joined: Wednesday 05 June 2019 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: problems saving a blocky script

Post by runskater »

These are the screenshots of the 2 Blocky's that I have created.
Attachments
Schermafbeelding 2019-06-02 om 20.59.54.jpg
Schermafbeelding 2019-06-02 om 20.59.54.jpg (105.55 KiB) Viewed 2638 times
Schermafbeelding 2019-06-06 om 18.26.15.jpg
Schermafbeelding 2019-06-06 om 18.26.15.jpg (49.75 KiB) Viewed 2638 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: problems saving a blocky script

Post by waaren »

runskater wrote: Friday 07 June 2019 21:38 These are the screenshots of the 2 Blocky's that I have created.
You seem to have missed to fill the subsystem blocks. If you press the down arrow in that block you will see the available subsystems. You need to configure these subsystems in the [setting] [notification] tab
blockly.png
blockly.png (63.4 KiB) Viewed 2634 times
And while your at it. Change the trigger to device and active to on before saving
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
runskater
Posts: 5
Joined: Wednesday 05 June 2019 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: problems saving a blocky script

Post by runskater »

I made the changes you suggested but unfortunately it still is not working for me. It might be that I misunderstand what you are saying regarding your saying: "And while your at it. Change the trigger to device and active to on before saving" I could not find that.

Let me explain what I have done:
-- created a dummy hardware, named it 'dummy'
- went into Switches and clicked on 'Manual light/switch"
selecterd hardware: selected the above created dummy hardware, named it: iPhone
Sselected witch type: On/Off
selected type: X10
House code: D
Unit code: 10
As: main device
See the attachment

Then I created the 2 events and selected the subsystem Pushover. This Pushover was created in Setings - Notifications. I am using the right User and Api key. I used the Test button to test the Pushover and the test was with positive result.
See the attachment

When I pushed the Switch then no Notifications is sent.
Message in the log : Status: User: Admin initiated a switch command (99/iPhone/On)
It looks look the Blocky's that I created is still not activated.
Attachments
Schermafbeelding 2019-06-09 om 22.42.31.jpg
Schermafbeelding 2019-06-09 om 22.42.31.jpg (46.68 KiB) Viewed 2618 times
Schermafbeelding 2019-06-09 om 22.41.33.jpg
Schermafbeelding 2019-06-09 om 22.41.33.jpg (91.79 KiB) Viewed 2618 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: problems saving a blocky script

Post by waaren »

runskater wrote: Sunday 09 June 2019 22:58 -- created a dummy hardware, named it 'dummy'
OK
- went into Switches and clicked on 'Manual light/switch"
Look at the image below how to create dummy device and save active Blockly as device type. If you still don't receive the message then please double check if you applied your settings on the setup tab and set the priority of your message in the Blockly to a higher level.
Blocl;ly_2.png
Blocl;ly_2.png (165.64 KiB) Viewed 2612 times

Code: Select all

2019-06-09 23:57:08.663 Status: User: Admin initiated a switch command (1/iPhone/Off)
2019-06-09 23:57:10.904 (Dummy) Light/Switch (iPhone)
2019-06-09 23:57:10.907 EventSystem: Event triggered: Notify test_1
2019-06-09 23:57:10.770 Status: User: Admin initiated a switch command (1/iPhone/On)
2019-06-09 23:57:10.928 Status: Notification: Test subject
2019-06-09 23:57:11.932 Notification sent (pushover) => Success
Last edited by waaren on Monday 10 June 2019 0:00, edited 1 time in total.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
runskater
Posts: 5
Joined: Wednesday 05 June 2019 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: problems saving a blocky script

Post by runskater »

Thanks a lot for your assistance, it works now
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest