2 * Copyright (c) 2010-2024 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.solax.internal.model.local.parsers;
15 import static org.openhab.binding.solax.internal.SolaxBindingConstants.*;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.binding.solax.internal.connectivity.rawdata.local.LocalConnectRawDataBean;
21 import org.openhab.binding.solax.internal.model.local.LocalInverterData;
22 import org.openhab.binding.solax.internal.model.local.X1BoostAirMiniInverterData;
25 * The {@link X1BoostAirMiniDataParser} is the implementation that parses raw data into a LocalInverterData for the
26 * X1 Mini / X1 Air Mini or X1 Boost Mini inverter.
28 * @author Konstantin Polihronov - Initial contribution
31 public class X1BoostAirMiniDataParser implements RawDataParser {
33 private static final Set<String> X1_BOOST_AIR_MINI_SUPPORTED_CHANNELS = Set.of(CHANNEL_INVERTER_PV1_POWER,
34 CHANNEL_INVERTER_PV1_VOLTAGE, CHANNEL_INVERTER_PV1_CURRENT, CHANNEL_INVERTER_PV2_POWER,
35 CHANNEL_INVERTER_PV2_VOLTAGE, CHANNEL_INVERTER_PV2_CURRENT, CHANNEL_INVERTER_PV_TOTAL_POWER,
36 CHANNEL_INVERTER_PV_TOTAL_CURRENT, CHANNEL_TIMESTAMP, CHANNEL_RAW_DATA, CHANNEL_INVERTER_OUTPUT_POWER,
37 CHANNEL_INVERTER_OUTPUT_CURRENT, CHANNEL_INVERTER_OUTPUT_VOLTAGE, CHANNEL_INVERTER_OUTPUT_FREQUENCY,
38 CHANNEL_TOTAL_ENERGY, CHANNEL_TODAY_ENERGY, CHANNEL_POWER_USAGE);
41 public LocalInverterData getData(LocalConnectRawDataBean bean) {
42 return new X1BoostAirMiniInverterData(bean);
46 public Set<String> getSupportedChannels() {
47 return X1_BOOST_AIR_MINI_SUPPORTED_CHANNELS;