So I’m three days into Home Assistant and I’m probably trying the deep end too soon but here I go. I’m trying to get some PowerData from PowerHouse Dynamics eMonitor/SiteSage.
Here the fairly minimal config entry that I’ve come up with to see if I can get the systems to talk:
sensor:
- platform: rest
name: sub
resource: http://192.168.125.85/status.xml
json_attributes_path: "$.emonitor"
json_attributes:
- "hardware"
- "channels"
value_template: '{{ value_json["hardware"]["network"]["IP_address"] }}'
The log is showing:
2020-10-28 09:43:47 WARNING (SyncWorker_4) [homeassistant.components.rest.sensor] REST result could not be parsed as JSON
2020-10-28 09:44:09 WARNING (SyncWorker_1) [urllib3.connectionpool] Connection pool is full, discarding connection: px1.tuyaus.com
2020-10-28 09:44:17 WARNING (SyncWorker_16) [homeassistant.components.rest.sensor] REST result could not be parsed as JSON
The endpoint returns XML but my understanding is that it should be automagically converted to JSON
Here is a sample of what it returns, don’t mind the mismatch IP addresses on the targets. I have two of them and I grabbed the example out from the second one.
<?xml version="1.0" encoding="UTF-8"?>
<emonitor>
<hardware>
<serial_number>4041</serial_number>
<TLA_number>950-000002</TLA_number>
<TLA_revision>B</TLA_revision>
<firmware_version>16513</firmware_version>
<network>
<MAC_address>0090C2DE0734</MAC_address>
<IP_address>192.168.125.189</IP_address>
</network>
</hardware>
<channels>
<channel Number="1">
<active>1</active>
<label>Main Power</label>
<CT_size>150</CT_size>
<paired_with_channel>2</paired_with_channel>
<input>1</input>
<max_power>75</max_power>
<avg_power>20</avg_power>
<inst_power>13</inst_power>
</channel>
<channel Number="2">
<active>1</active>
<label>Main Power</label>
<CT_size>150</CT_size>
<paired_with_channel>1</paired_with_channel>
<input>1</input>
<max_power>126</max_power>
<avg_power>57</avg_power>
<inst_power>52</inst_power>
</channel>
<channel Number="3">
<active>1</active>
<label>Outback Master</label>
<CT_size>50</CT_size>
<paired_with_channel>4</paired_with_channel>
<input>1</input>
<max_power>1</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="4">
<active>1</active>
<label>Outback Master</label>
<CT_size>50</CT_size>
<paired_with_channel>3</paired_with_channel>
<input>1</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="5">
<active>1</active>
<label>Outback Slave #1</label>
<CT_size>50</CT_size>
<paired_with_channel>6</paired_with_channel>
<input>1</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="6">
<active>1</active>
<label>Outback Slave #1</label>
<CT_size>50</CT_size>
<paired_with_channel>5</paired_with_channel>
<input>1</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="7">
<active>1</active>
<label>Entry E Right</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>1</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="8">
<active>1</active>
<label>Garage W/Entry E Lef</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>92</max_power>
<avg_power>88</avg_power>
<inst_power>88</inst_power>
</channel>
<channel Number="9">
<active>1</active>
<label>120V panel outlet</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>1</max_power>
<avg_power>1</avg_power>
<inst_power>1</inst_power>
</channel>
<channel Number="10">
<active>1</active>
<label>Pool Pump/Chlorinato</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>9</max_power>
<avg_power>8</avg_power>
<inst_power>8</inst_power>
</channel>
<channel Number="11">
<active>1</active>
<label>Oven/Microwave</label>
<CT_size>50</CT_size>
<paired_with_channel>12</paired_with_channel>
<input>0</input>
<max_power>16</max_power>
<avg_power>14</avg_power>
<inst_power>15</inst_power>
</channel>
<channel Number="12">
<active>1</active>
<label>Oven/Microwave</label>
<CT_size>50</CT_size>
<paired_with_channel>11</paired_with_channel>
<input>0</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="13">
<active>1</active>
<label>Dryer Outlet</label>
<CT_size>50</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>1</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="14">
<active>1</active>
<label>Outback Slave #2</label>
<CT_size>50</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>1</input>
<max_power>1</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="15">
<active>1</active>
<label>AV EVSE</label>
<CT_size>50</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>5</max_power>
<avg_power>3</avg_power>
<inst_power>4</inst_power>
</channel>
<channel Number="16">
<active>1</active>
<label>JuiceBox EVSE</label>
<CT_size>50</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>2</max_power>
<avg_power>1</avg_power>
<inst_power>2</inst_power>
</channel>
<channel Number="17">
<active>1</active>
<label>Pool Light</label>
<CT_size>50</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>1</max_power>
<avg_power>1</avg_power>
<inst_power>1</inst_power>
</channel>
<channel Number="18">
<active>1</active>
<label>Heat Pump</label>
<CT_size>50</CT_size>
<paired_with_channel>19</paired_with_channel>
<input>0</input>
<max_power>14</max_power>
<avg_power>12</avg_power>
<inst_power>13</inst_power>
</channel>
<channel Number="19">
<active>1</active>
<label>Heat Pump</label>
<CT_size>50</CT_size>
<paired_with_channel>18</paired_with_channel>
<input>0</input>
<max_power>11</max_power>
<avg_power>9</avg_power>
<inst_power>9</inst_power>
</channel>
<channel Number="20">
<active>1</active>
<label>Main Disposal</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="21">
<active>1</active>
<label>Prep Disposal</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="22">
<active>1</active>
<label>Blink EVSE</label>
<CT_size>50</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>1</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="23">
<active>1</active>
<label>L6-20</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>0</input>
<max_power>0</max_power>
<avg_power>0</avg_power>
<inst_power>0</inst_power>
</channel>
<channel Number="24">
<active>1</active>
<label>Xantrex</label>
<CT_size>20</CT_size>
<paired_with_channel>0</paired_with_channel>
<input>1</input>
<max_power>5</max_power>
<avg_power>3</avg_power>
<inst_power>4</inst_power>
</channel>
</channels>
</emonitor>