From 40538fdb7a0e21019907c72e22828b51de338583 Mon Sep 17 00:00:00 2001
From: rstrouse <47839015+rstrouse@users.noreply.github.com>
Date: Sun, 24 Sep 2023 10:06:52 -0700
Subject: [PATCH] Updated Integrations (markdown)
---
Integrations.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/Integrations.md b/Integrations.md
index 86444e3..c54e006 100644
--- a/Integrations.md
+++ b/Integrations.md
@@ -499,6 +499,79 @@ Tilts the slats for a blind
### Returns
JSON reference to the group
+## GET|PUT|POST /setPostions
+Sets the recorded position of the motor without moving the motor. This is handy for situations where other sensors are used to identify the final position of the motor. For instance, if you have a tilt sensor on a garage door or a magnetic sensor on a gate you can use this to tell ESPSomfy RTS that the position is closed or open depending on the sensor status.
+
+### Parameters
+* `shadeId` - The id of the shade to set the position for [1-32].
+* `position` - Optional lift position from 0-100%.
+* `tiltPosition` - Optional tilt position from 0-100%.
+
+`GET /setPositions?shadeId=1&position=50` - Sets the lift position to 50%.
+`GET /setPositions?shadeId=1&liftPosition=50` - Sets the lift position to 50%.
+
+You can also send this information as a json payload.
+
+Example of a json payload where you can omit either the position or tiltPosition values
+```json
+{
+ "shadeId": 1,
+ "position": 50,
+ "tiltPosition": 100
+}
+```
+
+
+
+### Returns
+JSON reference to the shade
+
+## GET|PUT|POST /setSensor
+Sends a sensor frame to the motor. These can be sent for either a shade or a group to simulate either an Eolis or Sunis sensor. You can create your own wind or sun sensors and have the motor act on these. See the documentation for the Sunis Sun/Wind sensor.
+
+For most motors if you tell it that it is windy it will retract for at least 2 minutes after the first calm signal is sent. If you tell the motor that it is sunny it will extend the shade 2 minutes after receiving this signal and retract 20 minutes after the sunny condition is cleared. This works in conjunction with the sun flag setting on the motor. So it will only retract and extend when the sun flag is activated.
+
+This works for either groups or shades depending on whether you send the group id or the shade id.
+
+### Parameters
+* `shadeId` - The id of the shade to set the sunny or windy attributes [1-32].
+* `groupId` - The id of the group to set the sunny or windy attributes [1-16].
+* `sunny` - 1 for sunny 0 for not sunny.
+* `windy` - 1 for windy 0 for calm.
+
+`GET /setSensor?shadeId=1&windy=1` - Tells the shade that there is a windy condition.
+`GET /setSensor?groupId=1&windy=1` - Tells a group that there is a windy condition.
+`GET /setSensor?shadeId=1&windy=0&sunny=1` - Tells the shade that it is sunny and calm.
+`GET /setSensor?groupId=1&windy=0&sunny=1` - Tells a group that it is sunny and calm.
+
+
+You can also send this information as a json payload.
+
+Example of a json payload send either a groupId or a shadeId. Either or both sunny and windy values can be sent.
+
+The example below tells the motor that it is sunny and calm so act accordingly.
+```json
+{
+ "shadeId": 1,
+ "windy": 0,
+ "sunny": 1
+}
+```
+The example below tells the group members that it is sunny and calm so act accordingly.
+```json
+{
+ "groupId": 1,
+ "windy": 0,
+ "sunny": 1
+}
+```
+
+
+
+### Returns
+JSON reference to the shade or group
+
+
# MQTT
ESPSomfy-RTS publishes attributes to your MQTT broker and subscribes to topics that allow you to control the shades. To enable your broker connect it in the configuration pages under MQTT. This will begin reporting the shade status to your broker under the topic you assigned.