logo elektroda
logo elektroda
X
logo elektroda

Best Options for Controlling SmartHome with Custom Android Software and Zigbee

marycyś 948 11
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19855880
    marycyś
    Level 12  
    Posts: 361
    Rate: 24
    Hi,

    I want to make a SmartHome, but control from my own software on Android.
    What options do I have that exist on the market, or maybe make my own system on Zigbee?
    The enthusiasm is there, but I don't want to break down the door at first....

    Greetings.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 19855931
    marycyś
    Level 12  
    Posts: 361
    Rate: 24
    Several sensors (lights, CO, etc.) and 'relays' (switches in 230V sockets), measuring electrical power consumption for the whole house. I have not yet established the full functionality.
  • #4 19857179
    xury
    Automation specialist
    Posts: 7071
    Help: 876
    Rate: 1486
    By 'own' do you mean your own software on Android? Some tablet that manages everything?
    Or is it better to use some open source ?
    Such as HomeAssistant, Domoticz, etc.
  • ADVERTISEMENT
  • #5 19857585
    marycyś
    Level 12  
    Posts: 361
    Rate: 24
    The most interesting option is to write your own program under Android. Rummaging through someone else's code takes time and is not as rewarding :) .

    The program in Android will manage the whole system. At the moment I do not intend to manage via the internet. Possibly in the future when I add web control to probably need to add some kind of tiny that will be the main computer controlled from a smartphone.

    As I understand it, the only option, in the case of a raspberry for example, is to connect everything via a gateway that I have purchased?

    I can't add wiring, so the transmission will only be by radio (zigbee).
  • Helpful post
    #6 19858859
    sk1977
    IT specialist
    Posts: 8047
    Help: 1326
    Rate: 741
    marycyś wrote:
    I have the enthusiasm, but I don't want to break down the door at first...
    - in the time it takes to realise it, the enthusiasm can pass. And a lot of times... Imagine how much time you need to implement the first, simplest functionality.... An ambitious idea, but does it currently make sense?
    If you use a zigbee gateway from one manufacturer - you limit the number of possible devices, access by default through the manufacturer's servers, etc. If a multi gateway - you would have to write everything from scratch.
    In my opinion, it is better to use what is there as a basis for something that already exists - e.g. as above HA or HA-based AI-Speaker. You can use MQTT, or install e.g. Node-Red and practically create your own functionality (as far as the devices themselves are capable).
    As a basis, you would already have support for thousands of devices and zigbee multiband, access via web or app. And you could focus on functionality.
    Helpful post? Buy me a coffee.
  • #7 19859964
    marycyś
    Level 12  
    Posts: 361
    Rate: 24
    In HomeAssistant, Domoticz, etc., can you download data to your programme in android?
  • ADVERTISEMENT
  • #8 19860021
    sk1977
    IT specialist
    Posts: 8047
    Help: 1326
    Rate: 741
    That's probably something you'll have to check for yourself, I suspect no one knows exactly what you mean when you write "your program in android".
    There are dedicated apps (there's one for HA, AIS, domoticz I don't know), you can use via the web, so it's probably possible to "extract" data, but you'll have to check this for yourself.
    Helpful post? Buy me a coffee.
  • #9 19860149
    xury
    Automation specialist
    Posts: 7071
    Help: 876
    Rate: 1486
    Yes, you can. I myself know probably a dozen ways to communicate bidirectionally with Domoticz and HA.
    The first and most important is MQTT, which has become the standard for IoT device communication. Others are APIs, Http, Python ports and plugins, LUA, Blockly, JSON, YAML, communication via UART, Rs485, TCP, using e.g. modbus, CAN, winsocket etc.
    So I'm sure you'll find something that suits you.
  • #10 19860346
    marycyś
    Level 12  
    Posts: 361
    Rate: 24
    Which system: Domoticzem and HA, is more universally designed?
    As I understand it, in both cases you have to create an account on the server?
    Is the MQTT protocol only between devices in the local transmission network (home), and further on all data goes to the server?
  • Helpful post
    #11 19860852
    xury
    Automation specialist
    Posts: 7071
    Help: 876
    Rate: 1486
    Home Assistant is more versatile, but at the same time it is more difficult to so called enter to begin with
    No. These are systems that run on a local machine. Most often, an RPi3 or RPi4 will suffice to start with.
    The MQTT protocol is a network protocol. It does not matter what kind of network it is. Usually, communication with the broker takes place locally, but there is no obstacle to connecting yourself via MQTT to, for example, some sensor from a distant plot of land as long as there is Internet access.
  • #12 19860911
    marycyś
    Level 12  
    Posts: 361
    Rate: 24
    That is, the raspberry itself collects data from the sensors and sends to the 'relays, but does there need to be an intermediary (gateway) if the whole thing works on zigbee (or BT)?

Topic summary

✨ The discussion revolves around creating a custom SmartHome system controlled via Android software, utilizing Zigbee for communication. The user expresses interest in developing their own application rather than using existing open-source solutions like Home Assistant (HA) or Domoticz. Various responses highlight the importance of considering existing platforms for ease of integration and device compatibility. MQTT is identified as a key protocol for bidirectional communication with devices, and both HA and Domoticz are noted for their local operation without mandatory server accounts. The conversation also touches on the necessity of a gateway for Zigbee communication and the potential for Raspberry Pi (RPi) to serve as a central hub for managing sensors and relays.
Generated by the language model.

FAQ

TL;DR: For Android‑controlled Zigbee homes, build on Home Assistant/AI‑Speaker with MQTT—these stacks support thousands of devices; "focus on functionality." Keep it local first, add web/app later, and avoid single‑vendor gateways to reduce lock‑in. [Elektroda, sk1977, post #19858859] Why it matters: This guide helps Android developers choose a scalable, local‑first path to control Zigbee devices without vendor lock‑in.

Quick Facts

Can I control Zigbee devices directly from my Android app without a gateway?

Not directly. Zigbee uses a mesh with a coordinator that manages the network. Use a hub (e.g., Raspberry Pi) with a Zigbee coordinator, then let your Android app talk to the hub via MQTT or HTTP. Phones generally lack Zigbee radios. [Zigbee Alliance, 2020]

Which is more universal for mixed devices, Home Assistant or Domoticz?

Home Assistant is more versatile, though the learning curve is steeper. "Home Assistant is more versatile." It runs locally and works well as a central brain for Zigbee, MQTT, and more. Start on a Raspberry Pi and expand as needed. [Elektroda, xury, post #19860852]

Do Home Assistant or Domoticz require an online account or cloud?

No. They run on a local machine, typically a Raspberry Pi 3 or 4. You can add remote access later, but you can operate entirely offline for local control and privacy. [Elektroda, xury, post #19860852]

How can my Android app read and write data with HA or Domoticz?

Use MQTT for pub/sub messaging, or REST/HTTP and JSON for direct API calls. Serial (UART/RS485) and TCP options exist for specialized devices. "MQTT has become the standard for IoT device communication." Choose what best fits your app architecture. [Elektroda, xury, post #19860149]

Does MQTT keep traffic local, or does it send data to the cloud?

MQTT is just a protocol. Run a local broker for LAN‑only traffic, or connect securely over the Internet when needed. You can even reach a sensor on a distant plot if it has Internet access. [Elektroda, xury, post #19860852]

What hardware do I need to start?

Use a Raspberry Pi 3 or 4 as the hub. Install Home Assistant (or AI‑Speaker), add a Zigbee coordinator, and set up an MQTT broker. This gives you a local, extensible base for Android control. [Elektroda, xury, post #19860852]

How do I avoid vendor lock‑in with Zigbee?

Avoid single‑manufacturer gateways that limit device choice and default to vendor servers. Build on HA/AI‑Speaker with a multi‑vendor stack; you get support for thousands of devices and local control. This improves flexibility and resilience. [Elektroda, sk1977, post #19858859]

Should I build everything from scratch or leverage an open platform?

Leverage an open base, then customize. Start with HA/AI‑Speaker, MQTT, and Node‑RED to deliver features fast. "You could focus on functionality." Writing every integration yourself slows delivery and drains enthusiasm. [Elektroda, sk1977, post #19858859]

Can I build this on Bluetooth instead of Zigbee?

Yes, but plan carefully. Bluetooth Mesh exists and needs a provisioner and gateway to bridge to IP networks. Device availability and integration depth differ from Zigbee. Confirm your devices and controller support Bluetooth Mesh roles you need. [Bluetooth SIG, 2021]

How do I switch 230V sockets and measure whole‑house energy wirelessly?

Use smart relays or plugs for socket control and metering devices for consumption. Pick devices that speak MQTT, Modbus, TCP, or expose APIs your hub supports. Bridge everything through HA or Domoticz, then control from Android. [Elektroda, xury, post #19860149]

What’s the quickest 3‑step way to prototype an Android‑controlled Zigbee setup?

  1. Install Home Assistant on a Raspberry Pi 3/4 and set a local IP.
  2. Add a Zigbee coordinator and pair one sensor and one relay.
  3. Install a local MQTT broker; have your Android app subscribe to the sensor and publish relay commands. [Elektroda, xury, post #19860852]

Can I add web or mobile app access later without redesigning?

Yes. HA‑based stacks already expose a web UI and mobile apps. Keep your core local, then enable remote access when ready. This lets you iterate on features without re‑architecting. [Elektroda, sk1977, post #19858859]

Can I link a sensor on a distant plot of land to my home system?

Yes. If the remote site has Internet, connect it to your home MQTT broker or a cloud broker you control. Your Android app and HA can then exchange messages with the remote sensor bidirectionally. [Elektroda, xury, post #19860852]
Generated by the language model.
ADVERTISEMENT