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.
update dummy device Baromater
Moderator: leecollings
- knasson
- Posts: 17
- Joined: Sunday 02 May 2021 22:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024-4
- Location: France
- Contact:
update dummy device Baromater
- Attachments
-
- widgetBaro.jpg (15.02 KiB) Viewed 59 times
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: update dummy device Baromater
How do you feed the data to the dummy barometer and what are the nvalue & svalue you supply?
- knasson
- Posts: 17
- Joined: Sunday 02 May 2021 22:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024-4
- Location: France
- Contact:
Re: update dummy device Baromater
the nvalue and svalue are coming from a script.
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.
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¶m=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 pressure is extracted correctly by the script but the display of the widget is not completed.
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: update dummy device Baromater
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:
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"
- knasson
- Posts: 17
- Joined: Sunday 02 May 2021 22:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024-4
- Location: France
- Contact:
Re: update dummy device Baromater
Excellent the right syntax that works for me is what you propose but with simple strokes
i had seen the svalue needs 2 values like you say but i ignored the right syntax
Many thanks
for our pleasure
Code: Select all
commandArray ['UpdateDevice']= '1511|0|'..Baro..';0'Many thanks
for our pleasure
- waltervl
- Posts: 6677
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: update dummy device Baromater
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....
I do not need to put barometer values in a separate dummy device. It is already there....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest