Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
11.04.2017, 17:05
Hi, first post on the forum. We have recently moved into our new house, and most of the cardboard boxes have been emptied. So I have changed attention towards the ReactorV3 that is sitting there nicely along with the rest of the electrical equipment. Thought I should start with a simple script just to see if something happened, but it doesnt.
My script is a simple scheduled one planned to start at a given time let us say 1900 every night
Code: grp.write('1/1/5',100)
But nothing happens. The address is an exterior light and I have another script that turns it off at 2330
Code: grp.write('1/1/5',0)
Is there something basic I have missed? I have not imported any ETS file yet, because my electrician havent sent me the file yet.
The reactor is set to auto update but have not been able to find more than 6 objects. There are also no logs whatsoever, no error logs, no object logs, no trend logs, nothing
When the reactor is placed on the bus, it should be able to send messages on the bus directly to switches and actuators right?
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
Do you actually have this object in Objects tab? If not, grp.write will only work if you pass datatype as third argument.
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
11.04.2017, 20:24
(This post was last modified: 11.04.2017, 20:39 by 02dag.)
(11.04.2017, 17:33)admin Wrote: Do you actually have this object in Objects tab? If not, grp.write will only work if you pass datatype as third argument.
There is an object called 1/1/1 in the objects tab and it says universal input/output with a lots of data types.
I also have a printout of groupaddresses, but there it says "exterior lights entree dim 1/1/1"
Posts: 176
Threads: 42
Joined: Jul 2015
Reputation:
2
The best way is to import opc file from ets program in ultillities tab. But if you know that the adress is a boolean (on/off) you can add it manual in the object list. Press add on the bottom left and fill in the parameters
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
(11.04.2017, 20:41)PassivPluss Wrote: The best way is to import opc file from ets program in ultillities tab. But if you know that the adress is a boolean (on/off) you can add it manual in the object list. Press add on the bottom left and fill in the parameters
I have made an object called "Veranda" with group address 1/1/5 and datatype boolean. I am not sure if this is correct but in my printed version of "overview of group addresses" it says "1/1/5 exterior light veranda On/off type 1 bit"
Trying to do a scheduled write to this address with grp.write(1/1/5,1) but this is still not working. I am pretty sure it has something to do with addressing. But could it have something to do with setup. Like if the reactor has not been set up as an IP gateway in the ETS project?
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
You probably forgot quotes around 1/1/5 in grp.write. Without quotes 1/1/5 evaluates as 0.2
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
(13.04.2017, 11:14)admin Wrote: You probably forgot quotes around 1/1/5 in grp.write. Without quotes 1/1/5 evaluates as 0.2
Sorry about that, the script actually says grp.write('1/1/5',1)
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
13.04.2017, 12:23
(This post was last modified: 13.04.2017, 12:23 by Erwin van der Zwart.)
Hi,
Is your object a bit object? If yes use boolean as value instead of 0 or 1.
grp.write('1/1/5', true) -- or false
BR,
Erwin
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
either will work, but you can try grp.write('1/1/5', true, dt.bool)
Posts: 176
Threads: 42
Joined: Jul 2015
Reputation:
2
The thing you should do first is in the objects tab, push the manual value and try to write 1 or 0 there to se if it responds. If not the group adress is wrong
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
I have let this rest for a while and did a new try today. Found out that the connection to the bus was wrong. Had accidentally managed to choose EIBnet/IP routing instead of TP/UART. Saw this while reading the manual for the nth time.
So now the objects are pouring in to the objects overview, and I can manually turn off and on all lights.
Tried to start a scheduled script but that still doesnt work. Here is my script
grp.write('1/1/20',false)
This is set up in scripting under scheduled to start at 15 23 * * *
I also tried to do this in scheduler where you actually set up a scheduled event against a group address, and at a certain time change a value. This should be quite similar to changing the object manually directly. No success.
Posts: 76
Threads: 5
Joined: Sep 2016
Reputation:
4
You can control this object in the objects overview by sending 0/1 to it`?
Is the scheduled script set to active`?
Jørn
Best regards, Jørn.
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
Yes to both questions. i think that there must be something missing here. Do I need to enable the script or turn on scripting somewhere?
Posts: 221
Threads: 45
Joined: Nov 2015
Reputation:
2
Nothing in your error log?
Posts: 76
Threads: 5
Joined: Sep 2016
Reputation:
4
(22.04.2017, 20:13)02dag Wrote: Yes to both questions. i think that there must be something missing here. Do I need to enable the script or turn on scripting somewhere?
New scripts are not set to active by default.
As you can see on this screenshot the top script is activated, the one below is not.
Best regards, Jørn.
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
(23.04.2017, 01:29)joskilb Wrote: (22.04.2017, 20:13)02dag Wrote: Yes to both questions. i think that there must be something missing here. Do I need to enable the script or turn on scripting somewhere?
New scripts are not set to active by default.
As you can see on this screenshot the top script is activated, the one below is not.
My scripts are active and it is till not working, but anyway, I have been able to write scripts now, event based. This is working flawlessly. But the scheduling will not work at all.
Is there a way to start an event based script that triggers on a certain time? Is the cron job not started?
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
Scheduled scripts are working always so there must be a reason why it doesn't in your case..
The most common mistake i see is that the time settings are wrong when there is a incorrect timezone selected. When your controller is using a NTP server there could be a time shift due to this and the schedulers are working but not switching on the expected moments what makes it seems to not working correct. Please check this and you could check this by adding a log command log(os.time()) in the start of the scheduler script so you at least know it starts at some point.
BR,
Erwin
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
Which FW are you running, have you tried installing the latest RC1?
Posts: 53
Threads: 17
Joined: Nov 2016
Reputation:
0
I did what you said and the script worked, although two hours later than expected. I have entered 0-3.no.pool.ntp.org in the different NTP-client settings. I will look into the time zone settings.
Regarding the firmware, I will try to download this and install it.
Thanks to everybody involved helping me to solve this problem. Script writing will commence from here on, although I wish it was powershell
|