BMP280

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Milifax
Normal user
Posts: 10
Joined: 30 Jul 2017, 12:31

BMP280

#1 Post by Milifax » 30 Jul 2017, 12:36

Hi,

My setup is a Wemos D1 with a BMP280 sensor attached to it. This reports to Domoticz.
As Domoticz didn't have the BMP280 sensor standard onboard, I requested it. They added it, which is nice.
However, the pressure doesn't get registered right.
They use a standard JSON method, see here http://www.domoticz.com/wiki/Domoticz_A ... Fbarometer

Code: Select all

/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=TEMP;BAR;BAR_FOR;ALTITUDE

The above sets the parameters for a Temp+Humidity+Barometer device

    IDX = id of your device (This number can be found in the devices tab in the column "IDX")
    TEMP = Temperature
    BAR = Barometric pressure
    BAR_FOR = Barometer forecast
    ALTITUDE= Not used at the moment, can be 0


Barometer forecast can be one of:
0 = No Info
1 = Sunny
2 = Paryly Cloudy
3 = Cloudy
4 = Rain
Although sending the data to a temp+hum+baro sensor works in Domoticz, with this new type the pressure stays empty.

Does anyone have insight in the JSON send by EspEasy with the BMP280. Or is it adjustable to the standard Domoticz uses?

Thanks in advance

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: BMP280

#2 Post by grovkillen » 30 Jul 2017, 13:43

You need to create your own JSON since this new Domoticz sensor is not yet updated as such within ESP Easy.

https://www.letscontrolit.com/wiki/inde ... th_own_IDX
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Milifax
Normal user
Posts: 10
Joined: 30 Jul 2017, 12:31

Re: BMP280

#3 Post by Milifax » 31 Jul 2017, 11:30

grovkillen wrote: 30 Jul 2017, 13:43 You need to create your own JSON since this new Domoticz sensor is not yet updated as such within ESP Easy.

https://www.letscontrolit.com/wiki/inde ... th_own_IDX
Thanks, that helped me a lot.

My solution:
To make ESPEasy work with Domoticz BMP280 sensor, disable the Send to controller for the specific device and;
add a rule in ESPEasy like the following:

Code: Select all

On System#Boot do    //When the ESP boots, do
  timerSet,1,240      //Set Timer 1 for the next event in 240 seconds
endon

On Rules#Timer=1 do
  SendToHTTP,192.168.1.80,8080,/json.htm?type=command&param=udevice&idx=69&nvalue=0&svalue=[Barometer#Temperature];[Barometer#Pressure];BAR_FOR;ALTITUDE
  timerSet,1,240       //Resets the Timer 1 for another 240 seconds
endon

-- Comment: Where Barometer is the name of the device and #Temperature and #Pressure are the valuenames
-- Above will send updates every 4 minutes, hench the timer set

Hope this helps any other users in the future.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: BMP280

#4 Post by grovkillen » 31 Jul 2017, 12:06

Glad to hear. Thanks for your report and guide!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests