Page 1 of 1

p1 and dial

Posted: Saturday 06 February 2021 18:34
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 929 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',
}
]
}

Re: p1 and dial

Posted: Monday 08 March 2021 19:41
by pvklink
Is there a way to make the data 858 smaller?
dial.jpg
dial.jpg (9.93 KiB) Viewed 873 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}

Re: p1 and dial

Posted: Monday 08 March 2021 21:53
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?

Re: p1 and dial

Posted: Monday 08 March 2021 22:41
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...

Re: p1 and dial

Posted: Monday 08 March 2021 22:55
by Lokonli
Working on it.

Little teaser:
p1dials.jpg
p1dials.jpg (22.53 KiB) Viewed 862 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.

Re: p1 and dial

Posted: Tuesday 09 March 2021 15:49
by pvklink
:) :) :) :) :) :) :) :) :) :) :)

i wished i could help you, but missing the skills......
i already made a reservation for the p1 part :-)

Re: p1 and dial

Posted: Tuesday 09 March 2021 15:52
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 844 times

Re: p1 and dial

Posted: Saturday 13 March 2021 0:35
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 812 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}

Re: p1 and dial

Posted: Saturday 13 March 2021 6:58
by Lokonli
You can add 'isNeedle: true' to a values item to bind the needle to it.

Sent from my SM-A320FL using Tapatalk


Re: p1 and dial

Posted: Saturday 13 March 2021 9:14
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 792 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}


Re: p1 and dial

Posted: Saturday 13 March 2021 10:09
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.

Re: p1 and dial

Posted: Saturday 13 March 2021 12:12
by pvklink
ok!
dials are great !
Exp. what you can configure without the use of .js or css!

Re: p1 and dial

Posted: Saturday 13 March 2021 15:49
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.

Re: p1 and dial

Posted: Saturday 13 March 2021 17:04
by pvklink
ok, gonna test it...:-)

Re: p1 and dial

Posted: Saturday 13 March 2021 17:21
by pvklink
Works perfecttttttttttttttttttttttttttttttt!

When you need more challenges for the dial, give a yel :-)