@@ -222,8 +222,8 @@ void CRazberry::parseDevices(const Json::Value &devroot)
222
222
const std::string sID =ittInstance.key ().asString ();
223
223
_device.instanceID =atoi (sID .c_str ());
224
224
_device.indexID =0 ;
225
- if ((_device.instanceID ==0 )&&(haveMultipleInstance))
226
- continue ;// We skip instance 0 if there are more, since it should be mapped to other instances or their superposition
225
+ // if ((_device.instanceID==0)&&(haveMultipleInstance))
226
+ // continue;// We skip instance 0 if there are more, since it should be mapped to other instances or their superposition
227
227
228
228
const Json::Value instance=(*ittInstance);
229
229
@@ -519,7 +519,7 @@ void CRazberry::UpdateDevice(const std::string &path, const Json::Value &obj)
519
519
{
520
520
int devID=atoi (results[1 ].c_str ());
521
521
int scaleID=atoi (results[7 ].c_str ());
522
- pDevice=FindDeviceByScale (devID,scaleID);
522
+ pDevice=FindDeviceByScale (devID,scaleID,cmdID );
523
523
}
524
524
}
525
525
}
@@ -537,7 +537,7 @@ void CRazberry::UpdateDevice(const std::string &path, const Json::Value &obj)
537
537
{
538
538
int devID=atoi (results[1 ].c_str ());
539
539
int instanceID=atoi (results[7 ].c_str ());
540
- pDevice=FindDeviceInstance (devID,instanceID);
540
+ pDevice=FindDeviceInstance (devID,instanceID,cmdID );
541
541
}
542
542
}
543
543
}
@@ -817,31 +817,33 @@ void CRazberry::UpdateDevice(const std::string &path, const Json::Value &obj)
817
817
pDevice->sequence_number +=1 ;
818
818
if (pDevice->sequence_number ==0 )
819
819
pDevice->sequence_number =1 ;
820
- SendDevice2Domoticz (pDevice);
820
+ SendDevice2Domoticz (pDevice);
821
821
}
822
822
823
- ZWaveBase::_tZWaveDevice* CRazberry::FindDeviceByScale (const int nodeID, const int scaleID)
823
+ ZWaveBase::_tZWaveDevice* CRazberry::FindDeviceByScale (const int nodeID, const int scaleID, const int cmdID )
824
824
{
825
825
std::map<std::string,_tZWaveDevice>::iterator itt;
826
826
for (itt=m_devices.begin (); itt!=m_devices.end (); ++itt)
827
827
{
828
828
if (
829
829
(itt->second .nodeID ==nodeID)&&
830
- (itt->second .scaleID ==scaleID)
830
+ (itt->second .scaleID ==scaleID)&&
831
+ (itt->second .commandClassID ==cmdID)
831
832
)
832
833
return &itt->second ;
833
834
}
834
835
return NULL ;
835
836
}
836
837
837
- ZWaveBase::_tZWaveDevice* CRazberry::FindDeviceInstance (const int nodeID, const int instanceID)
838
+ ZWaveBase::_tZWaveDevice* CRazberry::FindDeviceInstance (const int nodeID, const int instanceID, const int cmdID )
838
839
{
839
840
std::map<std::string,_tZWaveDevice>::iterator itt;
840
841
for (itt=m_devices.begin (); itt!=m_devices.end (); ++itt)
841
842
{
842
843
if (
843
844
(itt->second .nodeID ==nodeID)&&
844
- (itt->second .instanceID ==instanceID)
845
+ (itt->second .instanceID ==instanceID)&&
846
+ (itt->second .commandClassID ==cmdID)
845
847
)
846
848
return &itt->second ;
847
849
}
0 commit comments