-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
557 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Home Assistant - MQTT Discovery | ||
|
||
Here are a few examples to connect rscp2mqtt with the tool Home Assistant. The Home Assistant offers "MQTT Discovery" for this purpose. Please adapt to your own needs. | ||
For the Home Assistant, the MQTT integration must be configured with discovery prefix "homeassistent". Follow the manual on https://www.home-assistant.io/integrations/mqtt/ | ||
|
||
Power | ||
``` | ||
mosquitto_pub -h localhost -p 1883 -r -t "homeassistant/sensor/rscp2mqtt/solar_power/config" -m '{ "state_topic": "e3dc/solar/power", "device": { "identifiers": "e3dc", "name": "e3dc", "model": "S10", "manufacturer": "E3/DC", "sa": "S10" }, "unique_id": "e3dc_solar_power", "name": "Solar Power", "unit_of_measurement": "W", "device_class": "power" }' | ||
``` | ||
|
||
Energy | ||
``` | ||
mosquitto_pub -h localhost -p 1883 -r -t "homeassistant/sensor/rscp2mqtt/solar_energy/config" -m '{ "state_topic": "e3dc/solar/energy", "device": { "identifiers": "e3dc", "name": "e3dc", "model": "S10", "manufacturer": "E3/DC", "sa": "S10" }, "unique_id": "e3dc_solar_energy", "name": "Solar Energy", "unit_of_measurement": "kWh", "device_class": "energy" }' | ||
``` | ||
|
||
Switch | ||
``` | ||
mosquitto_pub -h localhost -p 1883 -r -t "homeassistant/switch/rscp2mqtt/set_weather_regulation/config" -m '{ "state_topic": "e3dc/ems/weather_regulation", "command_topic": "e3dc/set/weather_regulation", "payload_on": "true", "payload_off": "false", "state_on": "true", "state_off": "false", "device": { "identifiers": "e3dc", "name": "e3dc", "model": "S10", "manufacturer": "E3/DC", "sa": "S10" }, "unique_id": "set_e3dc_weather_regulation", "name": "Weather Regulation", "device_class": "switch" }' | ||
``` | ||
|
||
If the MQTT broker runs on another server, please use its name instead of `localhost` and change the port if it is different. | ||
Please adjust the calls if you use a different prefix. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.