Local sensor data

Is there a simple way to read the p1 and p2 value locally instead of using api from madavi or sensor.community.
I want to use these values to control my ventilation unit…

How to start, simple?

It depends on your setup. Do you have a prebuilt setup? Or did you build one yourself?

In the configuration interface, there are fields for a custom API you can transmit the data to.
Access the sensor through you router and configure it.

Thank you both for the answer.
The idea is that I want to receive in loxone with http get requests these values.
So the question is how can I setup the ESP8266 to store these value locally and then call these values with loxone http get requests?

Answer to Jan:
Can I modify the code to add a flask server on the ESP8266 to store the values there? I think this might be the solution.

Answer to pjg:
I need to install a php server on a different machine for example raspberry pi?

If I remember correctly, there is a data.json file that you query from the sensor node directly, something like:
where w.x.y.z is the ip-address of the sensor node.

That should contain the most recent measurement.

Perhaps instead of knowing the ip, you can query it by hostname, something like: feinstaubsensor-xxxx.local . I am not completely sure because I am not home at the moment and cannot verify it.
This might also depend on your own network and policies to block/allow things like mdns.

1 Like

Hey Bertrik,

Just arrived at home from work and tested this with the sensor that is working already.
I can confirm that it works.
Looks like I can use the json as input to my loxone system.

So thank you very much for the not have to do anything solution.

1 Like

For the hostname, it appears to be "airRohr-hardwareid.local’.

So for example, for my own sensors, I can get my own JSON locally by host name, using
curl http://airRohr-9137604.local/data.json

The number 9137604 is the hardwareid of your node, you can find that at devices.sensor.community | käyttäjäkonfiguraatio

1 Like

thank you.

I got one step further and normally I can do what I want without coding stuff on this end which is nice.

Good to know, thank you! Do you happen to know if this documented anywhere? Perhaps you found it by simply looking around on that IP-adress?

Anyway, I didn’t know this, so I wrote a little Python script to scrape all values from the web interface. Which is less work than setting it up with an API. But reading the json file is even faster. Oh well.

I’m not sure if/where this is documented or how/when I found out about this, probably noticed it when looking inside the firmware source code.

1 Like

ok, good tip for the curl http://airRohr-9137604.local/data.json
the ip address is not fixed I found out.

1 Like