> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unicontrol.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Ecowitt weather station webhook receiver

> Receives weather sensor data from Ecowitt stations via form-urlencoded POST. Validates the webhookId and optional PASSKEY, then persists state and publishes via MQTT.



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/webhooks/ecowitt/{webhookId}
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/webhooks/ecowitt/{webhookId}:
    post:
      tags:
        - Webhooks
      summary: Ecowitt weather station webhook receiver
      description: >-
        Receives weather sensor data from Ecowitt stations via form-urlencoded
        POST. Validates the webhookId and optional PASSKEY, then persists state
        and publishes via MQTT.
      operationId: postV1WebhooksEcowittByWebhookId
      parameters:
        - in: path
          name: webhookId
          required: true
          schema:
            type: string
            format: uuid
          description: UUID that identifies the Ecowitt config entry.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                PASSKEY:
                  type: string
                  description: Optional passkey for request validation
                dateutc:
                  type: string
                  description: UTC timestamp of the reading
                tempf:
                  type: string
                  description: Temperature in Fahrenheit
                humidity:
                  type: string
                  description: Relative humidity (%)
                baromrelin:
                  type: string
                  description: Relative barometric pressure (inHg)
                baromabsin:
                  type: string
                  description: Absolute barometric pressure (inHg)
                winddir:
                  type: string
                  description: Wind direction (degrees)
                windspeedmph:
                  type: string
                  description: Wind speed (mph)
                rainratein:
                  type: string
                  description: Rain rate (in/hr)
            example:
              PASSKEY: abc123
              dateutc: '2024-01-15 12:00:00'
              tempf: '72.5'
              humidity: '55'
              baromrelin: '29.92'
      responses:
        '200':
          description: Weather data received and processed
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
              example:
                status: ok
        '400':
          description: Invalid webhook ID format
          content:
            application/json:
              example:
                error: Invalid webhook ID
        '401':
          description: Invalid PASSKEY
          content:
            application/json:
              example:
                error: Invalid PASSKEY
        '404':
          description: Config entry or entity not found
          content:
            application/json:
              example:
                error: Config entry not found
        '500':
          description: Internal error
          content:
            application/json:
              example:
                error: Internal error
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````