Hi all,
I’m i trying to make a few sensors but I don’t think I’m getting the json path correct or not sure what I’m doing wrong, maybe someone can take a look and help me out.
Here is my sensor:
- platform: rest
name: truenas_plugin_sonarr
resource: "http://192.168.**xxx.xxx**/api/v2.0/plugin/id/sonarr"
headers:
Authorization: Bearer 1-**XXXXXXXX**
Content-type: application/json
User-Agent: Home Assistant
scan_interval: 1800
json_attributes:
- state
and here is the output of the nas when i run on a terminal:
curl -X GET -H “Authorization: Bearer 1-XXXXX” “http://192.168.xxx.xxx/api/v2.0/plugin”
[
{
"jid": 1,
"name": "Plex",
"boot": "on",
"state": "up",
"type": "pluginv2",
"release": "12.1-RELEASE-p13",
"ip4": "epair0b|192.168.XXX.XXX",
"ip6": null,
"template": null,
"doc_url": null,
"plugin": "plexmediaserver",
"plugin_repository": "https://github.com/freenas/iocage-ix-plugins.git",
"category": "entertainment",
"maintainer": "iXsystems <[email protected]>",
"id": "Plex",
"plugin_info": null,
"admin_portals": [
"http://192.168.XXX:XXX:32400/web"
],
"version": "1.22.3.4392",
"revision": "0",
"epoch": "0"
},
{
"jid": 2,
"name": "Resolop-SYNC",
"boot": "on",
"state": "up",
"type": "pluginv2",
"release": "12.1-RELEASE-p13",
"ip4": "epair0b|192.168.XXX.XXX",
"ip6": null,
"template": null,
"doc_url": null,
"plugin": "rslsync",
"plugin_repository": "https://github.com/ix-plugin-hub/iocage-plugin-index.git",
"category": "content",
"maintainer": null,
"id": "Resolop-SYNC",
"plugin_info": null,
"admin_portals": [
"http://192.168.XXX.XXX:8888/"
],
"version": "N/A",
"revision": "N/A",
"epoch": "N/A"
},
{
"jid": 3,
"name": "Transmission",
"boot": "on",
"state": "up",
"type": "pluginv2",
"release": "12.1-RELEASE-p13",
"ip4": "epair0b|192.168.XXX.XXX",
"ip6": null,
"template": null,
"doc_url": null,
"plugin": "transmission",
"plugin_repository": "https://github.com/ix-plugin-hub/iocage-plugin-index.git",
"category": "content",
"maintainer": null,
"id": "Transmission",
"plugin_info": null,
"admin_portals": [
"http://192.168.XXX.XXX:9091"
],
"version": "3.00",
"revision": "3",
"epoch": "0"
},
{
"jid": 7,
"name": "radarr",
"boot": "on",
"state": "up",
"type": "pluginv2",
"release": "12.2-RELEASE-p6",
"ip4": "epair0b|192.168.XXX.XXX",
"ip6": null,
"template": null,
"doc_url": null,
"plugin": "radarr",
"plugin_repository": "https://github.com/ix-plugin-hub/iocage-plugin-index.git",
"category": "content",
"maintainer": null,
"id": "radarr",
"plugin_info": null,
"admin_portals": [
"http://192.168.XXX.XXX:7878"
],
"version": "3.0.2.4552",
"revision": "0",
"epoch": "0"
},
{
"jid": 5,
"name": "sonarr",
"boot": "on",
"state": "up",
"type": "pluginv2",
"release": "12.2-RELEASE-p6",
"ip4": "vnet0|192.168.XXX.XXX/24",
"ip6": null,
"template": null,
"doc_url": null,
"plugin": "sonarr",
"plugin_repository": "https://github.com/ix-plugin-hub/iocage-plugin-index.git",
"category": "content",
"maintainer": null,
"id": "sonarr",
"plugin_info": null,
"admin_portals": [
"http://192.168.XXX.XXX:8989"
],
"version": "3.0.6.1196",
"revision": "0",
"epoch": "0"
}
Thanks For the Help!!