# Failing to post data to Madavi

**URL:** https://forum.sensor.community/t/failing-to-post-data-to-madavi/1759
**Category:** Uncategorized
**Created:** [December 22, 2022, 6:41pm UTC](https://forum.sensor.community/t/failing-to-post-data-to-madavi/1759 "2022-12-22T18:41:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bert1](https://forum.sensor.community/user_avatar/forum.sensor.community/bert1/32/1174_2.png) [@Bert1](https://forum.sensor.community/u/Bert1)
#### Post date: [December 22, 2022, 6:41pm UTC](https://forum.sensor.community/t/failing-to-post-data-to-madavi/1759/1 "2022-12-22T18:41:45Z")

</div>

I am succesfully posting data to sensor.community but failing to post to Madavi at [https://api-rrd.madavi.de/data.php](https://api-rrd.madavi.de/data.php)  
The strange thing is that fMadavi acknowledges receipt of my post with code 200 and “Sensor: esp8266-xxxxxxx”.

This is what it looks like (using Postman):

Header:  
Content-Type: application/json  
X-Sensor: esp8266-xxxxxxx

Body:  
{  
“software\_version”: “test”,  
“sensordatavalues”: [  
{“value\_type”: “SPS30\_P0”, “value”: 7},  
{“value\_type”: “SPS30\_P1”, “value”: 19},  
{“value\_type”: “SPS30\_P2”, “value”: 15}  
{“value\_type”: “temperature”,“value”: 11}  
{“value\_type”: “humidity”,“value”: 75}  
]  
}

It makes no difference to put numbers between “”. The same procedure was also tested with Postman for sensor.community (requires X-pin: 1 and api at [https://api.sensor.community/v1/push-sensor-data/](https://api.sensor.community/v1/push-sensor-data/) and there it works fine).  
I wanted to implement this in my own software and for sensor.community it works fine but fails for Madavi (written in the Arduino ide). Both were also tested with Postman and it shows the same problem.

Am I missing something?

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [December 23, 2022, 6:34am UTC](https://forum.sensor.community/t/failing-to-post-data-to-madavi/1759/2 "2022-12-23T06:34:35Z")

</div>

> **[EN APIs](https://github.com/opendata-stuttgart/meta/wiki/EN-APIs)**
>
> Opendata Stuttgart organisiert und reguliert. Contribute to opendata-stuttgart/meta development by creating an account on GitHub.

You also set an X-Pin for Madavi, didn’t you ?  
Are you sure the value type looks like SPS30\_P0? I can’t find the list.  
And “temperature” and “humidity” ?

---

<div class="post-metadata">

### Author: ![Bert1](https://forum.sensor.community/user_avatar/forum.sensor.community/bert1/32/1174_2.png) [@Bert1](https://forum.sensor.community/u/Bert1)
#### Post date: [December 23, 2022, 11:52am UTC](https://forum.sensor.community/t/failing-to-post-data-to-madavi/1759/3 "2022-12-23T11:52:45Z")

</div>

I have read that Wiki more than 10 times but not finding the answer I am looking for.  
Below the json, reply from Madavi is 200 +(Sensor: esp8266-xxxxxxx  
ok) so should be ok, but actually no data visible in their Figs. (using Postman for testing).  
(X-Pin: … not required for Madavi, but I have tried with 0 or 1 but doesn’t work. Not needed to put values between “”).

Headers:  
Content-Type: application/json  
X-Sensor: esp-xxxxxxx

Body:  
{  
“software\_version”: “test”,  
“sensordatavalues”: [  
{“value\_type”: “SPS30\_P0”, “value”: 7},  
{“value\_type”: “SPS30\_P1”, “value”: 19},  
{“value\_type”: “SPS30\_P2”, “value”: 15},  
{“value\_type”: “temperature”,“value”: 11},  
{“value\_type”: “humidity”,“value”: 75}  
]  
}

---

<div class="post-metadata">

### Author: ![Bert1](https://forum.sensor.community/user_avatar/forum.sensor.community/bert1/32/1174_2.png) [@Bert1](https://forum.sensor.community/u/Bert1)
#### Post date: [December 23, 2022, 11:53pm UTC](https://forum.sensor.community/t/failing-to-post-data-to-madavi/1759/4 "2022-12-23T23:53:05Z")

</div>

Ok, it works now, BME data is now appearing on Madavi. And Madavi is accepting SPS30\_ but only if I also include SPS30\_P4, mystery solved:  
{  
“software\_version”: “test”,  
“sensordatavalues”: [  
{“value\_type”: “SPS30\_P0”, “value”: 8},  
{“value\_type”: “SPS30\_P1”, “value”: 18},  
{“value\_type”: “SPS30\_P2”, “value”: 16},  
{“value\_type”: “SPS30\_P4”, “value”: 17},  
{“value\_type”: “BME280\_temperature”, “value”: 13.5},  
{“value\_type”: “BME280\_humidity”, “value”: 70},  
{“value\_type”: “BME280\_pressure”, “value”: 101000},  
{“value\_type”: “signal”, “value”: -50}  
]  
}
