HomeCore
Last updated
Last updated
Microart HomeCore is a complete smart home automation solution. It is completely self-hosted with an optional integration to Microart Cloud services. HomeCore is perfect for any size and scale deployments of any home automation software.
Microart HomeCore
HomeCore requires a minimum of two devices. One light-weight wifi connected device that acts like the client, ex: ESP-32, ESP-8266, Aruduino + WiFi, or Raspberry Pi. The client needs to have an MQTT client available.
The second device needs to be a more powerful computer that acts like the "hub" for all connected devices. ex: Raspberry Pi 2 / 3 / 4, Old laptop, Old PC, (you may be able to even use an ESP, however it is not officially supported).
There can be any number of clients for just one hub, ex: 20 clients one hub, 50 clients, or in some cases even 100 clients. Keep in mind, the hub needs to have enough RAM to run its own OS and the HomeCore framework along with all the connected devices.
Connected MQTT devices require their client id's to start with mchome_
without this, the clients will be automatically rejected from connecting to HomeCore (this option can be changed in the HomeCore config).
After the mchome_ prefix of the client id should be the driver id, followed by the device id.
A complete MQTT client id should be as follows mchome_2AFA1SV00CU_309C23E6BB00
the second half in this case is just the devices MAC address, however and completely unique id can be used.
After the HomeCore passes the clientid check it parses the clientid to retrieve the driver id and the device id. The driver id is then used to pinpoint what driver this devices requires in order to operate.
Device drivers can simply be dropped into the HomeCore 'drivers' folder and should be named the driver id followed by the '.js' extension.
If HomeCore cannot find a driver, the device will stay connected on MQTT but will not provisioned into the HomeCore framework. Additionally, the device will not be notified wether a driver is loaded or not, this is intentional and for security reasons.
If, however, a driver is found, HomeCore will instantiate a new instance of the driver and assign various constant values to it, like the bound_device_id
value and the location
values. One complete the driver well then take over and parse all requests from the device. The drivers' getState
function is used for HomeCore to keep an up-to-date list of all the connected drivers and their states. This allows the driver to do state-management on it's own accord and must only respond to the getState
function when required.