IOT - Bosch
  • Introduction
  • Devices
    • Bosch XDK 110
      • Introduction
      • Operating System
      • Hardware
        • Sensors
          • Accelerometer
            • C
          • Gyroscope
            • C
            • Mita
          • Magnetometer
            • C
          • Environmental
            • C
            • Mita
          • Ambient Light
            • C
            • Mita
          • Acoustic
            • C
      • Software
        • XDK WorkSpace
          • Structure
          • Debug
          • Supported languages
            • C
              • Static Library (.a)
            • XDK Live - Mita
            • MicroFlo
      • Connectivity
        • Bluetooth Low Energy (BLE)
          • Overview
          • General Info
          • Implementation
            • C
            • XDK Live
        • WI-FI
          • OverView
          • Implementation
            • C
            • XDK Live
        • WI-FI Enterprise
      • Protocols
        • CoAP
          • Overview
          • Implementation -TBD
        • HTTP
          • Overview
          • Structure and Methods
          • Implementation
            • C - Rest
            • C - Post
            • XDK Live
        • HTTPS
          • Overview
          • Implementation TBD
        • LWM2M
          • Overview
          • Implementation TBD
        • MQTT
          • Overview
          • Implementation
            • C
            • XDK Live
        • USB
          • Overview
          • Implementation TBD
      • Data Storage
      • XDK Extension Bus
      • Community
      • Applications
        • Language C
          • HomeAssitant - MQTT
            • Prerequisites
            • Server
            • Device
          • IOTA-MQTT-XDK
            • Prerequisites
            • XDK110
            • Mqtt JSON to MAM
            • SensorHub
            • Demo
        • Language XDK Live
          • MQTT
            • Hello World
            • HomeAssistant
              • Prerequisites
              • Server
              • Device
            • Docker-HomeAssistant
          • HTTP
            • Roku Remote Control
              • Roku API
              • MITA
                • Example
    • Bosch AMRA
    • Bosch GLM 100C
    • Bosch FLEXIDOME IP panoramic
    • Bosch GLM 100C
    • Bosch Rexroth Nexo
    • Bosch Rexroth PRC 7000
    • Bosch RRC / CT100
    • Bosch Rexroth IoT Gateway
  • Bosch IOT Solutions
    • Bosch IOT Projects
      • Smart Home
      • Industry 4.0
      • Smart Cities
      • Connected-mobility
    • Bosch IOT Suite
      • Bosch Analytics
      • Bosch IOT Hub
      • Bosch Iot Permission
      • IoT Remote Manager
      • IoT Rollouts
      • IoT Things
      • Demo TBD **
    • BPM and BRM
  • IOTA
    • Introduction
      • Tangle
      • Glossary
      • Differences with other tech
      • How does iota work
      • Developers
    • Qubic
      • What is Qubic?
      • Target
      • Qubic Protocol
    • Ecosystem
    • Applications
      • Python
      • XDK110
        • Prerequisites
        • XDK110
        • Mqtt JSON to MAM
        • SensorHub
    • Bosch/IOTA
  • ByteBall
    • SmartContract
    • Use Case
      • BoshCoins
Powered by GitBook
On this page

Was this helpful?

  1. Devices
  2. Bosch XDK 110
  3. Applications
  4. Language C
  5. HomeAssitant - MQTT

Server

We need to configure the yaml file so we can add our sensors and also modify the view of our web page. Open a terminal an execute

$ nano ~/.homeassistant

Then paste the next code

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 22.65
  longitude: -103
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Mexico_City

  customize:
  # Here we discribe each component that would be present on the screen

  #House

    sensor.house_temperature:
      friendly_name: Temperature
      icon: mdi:temperature-celsius
    sensor.house_pressure:
      friendly_name: Pressure
      icon: mdi:weather-windy
    sensor.house_humidity:
      friendly_name: Humidity
      icon: mdi:water
    sensor.house_light:
      friendly_name: Light
      icon: mdi:lightbulb-on-outline
    sensor.house_noise:
      friendly_name: Noise
      icon: mdi:volume-high

    light.xdk_led:
      friendly_name: Lamp
      icon: mdi:lightbulb

# Show links to resources in log and frontend
#introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Uncomment this to add a password (recommended!)
  # api_password: PASSWORD
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123
  server_port: 8123

history:

# MQTT broker to communicate with XDK110
mqtt:
  broker: broker.hivemq.com
  port: 1883
  client_id: RBTautomation
  keepalive: 60

# We define each sensor and in which topic is going to hear the subscribe or publish the information. 
# Subscribe 

sensor:
  - platform: mqtt
    name: house temperature
    state_topic: "XDK/RFT/temperature/status"
    sensor_class: heat
  - platform: mqtt
    name: house pressure
    state_topic: "XDK/RFT/pressure/status"
  - platform: mqtt
    name: house humidity
    state_topic: "XDK/RFT/humidity/status"
  - platform: mqtt
    name: house light
    state_topic: "XDK/RFT/light/status"
  - platform: mqtt
    name: house noise
    state_topic: "XDK/RFT/noise/status"

# Define light as a publish component, we send 0 or 1 depending on the status

light:
  - platform: mqtt
    name: xdk led
    state_topic: 'XDK/RFT/led/status'
    command_topic: 'XDK/RFT/led/status'
    optimistic: true
    payload_on: 1
    payload_off: 0

group:

  default_view:
    view: yes
    entities:
      - group.house

# Finally we attach each componente to the ui

  house:
    name: House
    entities:
      - sensor.house_temperature
      - sensor.house_pressure
      - sensor.house_humidity
      - sensor.house_light
      - sensor.house_noise
      - light.xdk_led

What we are doing here is defining the sensor and which topic they are subscribe so they could print the data.

You can modify the icon of each item with the tag icon:

You can use this material designs icos to personalized

Here you can also find which type of sensor you are going to use: light, movement, etc.

PreviousPrerequisitesNextDevice

Last updated 5 years ago

Was this helpful?

https://cdn.materialdesignicons.com/2.3.54/
https://www.home-assistant.io/components/binary_sensor/