Multiple Actions in Domotiga

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Andy_Burn
Starting Member
Starting Member
Posts: 43
Joined: Sun Nov 28, 2010 10:47 pm

Re: Multiple Actions in Domotiga

Post by Andy_Burn »

Hi Ron.
Is there a way of altering the delays set in the code?
I have a case where clicking a fan control button has no effect. Clicking and holding causes a fan to turn on then off quickly. One light now wont respond at all.

If there was a dialog to 'tune' the delay time, perhaps even for each device ( a lot of work I know!), this could possibly be corrected.
I've not managed to crash Domotiga since the upgrade yet, but stay tuned :wink:

Sorry for the absence lately, life/work gets in the way :)

UPDATE: I found the fan will turn ON okay as usual, but not turn off. The switch clicks twice. The light wont respond at all.
2011/08/03 19:53:34 $>28001F01F01 FONFON91#
2011/08/03 19:53:38 $>28001F01F01 FOFFFOFF0D#
2011/08/03 19:53:42 $>28001F01F01 FONFON91#
2011/08/03 19:53:44 $>28001F01F01 FOFFFOFF0D#
Lol, is it telling me to F*Off!?
Using X10 Commander, however, the light can be turned on/off with "ALL_LIGHTS", and the fan just clicks twice and ignores me. Figures :)

Thanks,
Andy
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Multiple Actions in Domotiga

Post by RDNZL »

@Andy the CTX35 code is a bit old, and doesn't have a command buffer, so command's can get overwritten...
I wil take a look soon to see if I can implement the same command buffer and timer mechanism used in the latest PLCBUS code.
Regards, Ron.
Andy_Burn
Starting Member
Starting Member
Posts: 43
Joined: Sun Nov 28, 2010 10:47 pm

Re: Multiple Actions in Domotiga

Post by Andy_Burn »

Aha! That explains a lot. Thanks Ron :)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Multiple Actions in Domotiga

Post by RDNZL »

@Andy can you try again with the latest code?
I have rewritten most parts of the CCTX35.class so it uses a proper command buffer and timer now too.
When doing this I was surprised that the old code even worked at all. :|
It was one of the first modules I have written for DomotiGa and I have learned to program a little bit better in the mean time...
Regards, Ron.
Andy_Burn
Starting Member
Starting Member
Posts: 43
Joined: Sun Nov 28, 2010 10:47 pm

Re: Multiple Actions in Domotiga

Post by Andy_Burn »

I blew my machine up! Lol, Domotiga freezes after compilation from svn.
Give me a couple of days to reinstall and get going again :)
Andy
insomniux
Starting Member
Starting Member
Posts: 23
Joined: Fri Mar 11, 2011 3:34 pm

Re: Multiple Actions in Domotiga

Post by insomniux »

@Ron,
I'm not using PLCBUS, but the RFXCom stuff. Also noticed that the delay action can only be used once per event. Would this update also solve that issue?
thx
Insomniux
Server: Intel® D945GSEJT dual Atom
Linux: Ubuntu Server 10.04
RFXCom receiver/xmitter
Domotiga 0.1.197
TimScottz8
Starting Member
Starting Member
Posts: 9
Joined: Wed Jul 20, 2011 7:46 pm

Re: Multiple Actions in Domotiga

Post by TimScottz8 »

Sorry for the delay, I've been kind of busy with my rehabilitation. I will test the new version over the next few days and report back

Tim
TimScottz8
Starting Member
Starting Member
Posts: 9
Joined: Wed Jul 20, 2011 7:46 pm

Re: Multiple Actions in Domotiga

Post by TimScottz8 »

Hi
I have now had time to test the new code and it works very well switching 5 devices/lamps on with no errors. Well done on fixing this.
But...
I have now found a new timing problem. I use wireless remotes in my house to allow lights to be turned on and off in the conventional manner without going through the computer. I also use some codes to trigger events such as turning all the lights off as I go to bed.

For this example let us say that code is A8. I set up a virtual device VirtualA8 in Domotiga.
I then created a trigger when VirtualA8 status is changed to On which calls an event to turn on real device A7 (as a test).
I found that I had to add a pause in the event before the A7On command to get A7 to actually come on. Without it the log showed that the computer had tried to send the command but I guess the PLCBus interface was not yet ready to receive it. Maybe prior to sending a command to the PLCBus interface a test needs to be performed to see if the interface is in a receiving state ?
Is there another way of triggering events from incoming PLCBus commands other than creating a virtual device ? If not could this be done as the ability to use incoming commands to then run extensive macros is very useful. The snag with a virtual device is that, in this example, sending consecutive A8On commands would have no effect as virtual A8 is still set to on after the first command. I realise for light switching this is ok but there are other macros I could envisage such as lights on a timer where multiple A8On commands could make sense without an intervening A8Off to reset the trigger.

Regards

Tim
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Multiple Actions in Domotiga

Post by RDNZL »

Can you enable plcbus, event and device debugging and post me the log output?
Also more details about how the event and actions look like.

With the help of Peter a PLCBUS user I did extensive testing, we now understand the protocol and timings much better.
And we are now testing it on a 3 phase PLCBUS installation, where some bugs/problems came up (the protocol and timings are different for 3 phase in regards to polling)

You can also register on my new site at http://domotiga.nl and issue a bug report ticket with the info in it, that way I don't forget.
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Multiple Actions in Domotiga

Post by RDNZL »

If you use a PLCBUS device to trigger a simple scene, simply create a PLCBUS scene, and make sure you choose a housecode for your scenes which is not in the poll range.
Regards, Ron.
Andy_Burn
Starting Member
Starting Member
Posts: 43
Joined: Sun Nov 28, 2010 10:47 pm

Re: Multiple Actions in Domotiga

Post by Andy_Burn »

@Ron,

Ron, I cant get any of the latest svn to run. 0.194 is the last version that runs, but with the switching problems.
The latest svn for example draws the main window and then freezes. No logs - nothing.
Mmm. I may just backup/wipe the database and try again :) Lol, once I can take a break from life :lol:
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Multiple Actions in Domotiga

Post by RDNZL »

Andy_Burn wrote:@Ron,

Ron, I cant get any of the latest svn to run. 0.194 is the last version that runs, but with the switching problems.
The latest svn for example draws the main window and then freezes. No logs - nothing.
Mmm. I may just backup/wipe the database and try again :) Lol, once I can take a break from life :lol:
Andy, I have no one report this kind of behavior yet... and we are at version 0.1.201 soon.

Do you run the latest gambas 2 version?
Does this also happens if you open the DomotiGa project inside the IDE and compile.run it from there?
I have notice that if you point your interface settings to the wrong usb/serial port bad things can happen.
This happens if you reboot your system, without having udev rules in place so your ports get always the same device name.
If you want to change/disable certain interfaces/ports, simply start a DomotiGa instance in client mode (domotiga.conf) and change the settings.

Note, you can also open a topic on the fora on domotiga.nl now, there are more DomotiGa users around.
Regards, Ron.
Andy_Burn
Starting Member
Starting Member
Posts: 43
Joined: Sun Nov 28, 2010 10:47 pm

Re: Multiple Actions in Domotiga

Post by Andy_Burn »

Ron,
I plan on building a new machine on my days off.
I'll report back when I get her going :)
OWK
Member
Member
Posts: 62
Joined: Sat Sep 24, 2011 11:03 am

Re: Multiple Actions in Domotiga

Post by OWK »

Hi All

Tried to switch 2 devices using X10Cmd + CM15a. Used an event to switch C1 and A1 Off (in that sequence).

Domotiga switches C1 off, but not A1.

From debug:

2011/11/17 20:38:04 [X10Cmd] Result: 11/17 20:38:04 X NO Access to CM15A for X10
Unknown or unavailable command

2011/11/17 20:38:05 [X10Cmd] Result:
2011/11/17 20:38:05 [X10Cmd] Result:
2011/11/17 20:38:05 [X10Cmd] Result:

After this I can switch from Domotiga device C1 on, no problem.

:?: Does the delay problem discussed in this topic apply here as well?

:idea: Would it be an idea to have a user definable delay field available in the event window, in the action(s) group of fields? So if you have more than one action to run it takes account for the delay?

Regards,
Olaf
Domotiga
Cubietruck, Ubuntu server 1.0.2
RFXcom LAN, home brew ground plane antenna
KaKu
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Multiple Actions in Domotiga

Post by RDNZL »

Can you create a test script like this:

Code: Select all

vi test.sh
---
#!/bin/sh
cm15ademo A1 On
cm15ademo A1 Off
cm15ademo C1 On
cm15ademo C1 Off
---
And then run it:

Code: Select all

sh ./test.sh
Does this run ok, without errors?
If so I will add a command queue to X10Cmd too.
And we can work without delays.
X10 is old and unreliable, I don't want to have to introduce delays to support it.
Regards, Ron.
Post Reply

Return to “DomotiGa Forum”