kmon6369
kmon6369
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
Thanks. Makes sense. I’ll keep working on it
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
Not sure how I should be going about this. This is not a critical data point and I can see what my system is doing without it. But, it would be nice to have all the time and figuring it out is helping me learn how this all works.
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
Maybe I can make two calcs in the code and compare them in Derived data and post whichever is valid. I’ll have to think about that.
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
I am not using nodered but am interested in how you did it.
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
batteries.0 is the alternator, batteries.2 is the house battery and totalPanelPower is the total power from solar panels.
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
The chargers.293 is the shore power charger. The data is coming from another RPi running Venus.OS and I have the Venus plugin installed and configured in SK. I am back at the dock, plugged into shore power, but have not turned on the charger and it is working (it has AC power but is off).
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
module.exports = function (app , plugin) { return { group: 'electrical', optionKey: 'DC Load', title: 'Total DC Load', derivedFrom:[ 'electrical.batteries.0.current', 'electrical.batteries.0.voltage', 'electrical.batteries.2.current', 'electrical.batteries.2.voltage', 'electrical.chargers.293.current', 'electrical.chargers.293.voltage', 'electrical.venus.totalPanelPower' ], calculator: function (bat0c , bat0v , bat2c , bat2v , bat10c , bat10v , stp) { var bat0p = bat0c * bat0v var bat2p = -bat2c * bat2v var bat10p = bat10c * bat10v
if (bat2c <= 0) {var dcl = bat0p + bat2p + bat10p + stp} else {var dcl = bat0p + bat10p + stp}
return [ { path: 'electrical.dc.dcload', value: dcl } ] } } }
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
Here is the code I have
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
I do plan to add this to derived data. I always make a copy of my custom calcs and back them up. Then I can restore them if they are not there after an update. Had that happen the first time I updated it and learned my lesson. Thediscord
25 replies
SKSignal K
Created by kmon6369 on 10/24/2024 in #questions
DC Load - Data input nit available
You are correct that if there is data since the server is started it works. But, restart the server and it does not work because one of the data points in the calc is no longer there. I’m out on anchor, did some updates to plugins, restarted the server and it no longer calculates. I have been trying to figure out how to check if the days points are there and if not ignore them - actually use a different calc. Not sure how to do that in a if statement.
25 replies