Page 1 of 1
Updating device status
Posted: Mon Oct 04, 2010 12:15 pm
by hplus
Hi there,
I remember last time i used domotiga, there was one important missing feature:
Suppose i have a x10 device with a A7 code. If i set this device to on from domotiga, its status is turned to on.
But if i use an external device, lets say a remote control to set it to on, domotiga still say it is off. Even though domotiga clearly received the A7 Off through the RFXCOM.
Do you have any plan to change this behaviour?
Thanks
Hplus
Re: Updating device status
Posted: Mon Oct 04, 2010 12:38 pm
by RDNZL
How did you configure the A7 X10 device in your database, as which devicetype and interface?
I think the problem is that RFXCom receiver will only set device A7 if it has "RFXCom receiver" as interface, and since X10 devices can be controlled by several different interfaces Heyu, RFXCom TX, or CTX35, this is often not the case.
Should we make it so that it change any X10 device value even if received by another X10 interface?
Apart from this can you enable RFXCom Receiver debug and post the lines where it detects the A7 status?
So I know which code is involved in this.
Re: Updating device status
Posted: Mon Oct 04, 2010 3:08 pm
by Alexander
[offtopic]Ron, please give your plants some water! (help messages on twitter)[/offtopic]
Re: Updating device status
Posted: Tue Oct 05, 2010 4:28 pm
by RDNZL
[offtopic]
If that was the only issue I have with my plants... I haven't told you about their Pokon addiction yet
TIP: Never give your plants access to your twitter account...
[/offtopic]
Re: Updating device status
Posted: Tue Nov 23, 2010 1:10 pm
by hplus
Sorry for the long delay,
I was really busy these last month and i was not working on my HA anymore.
My X10 device is configured on the RFXCOM transmitter in order to be able to control it..
Yes i think that it is coherent to update the status of an x10 device even if its received by another interface..
The only case i can imagine in which this behaviour can be not suitable is if you have a RF X10 device and a x10 over powerline device using the same code and no RF-powerline gateway. But in this case it is easy to cofigure these devices not to use the same code....
Do you agree?
I can send you the logs this week end.
Thanks
Re: Updating device status
Posted: Sat Nov 27, 2010 9:17 pm
by hplus
Hi,
Here is the log for a A04 device.
it is configured as a marmitek x10 module with a rfcom TX interface
2010/11/27 20:14:19 20609F38C72010/11/27 20:14:19 [Devices] Device 'X10' with address 'A04' and interface 'RFXCom Receiver' not found!*
A4-Off bits=32
2010/11/27 20:14:37 20609F18E72010/11/27 20:14:37 [Devices] Device 'X10' with address 'A04' and interface 'RFXCom Receiver' not found!
A4-On bits=32
thanks
hplus
Re: Updating device status
Posted: Sun Dec 05, 2010 2:23 pm
by RDNZL
Hi,
In version 0.1.192 I introduced a Global X10 setting for Heyu, RFXComRX and CTX35, if enabled and that interface receives an X10 signal it will update the status of that device if it belongs to another X10 interface.
You have to be careful not to create loops.
Can you test it?
Re: Updating device status
Posted: Mon Dec 06, 2010 12:29 pm
by hplus
Cool,
I'll do the test this Week end, I am not at home during the week.
I'll report the results in this thread.
Thanks again
Hplus
Re: Updating device status
Posted: Sat Dec 11, 2010 11:49 pm
by hplus
I've just tried...
it doesn't seem to work...
i've changed this
TRY rDevice = Main.hDB.Exec("SELECT devices.* FROM devices, interfaces WHERE devices.interface = interfaces.id and interfaces.type LIKE &1 AND devices.address LIKE &2 AND devices.enabled is TRUE LIMIT 1", "%" & sDevice, sAddress)
to this:
TRY rDevice = Main.hDB.Exec("SELECT * FROM devices WHERE address LIKE &1 AND devices.enabled is TRUE LIMIT 1", sAddress)
to make it work...
hplus
Re: Updating device status
Posted: Sun Dec 12, 2010 7:12 pm
by RDNZL
Strange as i worked when I tested it
Your sql query will also find other non X10 devices like for PLCBUS, so thats not the correct way.
Can you give me some more detailed info, what interfaces.id and interfaces.type have for values for example?
Re: Updating device status
Posted: Mon Dec 13, 2010 1:31 pm
by hplus
Hi,
What do you want me to do exactly?
I don't understand your question "what interfaces.id and interfaces.type have for values for example?"
I've done the tests on saturday and i remenber that the function
=> PUBLIC SUB FindNameForInterface(iInterfaceId AS Integer) AS String
was crashing because the interface id was never found, so i first added a safety check
=> IF NOT ERROR AND IF rInterface.Available THEN RETURN rInterface!name
then i noticed that the problem comes from before, and that the query was giving no results.
=>TRY rDevice = Main.hDB.Exec("SELECT devices.* FROM devices, interfaces WHERE devices.interface = interfaces.id and interfaces.type LIKE &1 AND devices.address LIKE &2 AND devices.enabled is TRUE LIMIT 1", "%" & sDevice, sAddress)
so i've changed the query to be less restrictive. I don't understand fully the initial query thats why i made it simple...
Do you expect me to check my database for interfaces.id and type?
Hplus
Re: Updating device status
Posted: Mon Dec 13, 2010 10:03 pm
by RDNZL
Ok. Dont know if you are willing to email me a database backup. If so see email address in readme file of domotiga. You can create backup via tools db admin menu.
But will investigate this further anyway.