Hi! New to Home Assistant, looking to integrate my Eyedro energy meter (small device with a CT on each of the two legs feeding my panel). It reports data on a local httpd as a json with a single array and as a web page that appears to be updating in realtime via AJAX.
Example json array (responds on http://eyedrohost:8080/getdata):
{"data":[[998,12436,7800,968],[956,12437,4520,537]]}
I see that there's Rest, Scrape, and HACS multiscrape but it isn't clear to me which of those I should use and how I would be able to extract the data from that array to individual items. Can I use a value_template of {{ value_json.data[1][0]/1000 }} for power factor for example?
The array format appears to be (spaced for readability):
"data": [
[Leg A Power Factor * 1000, Leg A Voltage * 100, Leg A Current * 1000, Leg A Power],
[Leg B Power Factor * 1000, Leg B Voltage * 100, Leg B Current * 1000, Leg B Power]
]
}```
(Web page example image attached, responds on ``http://eyedrohost:8080/dashboard`` and pulls that same json from ``/getdata``, every 2000ms, replacing html td elements inner html with data[x][y] divided as appropriate on each)
I'm thinking multiscrape might be the way to go so it's one http get per refresh (if I understand that all correctly), with something like this? (scan interval of 20s, would reduce it to the 2s if it works)
```js
multiscrape:
- name: 'Multiscrape EYEdro Power Meter'
resource_template: 'http://eyedrohost:8080/getdata'
scan_interval: 20000
log_response: true
device_class: 'energy'
sensor:
- unique_id: multiscrape_eyedro_power_A_PF
name: 'Multiscrape EYEdro Power Meter A Power Factor'
value_template: '{{ value_json.data[1][0]/1000 }}'
- unique_id: multiscrape_eyedro_power_A_V
name: 'Multiscrape EYEdro Power Meter A Voltage'
value_template: '{{ value_json.data[1][1]/100 }}'
- unique_id: multiscrape_eyedro_power_A_I
name: 'Multiscrape EYEdro Power Meter A Current'
value_template: '{{ value_json.data[1][2]/1000 }}'
- unique_id: multiscrape_eyedro_power_A_P
name: 'Multiscrape EYEdro Power Meter A Power'
value_template: '{{ value_json.data[1][3] }}'
- unique_id: multiscrape_eyedro_power_B_PF
name: 'Multiscrape EYEdro Power Meter B Power Factor'
value_template: '{{ value_json.data[1][0]/1000 }}'
- unique_id: multiscrape_eyedro_power_B_V
name: 'Multiscrape EYEdro Power Meter B Voltage'
value_template: '{{ value_json.data[1][1]/100 }}'
- unique_id: multiscrape_eyedro_power_B_I
name: 'Multiscrape EYEdro Power Meter B Current'
value_template: '{{ value_json.data[1][2]/1000 }}'
- unique_id: multiscrape_eyedro_power_B_P
name: 'Multiscrape EYEdro Power Meter B Power'
value_template: '{{ value_json.data[1][3] }}'
Am I on the right track? Is multiscrape the best way? Do I have device_class in the right spot? What else am I missing? (I don't know what I don't know but I'm sure there's plenty!)
Thank you!