@@ -111,14 +111,13 @@ bool DallasTemperatureNode::resolveFilter() {
111111 }
112112 }
113113
114- LOG_ERROR (" ✖ %s: filter address not found on bus! Falling back to device index %d\n " , _id, deviceIndex_);
115- if (activeSensor->getAddress (deviceAddress_, deviceIndex_)) {
116- publishSelectedAddress ();
117- _sensorFound = true ;
118- return true ;
119- }
120-
121- memset (deviceAddress_, 0 , sizeof (deviceAddress_));
114+ // An explicitly mapped role accepts only its own ROM. Falling back to the
115+ // device index could hand the pool probe to the solar role on a shared bus.
116+ // Keep addressing the configured ROM so it is read again once it responds.
117+ char adr[18 ];
118+ address2String (filter, adr, sizeof (adr));
119+ LOG_ERROR (" ✖ %s: configured sensor [%s] not found on bus\n " , _id, adr);
120+ memcpy (deviceAddress_, filter, sizeof (DeviceAddress));
122121 publishSelectedAddress ();
123122 _sensorFound = false ;
124123 return false ;
@@ -196,11 +195,15 @@ uint8_t DallasTemperatureNode::getDeviceCount() const {
196195 return count;
197196}
198197
199- void DallasTemperatureNode::getDeviceAddressString (char *buffer, size_t size) const {
200- DeviceAddress addr;
198+ void DallasTemperatureNode::copySelectedAddress (DeviceAddress out) const {
201199 lockCache ();
202- memcpy (addr , cachedSelectedAddress_, sizeof (DeviceAddress));
200+ memcpy (out , cachedSelectedAddress_, sizeof (DeviceAddress));
203201 unlockCache ();
202+ }
203+
204+ void DallasTemperatureNode::getDeviceAddressString (char *buffer, size_t size) const {
205+ DeviceAddress addr;
206+ copySelectedAddress (addr);
204207 address2String (addr, buffer, size);
205208}
206209
0 commit comments