Skip to content

Commit

Permalink
[hydrawise] Migrate to new GraphQL based API (openhab#10947)
Browse files Browse the repository at this point in the history
* [hydrawise] Migrated to new GraphQL based API

Fixes openhab#7261

Signed-off-by: Dan Cunningham <[email protected]>

* Addressed PR comments.

Signed-off-by: Dan Cunningham <[email protected]>

* Address PR review comments.

Signed-off-by: Dan Cunningham <[email protected]>
  • Loading branch information
digitaldan authored Aug 1, 2021
1 parent 7b2bee8 commit b29725d
Show file tree
Hide file tree
Showing 65 changed files with 2,369 additions and 947 deletions.
171 changes: 107 additions & 64 deletions bundles/org.openhab.binding.hydrawise/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,57 @@
*/
@NonNullByDefault
public class HydrawiseBindingConstants {

private static final String BINDING_ID = "hydrawise";

// List of all Thing Type UIDs
public static final ThingTypeUID THING_TYPE_CLOUD = new ThingTypeUID(BINDING_ID, "cloud");
public static final ThingTypeUID THING_TYPE_ACCOUNT = new ThingTypeUID(BINDING_ID, "account");
public static final ThingTypeUID THING_TYPE_CONTROLLER = new ThingTypeUID(BINDING_ID, "controller");
public static final ThingTypeUID THING_TYPE_LOCAL = new ThingTypeUID(BINDING_ID, "local");

public static final String BASE_IMAGE_URL = "https://app.hydrawise.com/config/images/";

public static final String CONFIG_USERNAME = "userName";
public static final String CONFIG_PASSWORD = "password";
public static final String CONFIG_REFRESHTOKEN = "refreshToken";
public static final String CONFIG_CONTROLLER_ID = "controllerId";

public static final String CHANNEL_GROUP_CONTROLLER_SYSTEM = "system";
public static final String CHANNEL_CONTROLLER_NAME = "name";
public static final String CHANNEL_CONTROLLER_LAST_CONTACT = "lastcontact";
public static final String CHANNEL_CONTROLLER_STATUS = "status";
public static final String CHANNEL_CONTROLLER_SUMMARY = "summary";
public static final String CHANNEL_CONTROLLER_ONLINE = "online";
public static final String CHANNEL_GROUP_ALLZONES = "allzones";
public static final String CHANNEL_ZONE_RUN_CUSTOM = "runcustom";
public static final String CHANNEL_ZONE_RUN = "run";
public static final String CHANNEL_ZONE_STOP = "stop";
public static final String CHANNEL_ZONE_SUSPEND = "suspend";
public static final String CHANNEL_ZONE_NAME = "name";
public static final String CHANNEL_ZONE_ICON = "icon";
public static final String CHANNEL_ZONE_LAST_WATER = "lastwater";
public static final String CHANNEL_ZONE_TIME = "time";
public static final String CHANNEL_ZONE_STARTTIME = "starttime";
public static final String CHANNEL_ZONE_DURATION = "duration";
public static final String CHANNEL_ZONE_TYPE = "type";
public static final String CHANNEL_ZONE_RUN = "run";
public static final String CHANNEL_ZONE_RUN_CUSTOM = "runcustom";
public static final String CHANNEL_ZONE_NEXT_RUN_TIME_TIME = "nextruntime";
public static final String CHANNEL_ZONE_SUSPEND = "suspend";
public static final String CHANNEL_ZONE_SUSPENDUNTIL = "suspenduntil";
public static final String CHANNEL_ZONE_SUMMARY = "summary";
public static final String CHANNEL_ZONE_TIME_LEFT = "timeleft";
public static final String CHANNEL_RUN_ALL_ZONES = "runall";
public static final String CHANNEL_STOP_ALL_ZONES = "stopall";
public static final String CHANNEL_SUSPEND_ALL_ZONES = "suspendall";
public static final String CHANNEL_SENSOR_NAME = "name";
public static final String CHANNEL_SENSOR_INPUT = "input";
public static final String CHANNEL_SENSOR_MODE = "mode";
public static final String CHANNEL_SENSOR_TIMER = "timer";
public static final String CHANNEL_SENSOR_DELAY = "delay";
public static final String CHANNEL_SENSOR_OFFTIMER = "offtimer";
public static final String CHANNEL_SENSOR_OFFLEVEL = "offlevel";
public static final String CHANNEL_SENSOR_ACTIVE = "active";
public static final String CHANNEL_SENSOR_WATERFLOW = "waterflow";
public static final String CHANNEL_FORECAST_TEMPERATURE_HIGH = "temperaturehigh";
public static final String CHANNEL_FORECAST_TEMPERATURE_LOW = "temperaturelow";
public static final String CHANNEL_FORECAST_CONDITIONS = "conditions";
public static final String CHANNEL_FORECAST_DAY = "day";
public static final String CHANNEL_FORECAST_TIME = "time";
public static final String CHANNEL_FORECAST_HUMIDITY = "humidity";
public static final String CHANNEL_FORECAST_WIND = "wind";
public static final String CHANNEL_FORECAST_ICON = "icon";
public static final String CHANNEL_FORECAST_EVAPOTRANSPRIATION = "evapotranspiration";
public static final String CHANNEL_FORECAST_PRECIPITATION = "precipitation";
public static final String CHANNEL_FORECAST_PROBABILITYOFPRECIPITATION = "probabilityofprecipitation";

public static final String PROPERTY_CONTROLLER_ID = "controller";
public static final String PROPERTY_NAME = "name";
public static final String PROPERTY_DESCRIPTION = "description";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) 2010-2021 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.hydrawise.internal;

import java.util.List;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.hydrawise.internal.api.graphql.dto.Controller;

/**
*
* @author Dan Cunningham - Initial contribution
*
*/
@NonNullByDefault
public interface HydrawiseControllerListener {
public void onData(List<Controller> controllers);
}
Loading

0 comments on commit b29725d

Please sign in to comment.