values are changing when using COM control
Posted: Tue Nov 03, 2009 10:06 pm
Hi Scott,
I'm busy working on a better web interface for housebot then the asp demo, when i came up to a few bugs.
Somehow, and I dont know if it's PHP or the COM object, but it says that the GetPropertyListForDevice method is unknown.
For this I found a workaround by querying the access DB once to get all the devices and their properties.
After the workaround I got a pretty nice working interface, but with 1 big problem:
I have a few devices that have an extra property: LastChange (datetime), when the powerstate property changes, a task fires to change this property to the current datetime.
When I use the GetPropertyValue method to get the value of this property, the property is also changed to the current datetime.
If I then check the history of the value, it says it has been changed by the task that is supposed to fire when the powerstate changes (which it didnt).
The strangest thing is,
The value is "2009-11-03 12:15:34", then I use GetPropertyValue, and the history log will say:
old "2009-11-03 12:15:34"
new "2009-11-04 03:24:17"
Changed by task "doorbell_lastchange"
Then I use the getproperty value method again, now there wont be a new history log entry, but the old one will be changed to
old "2009-11-03 12:15:34"
new "2009-11-04 03:25:28"
Changed by task "doorbell_lastchange"
As if the first change was never there.... and when I check the task in question, it says: Last executed: "2009-11-02 14:35:17"
I disabled the task, and it still did the same.
when I tell the property to log changes to the device / userlog, nothing will be in there, even though the value keeps changing every time I do a getpropertyvalue on it.
As far as I found it is only on all the devices I have with this property, but it's hard to say for sure (since the changes arent being logged anywhere)
Any idea why this is?
Regards,
LostDreamer
I'm busy working on a better web interface for housebot then the asp demo, when i came up to a few bugs.
Somehow, and I dont know if it's PHP or the COM object, but it says that the GetPropertyListForDevice method is unknown.
For this I found a workaround by querying the access DB once to get all the devices and their properties.
After the workaround I got a pretty nice working interface, but with 1 big problem:
I have a few devices that have an extra property: LastChange (datetime), when the powerstate property changes, a task fires to change this property to the current datetime.
When I use the GetPropertyValue method to get the value of this property, the property is also changed to the current datetime.
If I then check the history of the value, it says it has been changed by the task that is supposed to fire when the powerstate changes (which it didnt).
The strangest thing is,
The value is "2009-11-03 12:15:34", then I use GetPropertyValue, and the history log will say:
old "2009-11-03 12:15:34"
new "2009-11-04 03:24:17"
Changed by task "doorbell_lastchange"
Then I use the getproperty value method again, now there wont be a new history log entry, but the old one will be changed to
old "2009-11-03 12:15:34"
new "2009-11-04 03:25:28"
Changed by task "doorbell_lastchange"
As if the first change was never there.... and when I check the task in question, it says: Last executed: "2009-11-02 14:35:17"
I disabled the task, and it still did the same.
when I tell the property to log changes to the device / userlog, nothing will be in there, even though the value keeps changing every time I do a getpropertyvalue on it.
As far as I found it is only on all the devices I have with this property, but it's hard to say for sure (since the changes arent being logged anywhere)
Any idea why this is?
Regards,
LostDreamer