Skip to content

acgodson/tutela

Repository files navigation

Tutela - Farm Health Monitoring System

Table of Contents

Overview

Real-time health monitoring system for pig farms with hierarchical data tracking and historical lookup capabilities

Demo

Architecture

Testnet Topics

Topic Type Topic ID HashScan Link
Region Topic 0.0.5287948 View on HashScan
Farm Topic 0.0.5292739 View on HashScan

Topic Structure

The system uses a hierarchical three-level topic structure:

Level 1: Region Topic

Field Type Description
farmTopicId string Hedera Topic ID for the farm
ethAddress string Farm owner's Ethereum address
farmerName string Name of the farmer
timestamp ISO date Registration timestamp

Level 2: Farm Topic

Field Type Description
pigTopicId string Hedera Topic ID for the pig
rfid string Pig's RFID identifier
timestamp ISO date Registration timestamp

Level 3: Pig Topic

Field Type Description
hasFever boolean Fever status flag
temperature number Temperature reading
timestamp ISO date Measurement timestamp

Tools & Integrations

  • Hedera Consensus Service
  • Cloud Functions for API endpoints
  • Topic IDs as foreign keys
  • JSON formatted messages
  • CORS-enabled web access
  • OpenAI LLM and Langchain Integration

API Reference

Topic Creation Endpoints

Endpoint Method Purpose
/createRegion POST Creates new region topic
/registerFarm POST Creates farm topic and links to region
/registerPig POST Creates pig topic and links to farm

Data Query Endpoints

Endpoint Method Purpose
/getFarmId GET Retrieves farm details from region
/getTopicMessages GET Gets all messages for any topic
/submitPigFeverStatus GET Records pig health status

Example IoT device call:

GET /submitPigFeverStatus?rfid=123&hasFever=true

References & Shortcuts

Team


© December 18th, 2024

About

Realtime Pig Farm Monitor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages