Irrigation System Control via Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Irrigation System Control via Mobile App
Medium
from 4 hours to 2 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Irrigation System Control via Mobile Applications

Field irrigation controllers — devices with relays that open and close electromagnetic solenoid valves on zones. Rain Bird, Hunter, Orbit — the most known names. Most communicate with "smart" hubs via proprietary protocols. For custom integration into mobile applications, use either manufacturer APIs (if available), replace the controller with IoT-compatible hardware (ESP32 with MQTT, Raspberry Pi with GPIO), or an intermediate gateway.

Rachio API: Cloud Integration

Rachio is one of the few manufacturers with public REST API. OAuth 2.0 authentication, full_control scope:

// iOS, async/await
class RachioClient {
    let baseURL = "https://api.rach.io/1/public"
    var accessToken: String

    func getPersonInfo() async throws -> PersonInfo {
        return try await get("/person/info")
    }

    func startZone(zoneId: String, duration: Int) async throws {
        // duration in seconds
        try await put("/zone/start", body: [
            "id": zoneId,
            "duration": duration
        ])
    }

    func stopDevice(deviceId: String) async throws {
        try await put("/device/stop_water", body: ["id": deviceId])
    }

    func createScheduleRule(deviceId: String, zones: [ZoneSchedule]) async throws -> ScheduleRule {
        return try await post("/schedulerule", body: [
            "device": ["id": deviceId],
            "name": zones.first?.name ?? "Schedule",
            "zones": zones.map { ["id": $0.id, "duration": $0.durationSeconds] },
            "startTime": 21600, // seconds from midnight = 6:00
            "type": "FIXED_SCHEDULE"
        ])
    }
}

Rachio Webhook allows receiving real-time events: watering start/stop, valve errors, rain detection. Register webhook via API; events arrive as POST requests to developer server, which forwards them to mobile app via WebSocket or FCM.

MQTT Controller: Custom Hardware

For custom installations — ESP32 controller with MQTT. Topics:

irrigation/zone/1/command   → {"action": "open", "duration": 300}
irrigation/zone/1/state     → {"isOpen": true, "openedAt": "2024-07-15T06:00:00Z"}
irrigation/system/status    → {"activeZones": [1,3], "waterFlow": 12.5, "pressure": 2.8}

Mobile app subscribes to irrigation/+/state and irrigation/system/status. Control — publish to irrigation/zone/+/command.

For Flutter:

class IrrigationRepository {
  late MqttServerClient _client;
  final StreamController<ZoneState> _zoneStateController = StreamController.broadcast();

  Stream<ZoneState> get zoneStates => _zoneStateController.stream;

  Future<void> connect(MqttConfig config) async {
    _client = MqttServerClient(config.host, config.clientId)
      ..port = config.port
      ..secure = true
      ..securityContext = config.sslContext
      ..keepAlivePeriod = 30
      ..onDisconnected = _onDisconnected;

    await _client.connect(config.username, config.password);
    _client.subscribe('irrigation/+/state', MqttQos.atLeastOnce);

    _client.updates!.listen((messages) {
      for (final message in messages) {
        final payload = MqttPublishPayload.bytesToStringAsString(
          (message.payload as MqttPublishMessage).payload.message,
        );
        final zoneId = _extractZoneId(message.topic);
        _zoneStateController.add(ZoneState.fromJson(zoneId, jsonDecode(payload)));
      }
    });
  }

  Future<void> startZone(int zoneId, Duration duration) async {
    final builder = MqttClientPayloadBuilder();
    builder.addString(jsonEncode({
      'action': 'open',
      'duration': duration.inSeconds,
    }));
    _client.publishMessage(
      'irrigation/zone/$zoneId/command',
      MqttQos.atLeastOnce,
      builder.payload!,
    );
  }
}

Schedule and Automation

Irrigation schedule is a separate screen where you set zones, duration, and repetition. Complexity: schedule must account for weather forecast (skip watering if rain expected) and soil sensor data.

Integrate with weather forecast via Open-Meteo API (free, no key):

Future<bool> shouldSkipIrrigation(double lat, double lon) async {
  final url = Uri.parse(
    'https://api.open-meteo.com/v1/forecast'
    '?latitude=$lat&longitude=$lon'
    '&daily=precipitation_sum'
    '&forecast_days=2'
    '&timezone=auto'
  );
  final response = await http.get(url);
  final data = jsonDecode(response.body);
  final todayRain = data['daily']['precipitation_sum'][0] as double;
  final tomorrowRain = data['daily']['precipitation_sum'][1] as double;
  // Skip if today or tomorrow has >5mm rain
  return todayRain > 5.0 || tomorrowRain > 5.0;
}

Zone Management UX

Zone management screen — map or schematic plan with color indicators: green — active zone, gray — inactive, red — valve error. Long tap on zone — start manual watering with time selection (slider 1-60 minutes).

"Stop all" button must always be accessible in one action — don't hide in menu.

Developing irrigation control application with Rachio API or custom MQTT controller, schedule and weather integration: 3-5 weeks. Cost calculated after clarifying equipment and zone count.