Compare commits
No commits in common. "main" and "1.0.2" have entirely different histories.
|
|
@ -41,6 +41,10 @@ async def main():
|
||||||
status = await inverter_client.get(
|
status = await inverter_client.get(
|
||||||
ReadRegister.inverter_reg_status, slave_id
|
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}")
|
LOGGER.info(f"-- INVERTER -- Status: {status}")
|
||||||
|
|
||||||
|
|
@ -83,10 +87,6 @@ async def main():
|
||||||
|
|
||||||
LOGGER.info(f"Sleeping {REQUEST_INTERVAL}")
|
LOGGER.info(f"Sleeping {REQUEST_INTERVAL}")
|
||||||
await asyncio.sleep(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(
|
def send_data(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue