Read actual sensor value using API

Post Reply
eiaro
Posts: 2
Joined: Monday 22 May 2017 12:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Read actual sensor value using API

Post by eiaro » Monday 22 May 2017 12:33

I've read and searched, but haven't been able to find a way to get the current last reading of a sensor using the API.

Any suggestions before I start changing source code?

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Read actual sensor value using API

Post by Egregius » Monday 22 May 2017 14:08

Did you even look at the API wiki page? It's full of explanation.

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Read actual sensor value using API

Post by Egregius » Monday 22 May 2017 14:08

Did you even look at the API wiki page? It's full of explanation.

eiaro
Posts: 2
Joined: Monday 22 May 2017 12:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Read actual sensor value using API

Post by eiaro » Monday 22 May 2017 14:34

Of course I did. :)

I *can* use /json.htm?type=devices&rid=IDX, but it return a lot of data I dont need.

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Read actual sensor value using API

Post by Egregius » Monday 22 May 2017 15:34

Just use the ones you need and skip the rest.

stlaha2007
Posts: 437
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Read actual sensor value using API

Post by stlaha2007 » Thursday 06 July 2017 10:36

Look at the python, lua examples for a way to filter the exact value...

In bash {cli} i do simular thing like: curl 'domosite:8080/json.htm.....' | grep 'value' | awk {}


Sent from my D6603 using Tapatalk

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest