-
-
Notifications
You must be signed in to change notification settings - Fork 901
Description
Hi, @markruys
What is the purpose of this change in Value.cpp?
if (!IsWriteOnly())
{
- // queue a "RequestValue" message to update the value
- if (m_refreshAfterSet) {
- cc->RequestValue( 0, m_id.GetIndex(), m_id.GetInstance(), Driver::MsgQueue_Send );
+ if (m_refreshAfterSet)
+ {
+ if (!node->GetCommandClass(Internal::CC::Supervision::StaticGetCommandClassId()))
+ {
+ // queue a "RequestValue" message to update the value
+ cc->RequestValue( 0, m_id.GetIndex(), m_id.GetInstance(), Driver::MsgQueue_Send );
+ }
}
}
It broke setting LEDs in Homeseer HS-WD200+. Now whenever a LED is turned ON or OFF, the command is delivered to the Homeseer, but the value in the OZW memory is not updated. And since Domoticz checks current value before setting a new one, this causes problems for sequences like this:
- Turn LED1 to Red (works if current value is Off)
- Turn LED1 to Off (doesn't do anything because the value is still Off in OZW memory).
I checked what GetCommandClass() returns in my case, and it's not NULL, so RequestValue() is not getting called.
I wonder if this entire "skip refresh" logic should be accounted for here:
open-zwave/cpp/src/value_classes/ValueInt.cpp
Lines 116 to 129 in f150a98
bool ValueInt::Set(int32 const _value) | |
{ | |
// create a temporary copy of this value to be submitted to the Set() call and set its value to the function param | |
ValueInt* tempValue = new ValueInt(*this); | |
tempValue->m_value = _value; | |
// Set the value in the device. | |
bool ret = ((Value*) tempValue)->Set(); | |
// clean up the temporary value | |
delete tempValue; | |
return ret; | |
} |
where the code is just creating a temporary value and is sending it to the device, apparently expecting that a refresh will happen in the end.