Three remarks on that:
- Avoid doubleing ChildID's for temperature and relays (1-3 are "dual-functional", DS_First_Child_ID = 4 would help)
- Use wait(conversionTime) instead of sleep(conversionTime); millis will otherwise be reset.
- Better use FHEM's options to request an ACK from the Node; so state will not be update on controller side until ACK is sent from Node. (send(msg[message.sensor].set(Relays[message.sensor].relayState ? true : false)); is not needed; in FHEM: attr <MYSENSOR_0?> requestAck)