Why do we choose Home Assistant? It is because he can't resist itself ~
Home Assistant is a Python-based smart home open source project, supporting many brands of smart home equipment, can easily implement voice control, automation, etc. It has a simple, suitable for mobile devices to control all devices of the user, and will not store any data in the cloud to protect personal privacy.
It is the most popular IOT intelligent hardware for GitHub, and the current 44k star, 14.3k fork, reddit.com Community MEMBERS is 130 k. It can create many smart home games based on the Raspberry Hardware, which has a relatively high reputation and user group in the developer's field.
What are the people?
Lovers / Players: If you are the player of the whole house smart hardware, you will buy smart products yourself, build your own housing intelligent solution, then you welcome you!
Personal developer / enthusiasts: If you have one of the Powered By Tuya devices, you want to achieve interconnection between different products and brands, and all house smart devices are linked, then you must come!
Software and Hardware Integrator (ISV / IHV): You can provide customers with a doodle ecology intelligent hardware access service based on the Home Assistant platform and Tuya plugin, direct integration or secondary development, to provide customers with intelligent hardware access services, such as developing Drive-driven software development services, and build customization House intelligent control system (web / app / raspberry software, etc.)
System Integrator (SI): You can use the Home Assistant platform and Tuya plugin, adapt to the intelligent hardware of the graffiti ecology, develop-related Drive drivers, integrated into your own intelligent hardware ecosystem (such as Control4), providing customers with complete Hardware scheme access and software platform services. You can call the Tuya Open API interface, cloud cloud docking.
No.2 Hass Tuya Plugin Technology Principles
What are Hass Tuya plug-in technology?
Python:
Python is an interpretation of advanced universal programming language. The design concept of Python emphasizes code readability by using a dominant. Have interpretive, compiletics, interactivity, and object-oriented features. Due to its characteristics of its open source, Python has been transplanted (that is, to work) to many platforms.
Raspberry Pi:
It only has a microcomputer with a credit card size, which is based on Linux. Because of its low price, powerful, sincerely, it has been sought after by many computer enthusiasts and CNG, and has a high popularity in the IoT open source.
Open API:
The Open Capacity of the Internet of Things Covered by Graffiti, Covering Equipment Control, House Management, Scene Automation and other core scenes. Developers can quickly build smart business, smart industries such as Open API.
MQTT (Message Queuing Telemetry Transport, Message Queue Telephone Turning Protocol):
It is a "lightweight" communication protocol based on publish / subscribe (Publish / Subscribe) mode, which is built on the TCP / IP protocol, released by IBM in 1999. The greatest advantage of MQTT is that you can provide real-time and reliable messaging services with minimal code and limited bandwidth. As a low-cost, low-bandwidth occupied instant messaging protocol, it has a wide range of applications in terms of Internet of Things, small devices, mobile applications.
The Home Assistant body is based on Python language. Due to the Python cross-platform feature, it supports deployment within the mainstream operating system such as Raspberry, Windows, Mac, Linux.
The HOME Assistant plug-in interfaces from the graffiti cloud from the graffiti cloud by the graffiti cloud Open API interface, exhibiting the Home Assistant UI (Web or App).
You can send the standard instruction to the doodle cloud through the Open API interface, the graffiti cloud is issued to the device via MQTT (Open IoT Hub), and implements device control.
Device status change, report to the graffiti cloud by MQTT, then graffiti clouds to the Home Assistant plugin by MQTT, plug-in update the local device cache, notify Home Assistant, UI refresh device display.
NO.3 Drive development
Home Assistant helps developers reduce the difficulty of plug-in development by providing a range of Entities. When we access the PBT (Powered By Tuya) to Home Assistant, we are implemented by developing a Hass Tuya plugin driver.
The whole includes two parts, "drive basic logic" and "drive equipment classes".
Different drives of "Drive Basic Logic" are basically similar, mainly for graffiti devices to the home assistant system logic.
"Drive Equipment Class" is the Tuya Equipment Model and the Home Assistant Model Model Mapping, implements the DP Code logic by the Home Assistant Entity <-> Function <-> Graffiti "Standard Set" DP Code Logic.
No.4 Business scene
IoT local integration
HOME Assistant attracts a large number of developers from their own development plug-in because of its open source feature, such as XIAMI, HikVision, Honeywell, Yeelight, and more. Through Home Assistant Tuya plug-in, Home Assistant can quickly build an IoT local fusion system that combines multiple vendors hardware devices and graffiti hardware.
Python system access doodle cloud
The Home Assistant Tuya plugin is based on Tuya-IoT-PY-SDK. Tuya-IoT-PY-SDK is based on Python SDK based on doodle cloud API package, which requests network requesting logic, token refresh logic, Open IoN IoN IoN IoN IoN IoN IoN IoN IoN IoN IoN IoN, and MiTT re-connect logic, providing it to the Python function. The SDK caller, so that the SDK caller does not need to have a specific logic implementation, just like calling a normal Python function, just like calling a normal Python function.
If you developed the system based on the Python language, you can quickly access the doodle clouds, reduce access learning costs.
Here, what can you get?
Home Assistant has a neutral open source, if you are an ordinary developer, it is easier to learn.
In the process of use, you can use your own programming capabilities under your intention, you can participate in the perfect iteration of Tuya plug-ins, and you can develop your own Home Assistant plug-in, in-depth understanding of doodle ecological capabilities.
Home Assistant Tuya Plugin has been launched, supporting "custom development" and "House Intelligence PaaS" cloud project types, welcome to understand the experience.