Skip to content

Commit

Permalink
add more try excepts around network calls in the main_loop
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed Sep 11, 2023
1 parent 1e3f2eb commit c01d9c0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions alfalfa_bacnet_bridge/alfalfa_bacnet_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,14 @@ def run(self):
@recurring_function(1000)
@bacpypes_debugging
def main_loop():
inputs = self.client.get_inputs(self.site_id)
outputs = self.client.get_outputs(self.site_id)

sim_time = self.client.get_sim_time(self.site_id)
try:
inputs = self.client.get_inputs(self.site_id)
outputs = self.client.get_outputs(self.site_id)

sim_time = self.client.get_sim_time(self.site_id)
except Exception as e:
print(e)
return
self.device._date_time = sim_time

set_inputs = {}
Expand Down

0 comments on commit c01d9c0

Please sign in to comment.