staromeste / homebridge-http-advanced-accessory

Supports all devices on HomeBridge Platform / Bridges devices to http
Apache License 2.0
65 stars 22 forks source link

Need guidance #35

Open psmith3 opened 2 years ago

psmith3 commented 2 years ago

Not a bug, just a config issue.

I am having an issue pulling a JSON value and returning the value. Could someone tell me what I am doing wrong here?

The url I am pulling the JSON info is http://172.30.17.100:4200/state/chlorinator/1

The JSON being returned is {"id":1,"disabled":false,"poolSetpoint":50,"spaSetpoint":10,"superChlorHours":8,"type":{"val":0,"name":"pentair","desc":"Pentair"},"body":{"val":0,"name":"pool","desc":"Pool"},"name":"AquaRite","isActive":true,"lastComm":1631218556112,"targetOutput":50,"saltLevel":3300,"saltRequired":0,"status":{"name":"clean","desc":"Clean Cell","val":16},"currentOutput":50,"superChlorRemaining":0,"superChlor":false}

I am trying to pull the "saltLevel" value (currently 3300) and display it in an appropriate sensor type. Currently trying to expose it in an OccupancySensor but am open to suggestions on a better sensor type. Here is my config:

{ "accessory": "HttpAdvancedAccessory", "name": "Salt", "service": "OccupancySensor", "forceRefreshDelay": 1800, "urls": { "getOccupancySensorState": { "url": "http://172.30.17.100:4200/state/chlorinator/1", "mappers": [ { "type": "jpath", "parameters": { "jpath": "$.saltLevel" } } ] } }, "_bridge": { "username": "0E:BE:E6:58:83:DC", "port": 36986 } }

Can someone tell me why this is not returning the saltLevel value?

psmith3 commented 2 years ago

Bump.

Does anyone familiar with this project have a moment to look at my question?