halo-paws-background

Mobile App, Admin Portal, and Firmware for a Smart Dog Collar

Features geofencing and virtual leash functionality
logo-halo-1

The client wanted to develop a smart dog collar that offered pet owners a number of features for safely monitoring their pets.

Case Highlights

Softeq developed a mobile app, admin portal, and firmware for PAWS’ smart dog collar.
  • Dog position tracking in real time via GPS, Wi-Fi, Bluetooth, and LTE 
  • Geofencing functionality
  • Automatic behavioral corrections and instant commands
  • Offline mode
  • Azure-based back end
  • Over-the-air (OTA) firmware updates
Project Information
Engagement model

DDT (Dedicated Development team)

T&M (Time and Materials)

Methodology

Scrum

Team
6

Business Analysts

5

Mobile Developers

2

Full-Stack Developers

5

Back-End Developers

2

Firmware Engineers

8

QA Engineers

1

UX/UI Designer

4

Support Engineers

More Details

Problem

The client wanted to create a smart dog collar. The product would be geared toward dog owners living in private homes that want to keep their pets safe.

The smart collar was meant to be a more effective and innovative alternative to traditional solutions:

  • Physical fences that restrict the movement of dogs
  • In-ground fences that create an electrically charged boundary

The connected device would allow dog owners to create virtual fences, which prevent pets from leaving a designated area, and keep dogs within a safe distance using virtual leash functionality.

The client addressed Softeq to develop a cross-platform mobile application, back end, firmware, and web admin portal for the connected collar.

Solution

solution (1)
How it Works

Through a mobile app, users can set up automatic behavioral corrections and give instant commands.

The solution features a sophisticated business logic that enables users to create virtual fences or apply instant commands on their mobile phone directly via Bluetooth or by connecting to a Wi-Fi or LTE network. Users can configure a number of behavior corrections that are applied when a dog approaches or steps beyond the virtual fence. The solution is integrated with Mapbox—an interactive mapping tool that helps set up virtual fences by touching points on a map.

The solution supports over-the-air (OTA) firmware updates, which will help our client roll out new features and security patches after the collar hits the shelves.

Mobile App

We chose Xamarin for the iOS mobile app so that we could reuse the codebase to create an Android version in the future. The framework also enables a simpler debugging process, which will help our client reduce the application maintenance costs.

The mobile app enables the user to:

  • Define virtual fences on an online map
  • Track a dog’s position in real time via GPS, Wi-Fi, Bluetooth, and LTE, automatically selecting the best option at all times.
  • Set up behavioral corrections for designated areas
  • Use virtual leash functionality: monitor the distance between a dog and a smartphone over Bluetooth and execute various scenarios to correct unwanted behavior
  • Define virtual fencing or restricted areas indoors with Bluetooth beacons
  • Use the collar in offline mode: once the virtual fences are defined, the gadget does not need cellular or Wi-Fi connectivity to function (virtual fence settings are stored on the device)
  • Receive push notifications every time the dog leaves the fenced area, gets lost, or heads home
  • Access a practical training course developed in collaboration with Cesar Millan, a leading dog behavior expert
Automatic Corrections

Through the mobile app, users can configure areas where different types of automated corrections are applied. Depending on the user's choice, it may be a sound, vibration, or a static signal.

When dogs leave the virtual fence area, the system considers them to be lost if they do not return within 30 minutes. In this instance, owners can find their pets via GPS coordinates. When the user’s dog is approaching their house, the collar turns on an encouragement signal ("Heading Home").

Instant Commands

In addition to automatic corrections, users can apply instant commands.

If pet owners see their dog fighting with another dog or eating something on the street, they can activate any automatic correction through their smartphone. Users can also praise their dog for good behavior or call them home.

 
Training Module

We integrated the mobile app with a third-party Learning Management System (LMS) compliant with the SCORM e-learning software standards.

The LMS allows users to access a special training from the world-renowned dog behaviorist Cesar Millan. Following the 21-day program, dog owners will be able to:

  • Understand how the solution works
  • Help their dog get comfortable wearing the collar
  • Teach their dog to keep away from boundaries and come back to the safety zone at home
  • Use the same methods the dog has already mastered inside for outdoor training
Energy Saving

When designing the firmware architecture, we implemented several mechanisms to extend the smart collars’ battery life:

  • Sleep mode. When the dog is sleeping or the collar has been taken off, the system uses special algorithms to suspend data transmission and deactivate power consuming modules including the GPS, processor, Wi-Fi, and LTE interfaces.
  • Reduced data transfer within a safe area. If the dog is inside a safe zone, the collar switches to the reduced data transfer mode. As soon as the pet leaves the safe area, the system starts transmitting all the data required for tracking the dog’s position in real time and applying behavioral corrections.
  • Prioritizing Wi-Fi over LTE. The collar only uses LTE connectivity to transmit critical data when Wi-Fi is unavailable. In this instance, transmission of statistics is delayed until the Wi Fi connection appears or the storage runs out.
  • Firmware updates only when the charger is connected. Installing firmware updates is an energy consuming process that involves downloading large amounts of data. Therefore, it is only activated when the charger is connected.
  • Disabling some features when the battery is low. The collar is able to monitor its own battery. If it drops below the critical level, some functionality will be disabled, preventing the battery from being completely discharged.
Azure-based Back End

Cloud Implementation

  • App-device communication. For reliable communication between the collar and the mobile app, we leverage Azure Services such as IoT Hub and Service Bus.
  • Retrieving relevant data. The collar regularly sends telemetry data to the cloud. We use Azure Redis Cache for intermediate data storage to reduce database connections. A background job retrieves the latest data and periodically updates the database. When the mobile app requests telemetry data, the back end compares the database with the cache, and selects the most up to date data. 
  • Notifications. Using Azure Notification Hubs, the solution sends notifications about zone changes (pet left a safe zone, pet returned, etc.), the applied corrections, and other events to the user's smartphone.
  • Device registration. Softeq developed a custom tool that creates certificates to register devices in the IoT Hub when flashing the collars at the factory.
Telemetry Data Collected in the Cloud:

Dog movement dataWi-Fi, LTE, and BLE statusGPS coordinatesStatistics on performed correctionsTechnical information required for communication with the collar via BluetoothCollar orientationOver-the-air firmware update statusDebug and other data logs

Data Sent to the Collar:
  • Collar configurations — defined zones, correction settings, signal type and intensity
  • The “find” command — the collar begins to vibrate or make sounds so that the user can find it
  • Commands for testing selected settings
  • Launch of instant corrections
Customer Support

We use the Zendesk service to provide support to end-users.

If problems or questions arise, users can send an online request to a support specialist and continue the communication via live-chat without leaving the mobile app and logging in again (thanks to the Zendesk SSO feature). Users can also attach screenshots or even send application logs so the customer support specialist can help solve the problem as soon as possible. This approach also helps to lighten the workload for the customer support team by limiting the amount of phone calls they need to field.

If a user has issues with the mobile app, they can provide a support specialist with one-time access to their account by generating an individual one-time token with a limited lifetime. Using this token, they will be able to log in into the user’s account and solve the problem.

Customer Email Notifications

The solution can send automatic email notifications to end-users related to:

  • Change of personal data
  • Account activation/deactivation
  • Firmware update notification
  • Links to updated firmware versions, which can be downloaded and uploaded via USB if the user has problems with FOTA
Security

End-to-end data encryption and client's control over trade secrets

End-to-end data encryption and client's control over trade secrets

To protect user data and eliminate the possibility of the collar being hacked, we implemented security mechanisms for data communication between smartphones and the devices using Bluetooth and Azure Cloud Services. All messages between the collar and smartphone are encrypted. If stolen, collars cannot be reused without approval of the Halo app admin.

The client also wanted to retain sole ownership over certain trade secrets as well as the hardware. During the firmware development phase, Softeq handled the tasks related to IoTHub communication and FOTA. The client’s team was responsible for developing the central part of the business logic, custom safety algorithms, and a hardware support package.

Admin Portal

Softeq developed a web-portal for user data management.

Main Features:

  • Statistics view — knowing the number of active collars, the client can track the information on product sales
  • End-user support — if the user has problems with the device, the client support team can access collar information and logs, remotely update the device firmware, and request permission to access the user’s account to resolve any issues
  • Deactivation of users who violate the application usage rules
  • Identification and resolution of any system issues
  • Firmware update rollout management

Similar project idea?

Explore how you can leverage custom firmware development to integrate your devices into a cohesive IoT system Learn more
Margarita-S
Margarita Account Manager

Result

Smart Dog Collar with Virtual Fencing

The connected collar is currently on the market. The solution helps dog owners feel at ease, knowing that their pets have a lower risk of getting lost and being hit by cars. Should a dog with the connected collar get lost, owners will have no trouble finding them through real-time GPS tracking. Moreover, owners will be able to take their dogs on trips abroad—the device supports LTE data roaming in a special network for IoT devices from the mobile operator TNT. The collar also aids in the training process, which in turn helps reduce the number of dogs that are sent back to animal shelters after adoption.

The solution is less expensive and more flexible than other options on the market. It is much easier to set up than traditional physical fences and in-ground wire fence systems. Additionally, it can be moved to any location at any time, providing endless configurations and adaptability.