Skip to content

Integration with Home Assistant – (MQTT)

ChuckNorrison edited this page Oct 21, 2024 · 1 revision

Integration with Home Assistant – (MQTT) Leave a reply

Home Assistant Configuration

Home assistant side, it is just required to enable the MQTT. The procedure to integrate the MQTT in home assistant is quite straightforward.

From the Home assistant interface, go to Configuration-> Addon-> mosquitto broker.

image

Regarding the access to the MQTT in home assistant from external Apps, by default it is required to use User and password authentication. for this type of authentication the port is still 1883.

It is good practice to add another user to home assistant to access to the MQTT broker using its credentials. In December 2021 the interface has changed, now to add a user, you should go to configuration -> People and Zones and add a person with the login permits. Remember this credentials as they will be used later to access the MQTT.

image

In this case I have created the user MQTT_user.

Now It is possible to interface Home assistant using the MQTT protocol.

Integration with Hydrosys4

The integration of Hydrosys4 with home assistant will allow to see all the sensors and actuators on HomeAssistant and allow to use the actuators directly from Home Assistant.

The two system can actually work together, the Hydrosys4 can conveniently manage automation relevant to irrigation planning, and basic environmental control. At the same time the home assistant can be used for more complex automation tasks and a more unified graphical view.

To integrate the hydrosys4 to home assistant is very easy.

On the hydrosys4 interface, go to Setting, then click the button “Home Assistant Integration”. You should see this interface:

image

Integration Working Mode: there are three choices,

  • Status: Enable to send Home Assistant the Status,

  • Status+Commands: Enable to send Home Assistant the Status and receive commands for the actuators.

  • Disable: Disable the integration

Device Identifier: Any string, Used to identify this device in Home Assistant

IP Address: IP address of Home Assistant

Port: Port used in Home Assistant MQTT

User Name: Username of the user in Home Assistant

Password: Password of the user in Home Assistant

Enable Discovery Mode: If this is yes, the Hydrosys4 will automatically send the configuration to Home assistant and provide updates to home assistant every time a sensor/actuator is added or removed from hydrosys4.

To finish the configuration, click the button “Confirm and Apply”.

Now go to Settings -> device and Settings, then you should see in the Mosquito broker square a “Configure Button”, click configure and the device will be added.

Now you should see all hydrosys4 hardware the items appear on the Home Assistant interface.

image

In case you want to remove the items, it is possible from the same page in “setting”->”home assistant integration”, clicking the button “Remove all the Hydrosys configuration from Home Assistant”.

image