Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.venv
/__pycache__
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ You have 6 ways to operate. The recommended operation mode is mode 5. But the ot
-down, -d lower the shutter
-stop, -s Stop the shutter
-program, -p Send a program signal
-press BTN [BTN...] Simulate a chord press of a the specified remote buttons
('up', 'down', 'stop'/'my', and 'program')
-long When used with the -press option, simulates a long press
-demo lower the shutter, stop after 7 second then raise the shutter
-duskdawn DUSKDAWN DUSKDAWN, -dd DUSKDAWN DUSKDAWN
Automatically lower the shutter at sunset and rise the
Expand All @@ -135,6 +138,7 @@ You have 6 ways to operate. The recommended operation mode is mode 5. But the ot
-mqtt, -m Enable MQTT integration



**Examples:**
All three command the shutter named corridor. The first one will raise it. The second one will lower it. The third one will lower the shutter at sunset and raise it again 60 minutes after sunrise.
```sh
Expand Down Expand Up @@ -215,7 +219,7 @@ First time you use the Web GUI, it's important that you follow these 3 steps:
1. Set up your location. This is required to correctly determine the time of sunrise and sunset. To do so, navigate to the top menu item "Settings". Use the map to pinpoint your location. You can also use the search functionality on the left-hand side (magnifier icon) and type your address. Press "Save"

1. You will need to set up your shutters and program your remote control. To do so, select the second menu item "Add/Remove Shutters". <br/>![Screenshot](documentation/p1.png)<br/>
Click the "Add" button, select the name for your shutter (this is also the name that the Amazon Alexa app will use later) and click on the "save" icon. Then follow the on-screen instructions for programming your shutter.
Click the "Add" button, select the name for your shutter (this is also the name that the Amazon Alexa app will use later) and click on the "save" icon. Then follow the on-screen instructions for programming your shutter. For installing shutters from the factory default configuration, use the Configure button.

1. Next, make sure your shutters work. The easiest way to verify is to use the "Manual Operations" menu. <br/>![Screenshot](documentation/p2.png)<br/> You can rise and lower your shutters by clicking on the relevant icons.

Expand Down
2 changes: 2 additions & 0 deletions defaultConfig.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ EnableDiscovery = true
# followed by a comma deliminated list of
# - Userfriednly Name
# - indicator if these remote is active or has been (soft-)deleted
# - duration (seconds) for motor to fully lower down
# - duration (seconds) for motor to fully rise up (optional otherwise down duration will be used in both directions)
#
[Shutters]

Expand Down
19 changes: 19 additions & 0 deletions fauxmo_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"FAUXMO": {
"ip_address": "auto"
},
"PLUGINS": {
"SimpleHTTPPlugin": {
"DEVICES": [
{
"name": "SOMFY",
"on_cmd": "http://localhost:80/cmd/stop?shutter={SHUTTER_ID}",
"off_cmd": "http://localhost:80/cmd/up?shutter={SHUTTER_ID}",
"method": "POST",
"initial_state": "on",
"use_fake_state": true
}
]
}
}
}
135 changes: 134 additions & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ <h4 class="panel-title">
<th width="20%">Operation Time (Seconds)</th>
<th>Actions
<div id="action_shutters" class="table-action">
<a class="save saveShutters" title="Add" data-toggle="tooltip"><i class="glyphicon glyphicon-floppy-save"></i></a>
<a class="save saveShutters" title="Add" data-toggle="tooltip"><i class="glyphicon glyphicon-floppy-save"></i></a>
<a class="edit editShutters" title="Edit" data-toggle="tooltip"><i class="glyphicon glyphicon-pencil"></i></a>
<a class="delete" title="Delete" data-toggle="modal" data-target="#confirm-delete"><i class="glyphicon glyphicon-trash"></i></a>
<a class="program programShutters" title="Program" data-toggle="tooltip"><i class="glyphicon glyphicon-record"></i></a>
<a class="program configureShutters" title="Configure" data-toggle="tooltip"><i class="glyphicon glyphicon-wrench"></i></a>
</div>
</th>
</tr>
Expand Down Expand Up @@ -316,6 +317,138 @@ <h4>Time to program your new shutter...</h4>
</div>
</div>
</div>
<div class="modal fade" id="configure-shutter" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
<div class="modal-dialog modal-lg vertical-align-center">
<div class="modal-content">
<div class="modal-header">
<h4 class="panel-title">
Step-by-Step guides for seting up your shutters
</h4>
</div>
<div class="modal-body">
<div class="panel-group" id="configAccordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#configInitialSetup">
<span class="glyphicon glyphicon-wrench"></span>Initial Setup
</a>
</h4>
</div>
<div id="configInitialSetup" class="panel-collapse collapse">
<div class="panel-body nonscroll">
Note: This process only works for unconfigured shutters in factory reset state. To perform a full factory reset (de-registers all remotes and reset all limits), hold down the reset button on the shutter until it jogs 3 times.
<ol>
<li>Press <button type="button" class="btn press-button-up-down-long"><i class="glyphicon glyphicon-pencil"></i></button> to bind the shutter to this virtual remote.</li>
<li>Use the <button type="button" class="btn press-button-up-short"><i class="glyphicon glyphicon-arrow-up"></i></button> and <button type="button" class="btn press-button-down-short"><i class="glyphicon glyphicon-arrow-down"></i></button> to confirm the shutter moves in the correct direction.
If the shutter moves in the wrong direction, click
<button type="button" class="btn press-button-stop-long"><i class="glyphicon glyphicon-sort"></i></button> and try again.
</li>
<li>Use <button type="button" class="btn press-button-up-short"><i class="glyphicon glyphicon-arrow-up"></i></button> and
<button type="button" class="btn press-button-down-short"><i class="glyphicon glyphicon-arrow-down"></i></button> to choose the upper limit position of the shutter.
</li>
<li>
When you are happy with the upper limit, click <button type="button" class="btn press-button-down-stop-short"><i class="glyphicon glyphicon-circle-arrow-down"></i></button>.
The shutter will begin to move down towards the lower limit.
</li>
<li>When the shutter reaches your desired lower limit press <button type="button" class="btn press-button-stop-short"><i class="glyphicon glyphicon-stop"></i></button>.
</li>
<li>Use <button type="button" class="btn press-button-up-short"><i class="glyphicon glyphicon-arrow-up"></i></button> and
<button type="button" class="btn press-button-down-short"><i class="glyphicon glyphicon-arrow-down"></i></button> to adjust the lower limit of the shutter to the desired position.
</li>
<li>When you are happy with the lower limit, click
<button type="button" class="btn press-button-up-stop-short"><i class="glyphicon glyphicon-circle-arrow-up"></i></button>.
The shutter will now return to the upper limit and stop.
</li>
<li>If you are unhappy with the limits, go back to step 3. Now, confirm your limit selection to save the limits:
<button type="button" class="btn press-button-stop-long"><i class="glyphicon glyphicon-saved"></i></button>
</li>
<li>Exit programming mode by clicking <button type="button" class="btn press-button-prog-long"><i class="glyphicon glyphicon-saved"></i></button>. Note: Some Somfy models will not respond to this command, but should now operate normally.
</li>
</ol>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#configLimits">
<span class="glyphicon glyphicon-sort-by-attributes"></span>Adjust Shutter Limits
</a>
</h4>
</div>
<div id="configLimits" class="panel-collapse collapse">
<div class="panel-body nonscroll">
<ol>
<li>First, move the shutter to the limit you want to adjust:
<button type="button" class="btn press-button-up-short"><i class="glyphicon glyphicon-arrow-up"></i></button>
<button type="button" class="btn press-button-down-short"><i class="glyphicon glyphicon-arrow-down"></i></button>.
</li>
<li>Once stopped at the limit, press <button type="button" class="btn press-button-up-down-long"><i class="glyphicon glyphicon-pencil"></i></button> to enter edit mode.
</li>
<li>Use <button type="button" class="btn press-button-up-short"><i class="glyphicon glyphicon-arrow-up"></i></button> and
<button type="button" class="btn press-button-down-short"><i class="glyphicon glyphicon-arrow-down"></i></button> to adjust the limit position of the shutter.
</li>
<li>Save the new limit position by clicking <button type="button" class="btn press-button-stop-long"><i class="glyphicon glyphicon-saved"></i></button>.
</li>
<li>To abort the procedure, wait two minutes. The shutter will jog, and the limits will be unchanged.</li>
</ol>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#configMyPosition">
<span class="glyphicon glyphicon-screenshot"></span>Setting the "My" Position
</a>
</h4>
</div>
<div id="configMyPosition" class="panel-collapse collapse">
<div class="panel-body nonscroll">
<ol>
<li>Move the shutter to the position you want to save:
<button type="button" class="btn press-button-up-short"><i class="glyphicon glyphicon-arrow-up"></i></button>
<button type="button" class="btn press-button-down-short"><i class="glyphicon glyphicon-arrow-down"></i></button>
<button type="button" class="btn press-button-stop-short"><i class="glyphicon glyphicon-stop"></i></button>.
</li>
<li>Press <button type="button" class="btn press-button-stop-long"><i class="glyphicon glyphicon-floppy-save"></i></button> to save the My position.
</li>
<li>Hint: You can return to the My position by pressing the Stop button when the shutter is not in motion.
</li>
</ol>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#configClearMy">
<span class="glyphicon glyphicon-remove-circle"></span>Clearing the "My" Position
</a>
</h4>
</div>
<div id="configClearMy" class="panel-collapse collapse">
<div class="panel-body nonscroll">
<ol>
<li>Move the shutter to the My position: <button type="button" class="btn press-button-stop-short"><i class="glyphicon glyphicon-screenshot"></i></button>.
</li>
<li>Press <button type="button" class="btn press-button-stop-long"><i class="glyphicon glyphicon-floppy-save"></i></button> to clear the My position.
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div style="clear: right;" class="modal-footer">
<button type="button" class="btn btn-success" id="configure-shutter-done" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
</div>
</body>
</script>
</html>
Loading