Page 1 of 1
Dummy device Barometer
Posted: Tuesday 31 August 2021 12:12
by Ctenberge
hello, I have installed the BMP388 on a Raspberry Pi and send its measurements to another with Domoticz using Curl.
The problem is this: the values are send properly, I get the "OK" messages on both temperature and pressure on the commandline.
But the dummy device Barometer in Weather on Domoticz goes blanc where the true value in setup/devices shows the proper value (1025.9)
How is this possible?
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 13:52
by waltervl
So you have a combined Temp/baro device and update it with
https://www.domoticz.com/wiki/Domoticz_ ... Fbarometer
Perhaps try sending baro pressure as an integer (eg 1026), I believe this is a known issue (but not documented yet)
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 14:12
by Ctenberge
You gave me an idea so I created a dummy device for the combination temperature/pressure. I changed the Curl in that combination and fired the command. Same result, but by now the temperature went also blanc.
Looking in the device section I saw this:
78 Dummy 1409E 1 BMP388 Temp + Baro BMP085 I2C 1026, 22.52
both readings are present but not in the temperature or weather tabs.
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 14:41
by FireWizard
Hello @Ctenberge,
Hmm, I would say; "Here again".
This is a similar problem as discussed at:
viewtopic.php?f=4&t=36885&p=278910#p278910
If you look this time to
https://www.domoticz.com/wiki/Domoticz_ ... .2Fsensors
Code: Select all
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=TEMP;BAR;BAR_FOR;ALTITUDE
For a virtual Temperature/Barometer sensor you have 4 parameters and not 2.
These parameter are separated by a semicolon.
So you should fire:
Code: Select all
http://your.ip.address:8080/json.htm?type=command¶m=udevice&idx=1234&nvalue=0&svalue="22.52;1026;0;0"
Replace the IDX number, 1234, with the IDX number of your virtual sensor.
Let us know
Regards
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 16:13
by Ctenberge
I did. This is the result:
{
"status" : "OK",
"title" : "Update Device"
}
./BMP388.sh: line 26: 1026: command not found
./BMP388.sh: line 26: 0: command not found
./BMP388.sh: line 26: 0: command not found
I went to change the both zero's in "22.52;0;1026;0" and got a similar effect
also in "0;22.52;0;1026" with disapointing results
The status "OK" gets no result in the devices tab or Weather tab.
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 16:17
by waltervl
Can you give the complete url you are sending?
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 16:26
by Ctenberge
I can, but your information about adding a zero as a second parameter works, but in another way.
As the values temperature and pressure are separated from each other, so are the url's.
I had it with two curl commands and tried it combined, wich did not work as demonstrated before.
So back to the two commands I added the zero after the variable and it works now. This is how it turned out:
curl "
http://mynetwork:8080/json.htm?type=com ... PERATURE;0"
curl "
http://mynetwork:8080/json.htm?type=com ... ue=$DRUK;0"
Thanks for setting me on the right track
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 16:35
by waltervl
For the next time I would advice you to really read the Wiki Page about Domoticz API URL's
Temperature should be .....&svalue=$TEMP
Barometer should be .....&svalue=$DRUK;0 (or 1,2,3)
So you have to add the 0 (or another number) for the barometer prediction.
For the Temp no trailing 0 needed.
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 16:59
by FireWizard
Hi,
@waltervl
I tested it, but it seems that the wiki is not completely correct.
If I send the combined command, as shown above, it does not update the temperature, while it updates the pressure and the trailing 0 results in prediction "stable".
So it looks the combined command does not work, as expected.
Regards
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 17:23
by waltervl
FireWizard wrote: Tuesday 31 August 2021 16:59
Hi,
@waltervl
I tested it, but it seems that the wiki is not completely correct.
If I send the combined command, as shown above, it does not update the temperature, while it updates the pressure and the trailing 0 results in prediction "stable".
So it looks the combined command does not work, as expected.
Regards
On what device, a combined temp/baro device or 2 separate devices as @Ctenberge is having now?
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 18:05
by FireWizard
@waltervl,
No it is the combined device.and also@Ctenberge reported it as not working.
For that reason, he probably moved to 2 separated devices.
It looks that the data is handled by Domoticz as if, it was a Barometer device only.
I have to test further, also with other combined sensors.
I rarely use http to send data to Domoticz, as I prefer MQTT.
Can you test as well?
Regards
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 18:16
by waltervl
I tested it. It works also on a combined device.
Do not use quotes: svalue=22.1;1026;0;0 is working, svalue="22.1;1026;0;0" gives a 0 temperature but a valid baro pressure....
Code: Select all
http://192.XXX.XXX.XXX:8080/json.htm?type=command¶m=udevice&idx=364&nvalue=0&svalue=22.1;1026;0;0
Edit: non integers also work eg svalue=22.12;1026.15;0;0
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 18:51
by FireWizard
Hi, @waltervl,
It has been a mistake from my side. I did not check the Wiki carefully, as I automatically used the same syntax as with MQTT.
I do confirm your observations. Without the quotes, it functions as intended. With the quotes the Temperature stays 0, but the pressure and prediction is okay. Funny. For the values, you can use 2 digits after the decimal point.
Now the Wiki:
For Temperature/barometer it is stated that:
Barometer forecast can be one of:
0 = No Info
1 = Sunny
2 = Paryly Cloudy // Note the typo
3 = Cloudy
4 = Rain
This is not correct, I tested it with the latest beta and found:
0 = Stable
1 = Sunny
2 = Cloudy
3 = Unstable
4 = Thunderstorm
5 = Unknown
6 = Cloudy/Rain
=> 7 = Unknown
The 4th 0 (intended for altitude) is not needed and may be omitted.
If you test as well and can confirm my findings, we should correct the Wiki.
I will test also the other sensors, but not today.
Regards
Re: Dummy device Barometer
Posted: Tuesday 31 August 2021 21:41
by waltervl
Thanks for further testing. I will check too and update the wiki. But also not today

Re: Dummy device Barometer
Posted: Thursday 02 September 2021 22:26
by waltervl
I did some source code investigation:
For dummy devices the list is
0 { bmpbaroforecast_stable, "Stable" },
1 { bmpbaroforecast_sunny, "Sunny" },
2 { bmpbaroforecast_cloudy, "Cloudy" },
3 { bmpbaroforecast_unstable, "Unstable" },
4 { bmpbaroforecast_thunderstorm, "Thunderstorm" },
5 { bmpbaroforecast_unknown, "Unknown" },
6 { bmpbaroforecast_rain, "Cloudy/Rain" },
For other baro devices in native integrations, like in buienradar the list is different....
0 { wsbaroforecast_heavy_snow, "Heavy Snow" },
1 { wsbaroforecast_snow, "Snow" },
2 { wsbaroforecast_heavy_rain, "Heavy Rain" },
3 { wsbaroforecast_rain, "Rain" },
4 { wsbaroforecast_cloudy, "Cloudy" },
5 { wsbaroforecast_some_clouds, "Some Clouds" },
6 { wsbaroforecast_sunny, "Sunny" },
7 { wsbaroforecast_unknown, "Unknown" },
8 { wsbaroforecast_unstable, "Unstable" },
9 { wsbaroforecast_stable, "Stable" },