Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
289afca88d |
|
|
@ -41,10 +41,6 @@ async def main():
|
|||
status = await inverter_client.get(
|
||||
ReadRegister.inverter_reg_status, slave_id
|
||||
)
|
||||
except ReadException as error:
|
||||
LOGGER.error(f"Can't read register, {ReadRegister.inverter_reg_status}. "
|
||||
f"Error code: {error}. Sleep for 10 min")
|
||||
await asyncio.sleep(10*60) # Sleep 5 min
|
||||
|
||||
LOGGER.info(f"-- INVERTER -- Status: {status}")
|
||||
|
||||
|
|
@ -87,6 +83,10 @@ async def main():
|
|||
|
||||
LOGGER.info(f"Sleeping {REQUEST_INTERVAL}")
|
||||
await asyncio.sleep(REQUEST_INTERVAL)
|
||||
except ReadException as error:
|
||||
LOGGER.error(f"Can't read register, {ReadRegister.inverter_reg_status}. "
|
||||
f"Error code: {error}. Sleep for 10 min")
|
||||
await asyncio.sleep(60) # Sleep 1 min
|
||||
|
||||
|
||||
def send_data(
|
||||
|
|
|
|||
Loading…
Reference in New Issue