Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes snaptec repo #1133

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/modules/devices/smart_me/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self,

def update(self, session: Session) -> None:
def parse_phase_values(key: str) -> List[float]:
return [response[key+str(i)] * 1000 for i in range(1, 4)]
return [response[key+str(i)] for i in range(1, 4)]

response = session.get('https://smart-me.com:443/api/Devices/' +
self.component_config.configuration.id, timeout=3).json()
Expand All @@ -33,6 +33,7 @@ def parse_phase_values(key: str) -> List[float]:
currents[0] = response["Current"]

powers = parse_phase_values("ActivePowerL")
powers = [powers[i] * 1000 for i in range(0, 3)]
if powers[0] == 0:
powers[0] = response["ActivePower"]

Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/solar_watt/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def request(url: str) -> Dict:
energy_manager_response = request('http://'+ip_address + '/rest/kiwigrid/wizard/devices')
else:
gateway_response = request('http://'+ip_address+':8080/')
for component in components.values():
for component in components:
if isinstance(component, SolarWattInverter):
if energy_manager_response is None:
energy_manager_response = request('http://'+ip_address + '/rest/kiwigrid/wizard/devices')
Expand Down