Page 13 of 15

Re: Energy Dashboard (Build in)

Posted: Sunday 02 February 2025 20:52
by waltervl
An incremental counter only monitors kWh and the energy dashboard needs the Watt value to calculate the current energy flows in watts in your environment.

Perhaps you have another Domoticz devices that shows the Watt value?

Re: Energy Dashboard (Build in)

Posted: Sunday 02 February 2025 22:32
by rron
It’s from a dummy device. I don’t know which device i should select for my S0 counter
For the other items the counter does appear

Re: Energy Dashboard (Build in)

Posted: Sunday 02 February 2025 23:40
by waltervl
A solar inverter normally gives its total energy (In kWh or Wh) and its current generated Power (in Watt).
If these values are given by your inverter they normally should be supplied to an Electricity (Instand and counter) device
https://wiki.domoticz.com/Dummy_for_vir ... d_counter)

That device should be set to type Return so it can be used as solar input in the Energy dashboard

Re: Energy Dashboard (Build in)

Posted: Tuesday 04 February 2025 19:09
by rron
Walter,

I let you know when there’s solar to test it.

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 15:28
by rron
waltervl wrote: Sunday 02 February 2025 23:40 A solar inverter normally gives its total energy (In kWh or Wh) and its current generated Power (in Watt).
If these values are given by your inverter they normally should be supplied to an Electricity (Instand and counter) device
https://wiki.domoticz.com/Dummy_for_vir ... d_counter)

That device should be set to type Return so it can be used as solar input in the Energy dashboard
I try to update the Electricity_(instant_and_counter) with the following command from my espeasy S0 device

Code: Select all

 SendToHTTP 192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&nvalue=0&svalue=%eventvalue1%
but that's not oke. It doesn't update the sensor.
If I try a different type sensor such as manage counter it does work. How must I adapt this call in a way that update the Electricity_(instant_and_counter)?

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 15:52
by Kedi
Try

Code: Select all

 SendToHTTP 192.168.178.50:8080/json.htm?type=command&param=udevice&idx=915&nvalue=0&svalue=%eventvalue1%
I suppose %eventvalue1% is transleted to a value. B.t.w. what is that value? And is it a string?
Or should those comma's separate the values for the function?

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:04
by rron
The total count from my espeasy S0 I want to send to the Electricity_(instant_and_counter)

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:12
by waltervl
From the wiki
/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=POWER;ENERGY
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
POWER = current power (W)
ENERGY = Integer, total cumulative energy in Watt-hours (Wh)
So in your case %eventvalue1% should be a string POWER;ENERGY eg 123;54300

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:12
by rron

Code: Select all

SendToHTTP 192.168.178.50,8080,/json.htm?
This part is good, if I change it to

Code: Select all

SendToHTTP 192.168.178.50,8080,/json.htm?

I got a send error

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:13
by Kedi
The content of %eventvalue1% should be 2 values separated by a ;
See https://wiki.domoticz.com/Domoticz_API/ ... d_counter)
The doc of espeasy writes that there should be a comma between SentToHTTP and the first parameter.

@waltervl was quicker.

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:29
by rron
Thanks both for your help, you mean this?

I 'am not very good in this.

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:36
by rron
If I test it with these values the sensor isn't update. If I try a different sensor then it works. My conclusion is that there is something wrong in this call.

Code: Select all

curl "http://192.168.178.50:8080/json.htm?type=command&param=udevice&idx=915&nvalue=0&svalue=1500;3500"

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 16:59
by FireWizard
Hi,

If I look to your IP address, I see: 192.168.178.50,8080. (a comma between 50 and 8080)
Is that correct?
Shouldn't that be: 192.168.178.50:8080 (a colon between 50 and 8080)
And what does the comma in front of the forward slash doing.
I do not know the ESPeasy, so sorry, if I'm wrong.

And I also see, that your values 1500;3500 are not a string. If it is not a string Domoticz will never update the value.

Regards

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 17:27
by rron
Yes the ipadres comma is good. I do not get any error. Do you have a example for a string to update electricity instand and counter because that is the problem. The string works for other devices and if you put a value like 1500 then it is updated.
If searched the wiki and the examples I have found don not work for the electricity instand and counter.

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 18:11
by mojso
try this way
[S0#Total] - is the value that espeasy got from the sensor

SendToHTTP,192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Total]

Or this for Power and Energy
SendToHTTP,192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Power];[S0#Total]

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 18:14
by FireWizard
Hi,

I very seldom use a HTTP JSON call to Domoticz, as I'm standardized on MQTT, so try the answer of @mojso first.

Regards

Re: Energy Dashboard (Build in)

Posted: Friday 07 February 2025 18:17
by rron
Thanks I will try this and let you know.

Re: Energy Dashboard (Build in)

Posted: Saturday 08 February 2025 12:25
by rron
mojso wrote: Friday 07 February 2025 18:11 try this way
[S0#Total] - is the value that espeasy got from the sensor

SendToHTTP,192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Total]

Or this for Power and Energy
SendToHTTP,192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Power];[S0#Total]
This call works with every virtual device except the electricity (instant +counter) and that is the one I need for the S0 setting in my energy dashboard.

Re: Energy Dashboard (Build in)

Posted: Saturday 08 February 2025 13:22
by mojso
rron wrote: Saturday 08 February 2025 12:25
mojso wrote: Friday 07 February 2025 18:11 try this way
[S0#Total] - is the value that espeasy got from the sensor

SendToHTTP,192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Total]

Or this for Power and Energy
SendToHTTP,192.168.178.50,8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Power];[S0#Total]
This call works with every virtual device except the electricity (instant +counter) and that is the one I need for the S0 setting in my energy dashboard.
SendToHTTP,user:[email protected],8080,/json.htm?type=command&param=udevice&idx=915&svalue=[S0#Power];[S0#Total]

In my case work

but for p1 smart meter it will not work for that you need through a script

Re: Energy Dashboard (Build in)

Posted: Saturday 08 February 2025 13:35
by rron
There is some progress when I use your call. Only "Vandaag"is giving a value but not on top. Have I forgotten something?