ESP8266 + BME280 to domoticz over JSON and HTTP

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
svd71
Posts: 6
Joined: Saturday 09 January 2021 17:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

ESP8266 + BME280 to domoticz over JSON and HTTP

Post by svd71 »

Hi all,
I made a sensor based on the BME280 and tried to translate it data via moscquitto-brocker:

mosquitto_pub -h 192.168.1.32 -t 'domoticz/in' -m '{"idx":"8","nvalue":"0","svalue":"22;0;60;0;820;0"}'


Image

what is wrong?

------------------

Trying to send data via HTTP with description from domoticz-wiki:

Image

can someone explain me, what I did wrong?

Thank you for any advise.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: ESP8266 + BME280 to domoticz over JSON and HTTP

Post by waaren »

svd71 wrote: Thursday 11 March 2021 13:30 can someone explain me, what I did wrong?
Mind the quotes..

The mosquitto command should be

Code: Select all

mosquitto_pub -h 192.168.1.32 -t 'domoticz/in' -m '{"idx":8,"nvalue":0,"svalue":"22;0;60;0;820;0"}'
and the curl

Code: Select all

curl "http://192.168.1.32:801/json...."
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
svd71
Posts: 6
Joined: Saturday 09 January 2021 17:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 + BME280 to domoticz over JSON and HTTP

Post by svd71 »

Thank you very mucht. The json is worked fine. What about "a nil value (field '?')" in the log?

Image

And HTTP did not help:
Image
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: ESP8266 + BME280 to domoticz over JSON and HTTP

Post by waaren »

svd71 wrote: Thursday 11 March 2021 14:55 Thank you very much. The json is worked fine. What about "a nil value (field '?')" in the log?
the nil value message comes from one of your Lua or Blockly scripts hard to tell what causes this without the script code.

And HTTP did not help:
You (again) forgot the quotes around the http string.

Please post your log / results as text and not as pictures. Thx !
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest