Page 1 of 1

update dummy device Baromater

Posted: Sunday 16 November 2025 14:49
by knasson
hi,
I created a dummy devic to manage the barometer pressure supplied by visual crossing.
why a got this? however the pressure appears in the device but not in the widget nor the icon.
baro.jpg
baro.jpg (42.47 KiB) Viewed 85 times

Re: update dummy device Baromater

Posted: Sunday 16 November 2025 15:25
by jvdz
How do you feed the data to the dummy barometer and what are the nvalue & svalue you supply?

Re: update dummy device Baromater

Posted: Sunday 16 November 2025 16:19
by knasson
the nvalue and svalue are coming from a script.

Code: Select all

json = (loadfile "/home/kan/domoticz/scripts/lua/JSON.lua")()  -- For Linux
commandArray = {}
local config=assert(io.popen("curl -s 'http://127.0.0.1:8080/json.htm?type=command&param=getdevices&rid=1306'"))
local blocjson = config:read('*all')
config:close()
local jsonValeur = json:decode(blocjson)
Baro = jsonValeur.result[1].Barometer
commandArray ['UpdateDevice']= '1511|0|'..Baro
return commandArray
the device 1306 is a THB of viSual crossing wihich supply Temp, Hygrometry and Barometer.
the pressure is extracted correctly by the script but the display of the widget is not completed.

Re: update dummy device Baromater

Posted: Sunday 16 November 2025 16:54
by jvdz
This is what is expected for nValue & sValue: https://wiki.domoticz.com/Domoticz_API/ ... #Barometer

So maybe it helps when you change the sValue to: BAR;BAR_FOR
Just as a test you could fix the forcast to 0=stable:

Code: Select all

commandArray ['UpdateDevice']= '1511|0|'..Baro..";0"

Re: update dummy device Baromater

Posted: Sunday 16 November 2025 17:48
by knasson
Excellent the right syntax that works for me is what you propose but with simple strokes

Code: Select all

commandArray ['UpdateDevice']= '1511|0|'..Baro..';0'
i had seen the svalue needs 2 values like you say but i ignored the right syntax
Many thanks
for our pleasure
RightBaro.jpg
RightBaro.jpg (16.98 KiB) Viewed 72 times

Re: update dummy device Baromater

Posted: Sunday 16 November 2025 23:31
by waltervl
Perhaps a stupid remark from me but as you use Visual Crossing data to have weather data in Domoticz like me: I have a Barometer automatically created by Domoticz based on the temp/hun/baro data from visual Crossing in the weather tab. Did you not have that?

I do not need to put barometer values in a separate dummy device. It is already there....