diff --git a/core/site.go b/core/site.go index 83bc8290f..033ba3ee3 100644 --- a/core/site.go +++ b/core/site.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "math" + "math/rand/v2" "strings" "sync" "testing" @@ -481,6 +482,9 @@ func (site *Site) collectMeters(key string, meters []config.Device[api.Meter]) [ mm := make([]measurement, len(meters)) fun := func(i int, dev config.Device[api.Meter]) { + // decouple potential double-connects on modbus + time.Sleep(time.Duration(rand.Uint64N(uint64(100 * time.Millisecond)))) + meter := dev.Instance() // power