Blockly is not working?

Moderator: leecollings

Post Reply
Tweak
Posts: 12
Joined: Monday 16 September 2019 10:45
Target OS: -
Domoticz version:
Contact:

Blockly is not working?

Post by Tweak »

Hello,

I have created this as test:

Image

But it is not working?? When i turn a switch On or Off nothing happends.

Image

Is this detection system broken?
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly is not working?

Post by HansieNL »

I once had some strange reactions when a name was part of an other name.
Can you try to rename SomeoneHome to SoHome and see of that works ok.
Blah blah blah
Tweak
Posts: 12
Joined: Monday 16 September 2019 10:45
Target OS: -
Domoticz version:
Contact:

Re: Blockly is not working?

Post by Tweak »

Thnx, but i think i found the problem.. I tried to do the same with LUA and didn't work either.
So i created a new switch but then i noticed this was not the same switch. This one is On/Off only…
Now LUA can control that switch with no problems. And LUA looks nice no drag and drop..
So im going to try to create the complete script in LUA.
Tweak
Posts: 12
Joined: Monday 16 September 2019 10:45
Target OS: -
Domoticz version:
Contact:

Re: Blockly is not working?

Post by Tweak »

Works perfect now =)

(I never used LUA before so yes maybe its not pretty but it works)

Code: Select all

   if (otherdevices['Tel1'] == 'On' or otherdevices['Tel2'] == 'On') then
            TelAanwezig = true
            end
  if (otherdevices['SomeoneHomeActief'] == 'On' and otherdevices['IemandThuis'] == 'Off' and TelAanwezig == true) then
     print("SomeoneHomeActief staat aan en IemandThuis is off en een van de telefoons is verbonden met wifi dus zet IemandThuis On")
  commandArray['IemandThuis']='Set Level: 10'
end
 if (otherdevices['SomeoneHomeActief'] == 'On' and otherdevices['IemandThuis'] == 'On' and TelAanwezig == false) then
  print("SomeoneHomeActief staat aan en IemandThuis is On en geen telefoons verbonden met wifi dus zet IemandThuis Off")
  commandArray['IemandThuis']='Set Level: 0'

end
end
Smartie
Posts: 21
Joined: Monday 14 December 2015 15:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly is not working?

Post by Smartie »

Hey Maybe the same Problem :)

https://www.domoticz.com/forum/viewtopi ... ua#p229337

I Have a lot of Blocky events but only 2 LUA scripts for the Powerusage
I Can Use only one at the same time.

But newer version
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests