Open IgorYbema opened 1 year ago
Quite possibly. It certainly looks like p would only be set if readSingleReg fails. Do you have one connected with a serial console open? Does it constantly log “modbus error” when in battery save mode? I’ll take a look when I get a chance.
Not using batterysave but I just noticed it while modifying the code a bit to suit my own situation
Should this be the other way around? https://github.com/cmcgerty/Sofar2mqtt/blob/4f061801fb2c7e3699ccd78cc1b99fed54aead0d/Sofar2mqtt/Sofar2mqtt.ino#L459-L462