LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Moderator: leecollings

eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by eddieb »

running the 0.1.3 version now ...

Code: Select all

2021-04-06 07:45:04.002 Status: dzVents: Info: Hey solar battery: ------ Start internal script: SimSolarBattery: Device: "P1 kWh totaal (p1meter)", Index: 192
2021-04-06 07:45:04.005 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Virtual Solar Battery: Custom sensor device adapter
2021-04-06 07:45:04.006 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Virtual Solar Battery Usage: P1 smart meter energy device adapter
2021-04-06 07:45:04.007 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Lost Solar Energy: kWh device adapter
2021-04-06 07:45:04.008 Status: dzVents: Debug: Hey solar battery: energymeter type = P1 Smart Meter
2021-04-06 07:45:04.008 Status: dzVents: Debug: Hey solar battery: P1 meter: usage and return values will be used
2021-04-06 07:45:04.008 Status: dzVents: Debug: Hey solar battery: maxBbatteryInverterEnergy = 3800 x (61 / 3600) = 64.4 Wh
2021-04-06 07:45:04.008 Status: dzVents: Debug: Hey solar battery: Energy balance = -4 Wh (negative = consumption)
2021-04-06 07:45:04.009 Status: dzVents: Debug: Hey solar battery: Energy balance within capacity of battery inverter
2021-04-06 07:45:04.009 Status: dzVents: Debug: Hey solar battery: solar battery value = 0.0 Wh, battery capacity is 8000 Wh, new solar battery value = -4.0
2021-04-06 07:45:04.009 Status: dzVents: Debug: Hey solar battery: battery Used Energy = 0Wh
2021-04-06 07:45:04.009 Status: dzVents: Debug: Hey solar battery: battery Prod Energy = 0Wh
2021-04-06 07:45:04.009 Status: dzVents: Debug: Hey solar battery: battery Lost Energy = 4.0Wh
2021-04-06 07:45:04.009 Status: dzVents: Debug: Hey solar battery: inverter Lost Energy = 0Wh
2021-04-06 07:45:04.011 Status: dzVents: Info: Hey solar battery: ------ Finished SimSolarBattery
do you have a preferred way to receive some screenshots ? (PM/github/??)

Eddie
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »

With an empty battery, the log is normal. Therefore please post some screenshots to clarify the problem. Let's do that on github (that whole system is a learning curve for me), so we can close the issue as soon as it is solved.
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by eddieb »

Ok, I created an issue on github.
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by McMelloW »

jake wrote: Friday 02 April 2021 13:57 Update 02-04-201: DzVents version of the script, with additional functionality, can be found on GitHub!
Please test the new published version. Also, please help with suggestions how to handle GitHub for modifications
Hi Jake,
Going to try out your latest script. Created the devices and variables as explained in the source. Just copied your source into the event editor and changed the names to my P1 Meter Names. Switched it on and saved and off it went. Good job.

Just two questions.
I cannot get rid of a load on loglines.

Code: Select all

2021-04-06 16:01:39.048 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;120"
2021-04-06 16:01:40.062 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;123"
2021-04-06 16:01:41.048 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;124"
2021-04-06 16:01:42.056 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;123"
2021-04-06 16:01:43.115 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;120"
2021-04-06 16:01:44.071 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;128"
2021-04-06 16:01:45.050 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;129"
2021-04-06 16:01:46.068 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;132"
2021-04-06 16:01:47.060 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;135"
2021-04-06 16:01:48.044 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;134"
2021-04-06 16:01:49.062 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;140"
2021-04-06 16:01:50.080 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648214;0;153"
2021-04-06 16:01:51.075 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;160"
2021-04-06 16:01:52.062 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;165"
2021-04-06 16:01:53.089 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;175"
2021-04-06 16:01:54.069 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;172"
2021-04-06 16:01:55.081 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;179"
2021-04-06 16:01:56.061 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;174"
2021-04-06 16:01:57.085 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;171"
2021-04-06 16:01:58.053 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;169"
2021-04-06 16:01:59.084 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;168"
2021-04-06 16:02:00.065 Status: dzVents: Info: Handling events for: "Power", value: "4055887;3431466;2522893;5648215;0;161"
Changed line 54 to level = domoticz.LOG_ERROR but still a lot of lines. Actually, I would like to see only a log line in case of an ERROR.
Also the interval is ever 1/10th second as you can see on the time stamp. Line 26 the scriptinterval = 60

Second question.
Why are reading the produced power from the P1 Meter and not directly from the inverter?

Thanks for al your work on this script, keep you updated on my experiences
Greetings McMelloW
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »

McMelloW wrote: Tuesday 06 April 2021 16:24
jake wrote: Friday 02 April 2021 13:57 Update 02-04-201: DzVents version of the script, with additional functionality, can be found on GitHub!
Please test the new published version. Also, please help with suggestions how to handle GitHub for modifications
Hi Jake,
Going to try out your latest script. Created the devices and variables as explained in the source. Just copied your source into the event editor and changed the names to my P1 Meter Names. Switched it on and saved and off it went. Good job.

Just two questions.
I cannot get rid of a load on loglines.
...
Changed line 54 to level = domoticz.LOG_ERROR but still a lot of lines. Actually, I would like to see only a log line in case of an ERROR.
Also the interval is ever 1/10th second as you can see on the time stamp. Line 26 the scriptinterval = 60

Second question.
Why are reading the produced power from the P1 Meter and not directly from the inverter?

Thanks for al your work on this script, keep you updated on my experiences
Thanks for your kind words!

Changing to lOG_ERROR should do it. Have you checked your dzVents settings itself? Please make sure that log level there is also just set to 'ERROR'.

0th and 2nd question: the script is triggered on the P1-meter update, but only executed at the specified interval.
Reason for specifying the P1-meter and not the solar inverter (keep in mind, in this script is now introduced a virtual! battery inverter, that simulates charging/depleting the battery from/to 230V), is that in this script we only care about energy leaving the house, not so much about production of the solar system. In the ideal situation all generated energy is consumed at once, but unfortunately most times the production and consumption are at different times (in my case, I use around 30% of the solar energy directly, the rest is fed back to the grid)
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by waaren »

McMelloW wrote: Tuesday 06 April 2021 16:24 Changed line 54 to level = domoticz.LOG_ERROR but still a lot of lines. Actually, I would like to see only a log line in case of an ERROR.
Also the interval is ever 1/10th second as you can see on the time stamp. Line 26 the scriptinterval = 60
According to the time stamp, the script is triggered every second and that is most likely the result of the setting for the P1 hardware update frequency.

With regards to the log; the above loglines are not specific for this script but are generic for all dzVents scripts based on the settings.

Did you try to change the event / dzVents log settings via [setup][settings][other] bottom of the page (see below)?
log settings.png
log settings.png (22.26 KiB) Viewed 2405 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »

waaren wrote: Tuesday 06 April 2021 17:35 ...
According to the time stamp, the script is triggered every second and that is most likely the result of the setting for the P1 hardware update frequency.

With regards to the log; the above loglines are not specific for this script but are generic for all dzVents scripts based on the settings.

Did you try to change the event / dzVents log settings via [setup][settings][other] bottom of the page (see below)?
log settings.png
@waaren: question to you: is it possible to avoid the following log line as well?
"Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua"
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by McMelloW »

jake wrote: Tuesday 06 April 2021 17:23 Thanks for your kind words!

Changing to lOG_ERROR should do it. Have you checked your dzVents settings itself? Please make sure that log level there is also just set to 'ERROR'.

0th and 2nd question: the script is triggered on the P1-meter update, but only executed at the specified interval.
Reason for specifying the P1-meter and not the solar inverter (keep in mind, in this script is now introduced a virtual! battery inverter, that simulates charging/depleting the battery from/to 230V), is that in this script we only care about energy leaving the house, not so much about production of the solar system. In the ideal situation all generated energy is consumed at once, but unfortunately most times the production and consumption are at different times (in my case, I use around 30% of the solar energy directly, the rest is fed back to the grid)
Thanks for your reply.
Forgot to check dzVents Setting. I see the triggering is set meterName So far the script works OK.
Greetings McMelloW
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by waaren »

jake wrote: Tuesday 06 April 2021 17:46 @waaren: question to you: is it possible to avoid the following log line as well?
"Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua"
Yes.
logging.png
logging.png (24.99 KiB) Viewed 2401 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »

Version 0.2 released with better registration of all elements that impact maximum efficiency of solar battery usage.

File available at GitHub!
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by eddieb »

Hi Jake,

the code is working fine here, tnx for the great work so far.
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
hclardij
Posts: 12
Joined: Tuesday 27 October 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by hclardij »

I am not an experienced programmer so excuse me if I do not read this correctly.
By the looks you charge the battery with the same amount of returned power. This assumes a charger that can modulate the charge power, correct?
Same the other way around: If you want to deliver power from your battery to your home, ideally you want this so that you do not supply energy to the grid, with a maximum of the inverter capacity.
This means that there must be communication between the powermeter and the charger/inverter. The ones II have seen use a modbus connection for this purpose and these cost serious money.
This idea I had was to build this using Domoticz by having 3 chargers: 250, 500 and 1000 watt. With this I can charge 250, 500, 750, 1000, 1250, 1500 and 1750 watt. Same principle for the discharge. Chargers cost 40 euro each on Ali so with this idea you can build a low cost system.
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »

You correctly described the way the script works.
mcmikev
Posts: 146
Joined: Tuesday 26 May 2015 8:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: right here
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by mcmikev »

Hi ,

I have been using this script for a while and like the concept very much, Is it worth to spend money for a Solarbattery or not.
This script can give a good insight into that.

Now I have an issue I cannot seem to fix myself
Last friday my smart P! meter died and I got a new one, but now my Log is flooding with lines:

Code: Select all

 2021-09-17 09:01:19.209 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73995 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:20.277 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73995 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:21.278 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73995 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:22.285 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73995 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:23.286 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73996 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:24.293 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73996 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:25.309 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73997 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:26.320 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73997 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:27.305 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73997 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:28.305 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73997 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:29.305 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73998 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:30.294 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73998 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:31.265 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73999 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:32.296 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73999 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:33.264 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73999 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:34.265 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73999 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:35.273 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (73999 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:36.263 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (74000 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:37.264 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (74000 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:38.260 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (74000 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:39.261 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (74000 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:40.260 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (74000 Wh < previous value of 16690262 Wh. Script will not continue
2021-09-17 09:01:41.260 Error: dzVents: Error: (3.1.8) Hey solar battery: New value of consumed enery meter (74000 Wh < previous value of 16690262 Wh. Script will not continue 
I checked the variables but it is not visible. What must or can I do to fix this error?

Thanks for the script and help :-)
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »

I understand where the issue is coming from, it protects the script from incorrect input. In your case the low meter has a logic explanation. I am currently not able to review the code. The variable is stored in a dzvents variable. (Scripts/dzvents/data). Update that file (with sudo nano) with your current meter value. It should start calculating afterwards with the new meter values
mcmikev
Posts: 146
Joined: Tuesday 26 May 2015 8:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: right here
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by mcmikev »

Hi Jake,

yes that did the trick!!

Thank you very much!
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by MartinManders »

Hi Jake,

You did an incredible job!
I understand you’re logic, and thanks for the extra logging.

The program works like a charm.
I’ve learned a lot ;)

Thank you!
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
CrosstownTee
Posts: 1
Joined: Thursday 11 November 2021 11:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: 7880 - Belgium
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by CrosstownTee »

Hi Jake,

I can't read values from a P1 port, but I do have several S0 pulse meters providing output about energy use of different appliances (the biggest consumers) and the output of my solar panels.
In the script I can see only one variable for energy consumers; how would you script a new variable summing up the output variables of the energy consumers?

-> One returned energy meter
-> Multiple consumed energy meters

I'm not sure if this is a big task, but I'm very new to Domoticz, and definitely new in scripting...

Thanks in advance for your suggestions!
jake
Posts: 744
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by jake »


CrosstownTee wrote:Hi Jake,

I can't read values from a P1 port, but I do have several S0 pulse meters providing output about energy use of different appliances (the biggest consumers) and the output of my solar panels.
In the script I can see only one variable for energy consumers; how would you script a new variable summing up the output variables of the energy consumers?

-> One returned energy meter
-> Multiple consumed energy meters

I'm not sure if this is a big task, but I'm very new to Domoticz, and definitely new in scripting...

Thanks in advance for your suggestions!
The idea behind the current script is the net consumption or usage through your p1-meter.

It seems like you will use the script differently. Please explain.
THBR
Posts: 43
Joined: Saturday 02 November 2019 21:05
Target OS: -
Domoticz version:
Contact:

Re: LUA – Virtual Solar Battery: simulate the presence of a battery for storing harvested solar energy

Post by THBR »

Hello,

(hopefully this item is still active?)

I recently installed and edited the script as described on Github and the Wiki page. But although the script apparently runs without errors, the created virtual devices are from the start not filled with any data and therefore not updated at all.

What could be wrong?

Status log Domoticz (level = domoticz.LOG_DEBUG):

Code: Select all

"2022-11-01 22:35:59.848 Status: dzVents: Info: Handling events for: "Power", value: "6719258;8511998;981986;2149440;306;0" 
2022-11-01 22:35:59.848 Status: dzVents: Info: Hey solar battery: ------ Start external script: SimSolarBattery.lua: Device: "Power (P1 LAN)", Index: 135 
2022-11-01 22:35:59.852 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Virtual Solar Battery: Custom sensor device adapter 
2022-11-01 22:35:59.854 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Virtual Solar Battery Usage: P1 smart meter energy device adapter 
2022-11-01 22:35:59.856 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Lost Solar Battery Energy: P1 smart meter energy device adapter 
2022-11-01 22:35:59.858 Status: dzVents: Debug: Hey solar battery: Processing device-adapter for Lost Solar Battery Inverter Energy: P1 smart meter energy device adapter 
2022-11-01 22:35:59.859 Status: dzVents: Debug: Hey solar battery: scriptInterval value increased to inf seconds to have a maximum deviation of 10 percent 
2022-11-01 22:35:59.859 Status: dzVents: Debug: Hey solar battery: script trigger interval < than set value for scriptInterval (inf) 
2022-11-01 22:35:59.860 Status: dzVents: Info: Hey solar battery: ------ Finished SimSolarBattery.lua 
"
Regards, Theo (NL).
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest