p1 and dial Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

p1 and dial

Post by pvklink »

Can a dial be configured to show current use and total use that is registrated by the meter?
My domoticz has the values the meters shows
But my dial show other values

stroom.jpg
stroom.jpg (240.74 KiB) Viewed 894 times
there are lot of differnces between my dial p1 meters and my domoticz data and the real meter

Gasmeter
current total usage on the meter = 6038 (like to see that and the current use or day use

Energie meter
Day total 9697
Night total 9618 (like to see that or otherwise together)
current use (like to see that too)

I tried to configure the right data, but no success...

blocks['p1'] = {
idx: 239,
title: 'Energie',
type: 'dial',
width: 3,
min: 0,
max: 100,
showring: true,
showunit: true,
shownumbers: true,
last_update: false,
data: [
{
value: 'T',
idx: '239_0',
},
{
value: 'T',
idx: '239_1',
}
]
}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

Is there a way to make the data 858 smaller?
dial.jpg
dial.jpg (9.93 KiB) Viewed 838 times
Another need is to add the second part night meter of the p1 meter to the dial
An idea to achive this could be:
example p1 data: "9931615;9870242;0;0;3022;0" (and disabling the update date to make space)

blocks['testx'] = {
idx: 239,
title: 'Electra',
type: 'dial',
values: [
{value: 'Usage'},
{value: 'Data',idx: 239_1}
{value: 'Data',idx: 239_2}
],
width: 2,
hide_data: false,
switch: false,
min: 0,
max: 5000,
showring: true,
showunit: true,
shownumbers: true,
last_update: false}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: p1 and dial

Post by HansieNL »

As far as I know low an high tarif for p1 is IDX_7 and IDX_8. Can you try if that works?
Blah blah blah
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

that gives an unknown error.
I read some of my previous topics and missed the remark of lokonli.
He did a suggestion to split the data field, i think that is the solution...
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: p1 and dial

Post by Lokonli »

Working on it.

Little teaser:
p1dials.jpg
p1dials.jpg (22.53 KiB) Viewed 827 times
Currently I'm using the following dial definitions:

Code: Select all

blocks['p1'] = {
  type: 'dial',
  idx: 43,
  values: [
    {
      value: 'Nett',
      unit: 'W',
      label: 'Nett',
      addClass: 'primary',
    },
    {
      value: 'CounterToday',
      label: 'Usage',
      unit: 'kWh',
      decimals: 1
    },
    {
        value: 'CounterDelivToday',
        label: 'Return',
        unit: 'kWh',
        decimals: 1
    },
    ],
  layout: 1,
  showring: true,
  shownumbers: true,
  min: -5000,
  max: 5000,
  animation: false,
};

blocks['p1counters'] = {
    type: 'dial',
    idx: 43,
    values: [
      {
        value: 'Data0',
        unit: 'kWh',
        label: 't1',
        scale: 0.001
      },
      {
        value: 'Data1',
        unit: 'kWh',
        label: 't2',
        scale: 0.001
      },
      {
        value: 'Data2',
        unit: 'kWh',
        label: 'ret t1',
        scale: 0.001
      },
      {
        value: 'Data3',
        unit: 'kWh',
        label: 'ret t2',
        scale: 0.001
      },
      ],
    layout: 1,
    animation: false,
    fixed: true
  };

Features:
* Data is split into Data0, Data1, etc.
* Calculated fields: Nett
* labels
* scale
* addClass to set css classes per data item. 'primary' will give increased font.

I want to do a bit more of testing before I create the new beta.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

:) :) :) :) :) :) :) :) :) :) :)

i wished i could help you, but missing the skills......
i already made a reservation for the p1 part :-)
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

My reservation for the P1
Only have to disable update_date so that i have space for the future 2 data elements (low and high usage (piek en dal gebruik)
p1.jpg
p1.jpg (76.68 KiB) Viewed 809 times
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

I installed, the latest beta, and yes, the data is splitted! GREAT

Still two questions:
1. can i disable the main value 0.33 and use the usage 706 Watt as main value of the dial
@update solved this by: showvalue: false

2. is it possibe that t1 and t2 are both on separate lines (break)
@update solved this too, by changing t1 in Dal and t2 in Piek !

3. Can i assign a value to the needle ?
for example the day usage ?
p1.jpg
p1.jpg (8.82 KiB) Viewed 777 times

Code: Select all

blocks['p1_electra']	= {
	idx: 239,
	title: 'Electra',
	layout: 1, 
	type: 'dial', 
        color: 'white',
	values: [
          	{value: 'Usage',unit: 'Watt',  label: '',addClass: 'primary',},
		{value: 'Data0',unit: 'kWh',label: 't1',scale: 0.001},
	        {value: 'Data1',unit: 'kWh',label: 't2',scale: 0.001},
    		],
	width: 4, 
//	icon: '', 
	hide_data: false, 
	switch: false,
        min: 0,
        max: 5000,
        showring: true,
        showunit: true,
	decimals: 0,
	animation: false,
	fixed: true,
        shownumbers: false,
        last_update: false}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: p1 and dial

Post by Lokonli »

You can add 'isNeedle: true' to a values item to bind the needle to it.

Sent from my SM-A320FL using Tapatalk

pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

Amazing!

1. Needle?
When attached to Data0 is shows a strange value, see image: value: 'Usage','isNeedle': true, unit: 'Watt', label: '',addClass: 'primary',},
When attached to Usage, it stays in the middle : value: 'Usage','isNeedle': true, unit: 'Watt', label: '',addClass: 'primary',},

2. (now i am going to overask, for the A :lol: , dont feel pressured, just to enthusiastic )
Is there a way to make the outerring white when below 1000 and red when above it ?
With this functionality there is no need for any js script handling....
p1.jpg
p1.jpg (31.69 KiB) Viewed 757 times

Code: Select all

blocks['p1_electra']	= {
	idx: 239,
	title: 'Electra',
	layout: 1, 
	showvalue: false,
	type: 'dial', 
        color: 'white',
	values: [
          	{value: 'Usage',unit: 'Watt',  label: '',addClass: 'primary',},
		{value: 'Data0','isNeedle': true, unit: 'kWh',label: 'Piek',scale: 0.001},
	        {value: 'Data1',unit: 'kWh',label: 'Dal',scale: 0.001},
    		],
	width: 4, 
//	icon: '', 
	hide_data: false, 
	switch: false,
        min: 0,
        max: 5000,
        showring: true,
        showunit: true,
	decimals: 0,
	animation: false,
	fixed: true,
        shownumbers: true,
        last_update: true}

Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: p1 and dial

Post by Lokonli »

pvklink wrote: Saturday 13 March 2021 9:14 Amazing!

1. Needle?
When attached to Data0 is shows a strange value, see image: value: 'Usage','isNeedle': true, unit: 'Watt', label: '',addClass: 'primary',},
When attached to Usage, it stays in the middle : value: 'Usage','isNeedle': true, unit: 'Watt', label: '',addClass: 'primary',},
It binds to the unscaled value, which is pretty big.
I'll check whether the scale factor can be used for the needle binding as well.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

ok!
dials are great !
Exp. what you can configure without the use of .js or css!
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: p1 and dial

Post by Lokonli »

pvklink wrote: Saturday 13 March 2021 9:14 Amazing!

1. Needle?
When attached to Data0 is shows a strange value, see image: value: 'Usage','isNeedle': true, unit: 'Watt', label: '',addClass: 'primary',},
When attached to Usage, it stays in the middle : value: 'Usage','isNeedle': true, unit: 'Watt', label: '',addClass: 'primary',},

2. (now i am going to overask, for the A :lol: , dont feel pressured, just to enthusiastic )
Is there a way to make the outerring white when below 1000 and red when above it ?
With this functionality there is no need for any js script handling....

p1.jpg

Code: Select all

blocks['p1_electra']	= {
	idx: 239,
	title: 'Electra',
	layout: 1, 
	showvalue: false,
	type: 'dial', 
        color: 'white',
	values: [
          	{value: 'Usage',unit: 'Watt',  label: '',addClass: 'primary',},
		{value: 'Data0','isNeedle': true, unit: 'kWh',label: 'Piek',scale: 0.001},
	        {value: 'Data1',unit: 'kWh',label: 'Dal',scale: 0.001},
    		],
	width: 4, 
//	icon: '', 
	hide_data: false, 
	switch: false,
        min: 0,
        max: 5000,
        showring: true,
        showunit: true,
	decimals: 0,
	animation: false,
	fixed: true,
        shownumbers: true,
        last_update: true}

The needle was already connected to the scaled value. In your block the max is set, which is less than the current value, so the needle is in the max position.

However, the colored ring was not correct. I've fixed that in latest beta.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

ok, gonna test it...:-)
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: p1 and dial

Post by pvklink »

Works perfecttttttttttttttttttttttttttttttt!

When you need more challenges for the dial, give a yel :-)
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest