del13r
December 7, 2023, 12:29am
168
I had a look at the code for the most popular DEV integration and found the following
jsondata = await self._meters_report_value("rmsCurrent",report="production",phase=phase)
if jsondata is None:
return self.message_current_production_not_available if phase is None else None
return float(str(jsondata))
async def grid_status(self):
"""Return grid status reported by Envoy"""
if self.has_grid_status and self.endpoint_home_json_results is not None:
if self.endpoint_home_json_results.status_code == 200:
home_json = self.endpoint_home_json_results.json()
if ("enpower" in home_json.keys() and "grid_status" in home_json["enpower"].keys()):
return home_json["enpower"]["grid_status"]
self.has_grid_status = False
return None
async def envoy_info(self):
"""Return information reported by Envoy info.xml."""
device_data = {}
if self.endpoint_info_results:
try:
I searched my https://envoy.local/home.json file for both enpower and grid_status but unfortunately I dont have batteries, so that is as far as I can test/investigate.
I did find this post where someone else had the same idea.
Hi @del13r , thank you so much for these suggestions, you were indeed correct. The value is in the home.json page, under a section called enpower and grid_status as below. [yes was doing this during an outage]
[{“signal_strength”:0,“signal_strength_max”:0,“type”:“zigbee”,“connected”:true},{“signal_strength”:0,“signal_strength_max”:0,“type”:“subghz”,“connected”:true}],“enpower”:{“connected”:true,“grid_status”:“open”}}[Screenshot 2022-08-09 4.07.22 PM]
I got close using your data scraping idea, o…