Dial with three values

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
brandsrus
Posts: 20
Joined: Wednesday 27 October 2021 14:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dial with three values

Post by brandsrus »

Hello everyone,

I have make a dial with three devices but one data is always zero.

This device is of a type Humidity see the json file

Code: Select all

{
	"ActTime" : 1654421561,
	"AstrTwilightEnd" : "00:00",
	"AstrTwilightStart" : "00:00",
	"CivTwilightEnd" : "22:48",
	"CivTwilightStart" : "04:22",
	"DayLength" : "16:46",
	"NautTwilightEnd" : "00:11",
	"NautTwilightStart" : "03:00",
	"ServerTime" : "2022-06-05 11:32:41",
	"SunAtSouth" : "13:35",
	"Sunrise" : "05:13",
	"Sunset" : "21:58",
	"app_version" : "2022.1",
	"result" : 
	[
		{
			"AddjMulti" : 1.0,
			"AddjMulti2" : 1.0,
			"AddjValue" : 0.0,
			"AddjValue2" : 0.0,
			"BatteryLevel" : 100,
			"CustomImage" : 0,
			"Data" : "Humidity 54 %",
			"Description" : "",
			"Favorite" : 1,
			"HardwareDisabled" : false,
			"HardwareID" : 7,
			"HardwareName" : "Sensorgateway",
			"HardwareType" : "deCONZ plugin",
			"HardwareTypeVal" : 94,
			"HaveTimeout" : false,
			"Humidity" : 54,
			"HumidityStatus" : "Comfortable",
			"ID" : "00:15:8d:00:07:e2:40:6e-01-0405",
			"LastUpdate" : "2022-06-05 11:30:10",
			"Name" : "Luchtvochtigheid Woonkamer",
			"Notifications" : "false",
			"PlanID" : "0",
			"PlanIDs" : 
			[
				0
			],
			"Protected" : false,
			"ShowNotifications" : true,
			"SignalLevel" : "-",
			"SubType" : "LaCrosse TX3",
			"Timers" : "false",
			"Type" : "Humidity",
			"TypeImg" : "temperature",
			"Unit" : 3,
			"Used" : 1,
			"XOffset" : "0",
			"YOffset" : "0",
			"idx" : "45"
		}
	],
	"status" : "OK",
	"title" : "Devices"
}
Is it possible to integrate this in the construction of:

Code: Select all

 
 blocks['klimaat_woonkamer'] = {
    idx: 46,
    title: 'Woonkamer',
    type: 'dial',
	setpoint: 20.5,
    min: 5,
    max: 40,
    width: 10,

    last_update: false,  // disabling last update to allow for more room
	values : [
        {
            idx: 45,
            unit: '(%)'
        },
        {
            idx: 47,
            unit: 'hPa'
        },
    ]
}
The resultat of idx 45 is zero in the dial.
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dial with three values

Post by Lokonli »

brandsrus wrote: Sunday 05 June 2022 11:35 Hello everyone,

I have make a dial with three devices but one data is always zero.

This device is of a type Humidity see the json file

Code: Select all

{
	"ActTime" : 1654421561,
	"AstrTwilightEnd" : "00:00",
	"AstrTwilightStart" : "00:00",
	"CivTwilightEnd" : "22:48",
	"CivTwilightStart" : "04:22",
	"DayLength" : "16:46",
	"NautTwilightEnd" : "00:11",
	"NautTwilightStart" : "03:00",
	"ServerTime" : "2022-06-05 11:32:41",
	"SunAtSouth" : "13:35",
	"Sunrise" : "05:13",
	"Sunset" : "21:58",
	"app_version" : "2022.1",
	"result" : 
	[
		{
			"AddjMulti" : 1.0,
			"AddjMulti2" : 1.0,
			"AddjValue" : 0.0,
			"AddjValue2" : 0.0,
			"BatteryLevel" : 100,
			"CustomImage" : 0,
			"Data" : "Humidity 54 %",
			"Description" : "",
			"Favorite" : 1,
			"HardwareDisabled" : false,
			"HardwareID" : 7,
			"HardwareName" : "Sensorgateway",
			"HardwareType" : "deCONZ plugin",
			"HardwareTypeVal" : 94,
			"HaveTimeout" : false,
			"Humidity" : 54,
			"HumidityStatus" : "Comfortable",
			"ID" : "00:15:8d:00:07:e2:40:6e-01-0405",
			"LastUpdate" : "2022-06-05 11:30:10",
			"Name" : "Luchtvochtigheid Woonkamer",
			"Notifications" : "false",
			"PlanID" : "0",
			"PlanIDs" : 
			[
				0
			],
			"Protected" : false,
			"ShowNotifications" : true,
			"SignalLevel" : "-",
			"SubType" : "LaCrosse TX3",
			"Timers" : "false",
			"Type" : "Humidity",
			"TypeImg" : "temperature",
			"Unit" : 3,
			"Used" : 1,
			"XOffset" : "0",
			"YOffset" : "0",
			"idx" : "45"
		}
	],
	"status" : "OK",
	"title" : "Devices"
}
Is it possible to integrate this in the construction of:

Code: Select all

 
 blocks['klimaat_woonkamer'] = {
    idx: 46,
    title: 'Woonkamer',
    type: 'dial',
	setpoint: 20.5,
    min: 5,
    max: 40,
    width: 10,

    last_update: false,  // disabling last update to allow for more room
	values : [
        {
            idx: 45,
            unit: '(%)'
        },
        {
            idx: 47,
            unit: 'hPa'
        },
    ]
}
The resultat of idx 45 is zero in the dial.
By default the Data field of a device is being used. The Data field of device 45 starts with a text ('humidity'), which will be interpreted as 0 ...

However, you can tell Dashticz to use the Humidity field instead, which is containing the right data.

Try the following:

Code: Select all

 blocks['klimaat_woonkamer'] = {
    idx: 46,
    title: 'Woonkamer',
    type: 'dial',
	setpoint: 20.5,
    min: 5,
    max: 40,
    width: 10,

    last_update: false,  // disabling last update to allow for more room
	values : [
        {
            idx: 45,
            unit: '(%)',
            value: 'Humidity'
        },
        {
            idx: 47,
            unit: 'hPa'
        },
    ]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest