I am trying to call a simple rest api and use the results. The call is:
http://server/n365_ilist.php?hw=iOS&imei=IMEI&pw=PASSWORD
The result is then:
[{"login":"loginnumber","imei":"imeinumer","name":"303_707","carno":"1","gps":"time and coords","log":"OUT 2021-11-30 22:01:04","google":"googlecoords","baidu":"baiducoords","speed":null,"bat":"0","icon":"1","marker":"11","device":"303","ver":"93;0000;0","sec":"300","level":"100","expdate":null,"loc":"MX","onoff":"03","gexpdate":null,"iccid":"number","ggkey":null,"startdate":"2021-07-21","pic":"2"}]
I want to get the fields of gps, google and log.
I think I have played around with all the REST integrations I could find, but as I am not sure what I am doing, I dont know how to get the results. Anyone have any tips?
This was my latest try: (but it results in nothing. I really cant find out what the value of json_attributes_path should be). But perhaps that is not even the issue.
sensor:
- platform: rest
name: cargps
resource: http://server/n365_ilist.php?hw=iOS&imei=IMEI&pw=PASSWORD
scan_interval: 300
json_attributes_path: "$"
json_attributes:
- google
- log
- gps