Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mpp_solar) Remove redundant telemetry #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solar_inverters/mpp_solar/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blueprint_spec: device/1.0
display_name: MPP Solar Inverter
display_name: MPP Solar Inverter (Single mode)
description: Solar inverter with monitoring and control via WatchPower protocol.
icon: enapter-inverter-battery
vendor: mpp-solar
Expand Down
2 changes: 1 addition & 1 deletion solar_inverters/mpp_solar/mpp_solar_fw/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ local commands = {
device_warning_status = {
command = 'QPIWS',
general = {
fault_flag = 1,
-- fault_flag = 1,
inverter_fault = 2,
bus_over = 3,
bus_under = 4,
Expand Down
9 changes: 5 additions & 4 deletions solar_inverters/mpp_solar/mpp_solar_fw/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,20 @@ function parser:get_device_rating_info()
end

function parser:get_priorities(telemetry)
local new_data = {}
for name, value in pairs(priorities.charger.values) do
if value == telemetry['charger_source_priority'] then
telemetry['charger_source_priority'] = name
new_data['charger_source_priority'] = name
end
end

for name, value in pairs(priorities.output.values) do
if value == telemetry['output_source_priority'] then
telemetry['output_source_priority'] = name
new_data['output_source_priority'] = name
end
end

return telemetry
return new_data
end

function parser:get_device_mode()
Expand All @@ -111,7 +112,7 @@ function parser:get_device_alerts()
end
end

local index = device_warning_status.general.fault_flag
local index = device_warning_status.general.inverter_fault
local warning_flag = string.sub(data, index, index) == '1' and '' or '_w'

for alert, pos in pairs(device_warning_status.dependent) do
Expand Down