Updated Configuring the Software (markdown)

rstrouse 2023-03-12 12:17:30 -07:00
parent 48193bc78e
commit 058a875b3f

@ -1,11 +1,11 @@
From here on out we just need to get the shades talking to the ESPSomfy RTS device. You will first connect the device to your local WiFi network then add the shades, pair them, and link the remotes.
# Initial WiFi Connection
When the software is first connected it will start its own ESPSomfy RTS wifi network. You will need to connect to this network so you provide the WiFi credentials for your network. So open your WiFi networks and connect to the unsecured network named `ESPSomfy RTS`. Once connected navigate to `http://192.168.4.1` and it will bring up the blank shades screen. Click on the gear icon at the upper right to open the configuration screen and select the WiFi tab.
When the software is first connected it will start its own ESPSomfy RTS wifi network. You will need to connect to this network so you provide the WiFi credentials for your network. So open your WiFi networks and connect to the unsecured network named `ESPSomfy RTS`. Once connected navigate to `http://192.168.4.1` and it will bring up the blank shades screen. Click on the gear icon at the upper right to open the configuration screen and select the WiFi tab. Initially, the transceiver will not be initialized until you enable it in a later step. This is to ensure you have the pin mappings set correctly.
Press the scan button and when the list returns, select your WiFi network, enter the passphrase and hit save. If you have one of the hardwired ethernet ESP32 devices you may select the Use Ethernet checkbox. See the section below on configuring ESPSomfy RTS to use a hardwired ethernet connection.
![image](https://user-images.githubusercontent.com/47839015/221746595-c694ea77-f2a4-4157-a377-0a7874f0f49e.png)
![image](https://user-images.githubusercontent.com/47839015/224563072-d15798f6-8be5-4b1c-b422-f0fb612eebe6.png)
While you are here, click on the General tab and provide a unique host name for the device. This will allow you to connect to it using the name of the device rather than the IP address. If you skip this step for now you will need to find the IP address of the device assigned by your router. You can also find it in the Network section of Windows Explorer as it will show up by default. Double clicking on it will bring up the Home Page.
@ -18,52 +18,63 @@ You probably only need this if you have more than 32 shades to control, or the r
# Using Hardwired Ehernet
ESPSomfy RTS supports hardwired Ethernet boards. If your board is not listed you will need to review the spec sheet for your board and apply the settings from this information. ESPSomfy RTS will also perform a fallback to a wireless connection should the Ethernet cable become disconnected that is if you have provided valid WiFi credentials in the WiFi section. ESPSomfy RTS will only enable one interface at a time since initial testing with both enabled, really slowed down performance.
Select your Board Type from the board type dropdown. If your board is not listed use a custom board type and ensure the documentation for the board matches the configuration. It is very important that the information related to the board is consistent with the manufacturer's settings. Incorrect settings for an Ethernet jack can destroy the board since the pins are not protected.
To use a board that has hardwired Ethernet click the `Use Ethernet` checkbox to enable the options for configuring your board. Then select your Board Type from the board type dropdown. If your board is not listed use a custom board type and ensure the documentation for the board matches the configuration. It is very important that the information related to the board is consistent with the manufacturer's settings. Incorrect settings for an Ethernet jack can destroy the board since the pins are not protected.
![image](https://user-images.githubusercontent.com/47839015/224562753-b616e89c-aae4-4c86-9f82-37c8152eb102.png)
# General Settings
Once the ESPSomfy RTS device has rebooted access the General tab. There are a few options here for the server. This includes the host name of your Somfy server as well as the time zone and whether the server should announce iself over Universal Plug & Play. If you have isolated the device on your network you can choose a timeserver that is local to your network. This will ensure time logs are in sync.
Once the ESPSomfy RTS device has rebooted access the General tab. There are a few options here for the server. This includes the host name of your Somfy server as well as the time zone and whether the server should announce iself over Universal Plug & Play. If you have isolated the device on your network you can choose a timeserver that is local to your network. This will ensure time logs and backups are in sync.
![image](https://user-images.githubusercontent.com/47839015/213939595-9cb1afa1-66b9-473f-a78e-0f295fdcd9d1.png)
![image](https://user-images.githubusercontent.com/47839015/224562892-e5f0fde2-5242-465e-bccc-9fa7c1a1a097.png)
# Set up the Transceiver
Hopefully you read the wiki on how to create the device and used all the default pins. I cannot for the world of me think of a reason for using any other pins than the ones defined. But if you did then you need to go into the Somfy Tab and click the `Configure Transceiver` button. Either way go there and confirm the settings by verifying them and pressing the Save Radio button. You will find more description regarding these settings below.
Initially, ESPSomfyRTS will start with the transceiver disabled. You will need to ensure the pin mappings match the wiring that you used when initially building your device. To set up and configure your transceiver navigate to the transceiver configuration screen. From the gears menu click the `Somfy` tab then click the `Configure Transceiver` button. A screen will appear with the transceiver options.
![image](https://user-images.githubusercontent.com/47839015/215382438-15a92a8a-6903-484a-8ded-b1109bf000ea.png)
![image](https://user-images.githubusercontent.com/47839015/224563489-a7dfa5c2-293a-4e39-be35-561c92080771.png)
First select the radio type. This software supports either the 56-BIT Somfy remotes or the 80-BIT Somfy remotes. It will not support both at the same time so maybe here is another reason for more than one ESPSomfy RTS module. Maybe at some point I will figure out a way to support both protocols at the same time but for now spen another 12 bucks and build another device if you need both. If you do not know which radio type you have select 56-BIT for now. If we cannot hear your existing remotes in a later step you can come back and change it.
First you need to select the radio type. If you do not know what type of motor radio you have it is likely a 56-BIT motor. Leave it here for now. Next review each of the pin selectors and set them to the proper pin assignment for your wiring. The screen will default to the default wiring from the hardware build but please double check to ensure these values match the way you wired the transceiver. If you used a wired Ethernet board these will most definitely not be correct.
I don't have any 80-bit devices so I hope I got the timing right. If you know you have 80-bit devices and it doesn't see your remotes then let me know and we can make the protocol adjustments.
After you have verified the pins, click the `Enable Radio` checkbox and then press the `Save Radio` button. ESPSomfy RTS will now enable the transceiver into receive mode so you can tune your radio. Once the radio has been enabled, the `Radio not Initialized` header will disappear from the screen. If the message does not disappear, then you likely have an issue with your pin selections.
While you were hooking up your hardware above you selected the ESP32 gpio pins that are to be used for the transceiver. You simply need to match these with the pins you selected. It will default to the configuration outlined above so at this point make sure your connections are correct. It will save you from denting a wall with your forehead.
## Tune your Transceiver
The default tuning parameters are most likely not the best settings for your transceiver. To start, first select the RX Bandwidth to 96.96kHz and the Frequency Deviation to 11.43kHz. You can use the arrows on your keyboard to fine tune the value. Then press the `Save Radio` button. Next, using a remote from about 3 feet away press one of the buttons. ESPSomfy RTS should pick up the signal and provide an RSSI (Received Signal Strength Indicator) value. This number is a measurement of how strong the signal is. The closer this value gets to 0 indicates a stronger received signal.
There are some radio configuration options supplied as well. These determine how well the software can hear your remotes and how loud it will speak when talking to your motors. The RX Bandwidth and Frequency Deviation focus on the receiving side of the transceiver. RX Bandwidth refers to how big the transceiver's ear is and the Frequency Deviation refers to how much noise it can filter out.
Each time you press a button it should increment the number next to the RSSI: label. Below is from a DSUN radio and this is the best I could get it to do at 3 feet. Bear in mind this has to do with many factors but if you are getting -60dBm consistently then it is still better than the reception on the motor. The range for Somfy remotes is not great. They use a PCB antenna and from my novice inspection, I could not find an amplifier circuit.
After some testing I have determined that a good tuning point is to set the RX bandwidth to 96.96kHz and the Frequency Deviation to 11.43kHz. This is a good starting point for tuning the receiver. At some point I may make this the default. If you are a radio head and not just somebody who has listened to the band on occasion then these settings should be familiar.
![image](https://user-images.githubusercontent.com/47839015/224564373-83b538a5-fb18-48c1-8090-e3eb533717fa.png)
The range on the Somfy Telis and Situo remotes are not great. But you can view the current RSSI readings from the remote on the configure radio screen. Each time you press a button on the remote it should increment the number next to the RSSI tag if it can hear the remote. With the setting above I get slightly better reception of the remote than the motor does.
This same configuration it an E07-M1101D transceiver was registering -32dBm on average.
The base frequency for the radio is already tuned to 433.42mHz carrier frequency.
![image](https://user-images.githubusercontent.com/47839015/224564695-b4df965d-b70b-49a3-8a5b-1ab1679ee6a1.png)
The TX Power determines how loud the transceiver shouts at the motors. You can leave this at 12dBm unless your transceiver is one of the ones that only support 10dBm. Either way this range is much further than the typical somfy remote.
Tuning the RSSI value requires moving the sliders to the left (more narrow) or the right (wider) to get the best reception. ESPSomfy RTS tunes the radio center point to 433.42mHz. The RX Bandwidth controls how much of the frequency is listened to so a narrower bandwidth filters out more noise but a wider bandwidth hears more. 97.96kHz gives me good range in my environment but your mileage can vary depending on what other interference is nearby.
Once you are satisfied with your settings press the Save Radio button then press done. We can now set up our shades
If you place the receiver on the top of a microwave (don't put that or small animals in there) then you will likely need to narrow the bandwidth as much as possible. As a suggestion don't do that and find a place for the radio away from interference and small animals.
The Frequency Deviation setting determines how much signal difference from low to high or high to low is required to trigger a data bit. The wider the deviation is, the stronger the signal must be. Conversely, when you set this more narrow, there is a greater likelihood of picking up distant noise. Setting this value to 11.92kHz initially seemed to have a good trade-off for me for noise and range.
I would be remiss if I didn't mention folks with a frequency analyzer for which I am not one. Hence the basic settings on the configuration page. If you are a radio head, and not just some dude who has listened to their music, open an issue or discussion so we can benefit from your findings.
The TX Power determines how loud the transceiver shouts at the motors. You can leave this at 10dBm unless your transceiver is one of the ones that support up to 12dBm. Either way this range is much further than the typical Somfy remote and at 10dBm you should be able to control the shades from a great distance. If only the Somfy remotes had better range -- sigh.
# Shade Setup
The ESPSomfy RTS device needs to know about the shades it is controlling and any external remotes that are used to control them. This will make sure that the shade positions are always in sync. Up is up and down is down and any position in between is a percentage of down.
The ESPSomfy RTS device supports a maximum of 32 shades, blinds, or draperies. So if you live in a glass house don't throw rocks make another device. You can also modify the code to increase the SOMFY_MAX_SHADES value but you will eventually run out of memory on the ESP32. So stop being so cheap and build another $12 device.
The maximum number of shades you can add on a single device is 32. So if you live in a glass house don't throw rocks make another device. You can also modify the code to increase the SOMFY_MAX_SHADES value but you will eventually run out of memory on the ESP32. So stop being so cheap and build another $12 device.
It needs a bit of information about each of one it is controlling as well as any other means of controlling them. This will ensure that the shade positions are always in sync. Up is up and down is down and any position in between is a percentage of down. So if you are used to the percentage of up translation from others, then get used to a percentage of down. No matter what position I am in, I cannot square a percentage of open in my mind. It doesn't work in my mind.
At this point it is probably beneficial to provide a little bit of a glossary.
* **Shade** - The physical Somfy motor that drives the covering.
* **Remote** - A physical device such as a Telis channel that is used to control the said motor. Keep in mind a Telis 4 is actually 5 remotes but who's counting.
* **Linked Remote** - A remote that is used to control a particular shade and the ESPSomfy RTS module knows about. ESPSomfy RTS needs to know about these so that if a button is pressed on an external remote it knows what the current position is of the shade.
* **Blind** - A window covering made up of slats with a single up/down motor and an optional tilt motor.
* **Shade** - A window covering that is made up of fabric with a single motor that drives the shade covering up or down. This term is also used as a generic term referring to a defined Shade, Blind, or Drapery in the ESPSomfy RTS software.
* **Remote** - A physical device such as a Telis or Situo channel that is used to control the said motor(s). Keep in mind a Telis 4 is actually 5 remotes but who's counting.
* **Linked Remote** - A remote that is used to control a particular motor that the ESPSomfy RTS module should know about. ESPSomfy RTS needs to know about these so that if a button is pressed on an external remote it knows what the current position is of the shade should be.
* **Pairing** - The process of linking the defined shade in this software so it can control the shade.
## Adding a Shade
To add a shade navigate to the Somfy tab and press the `Add Shade` button. This will open up the shade properties and allow you to enter the information about your shade. You can come back later and edit any of these values later but I caution editing the address after it has been paired. The rolling codes will get out of sync each time you try to command the shade will need to be re-paired to the motor.
To add a shade navigate to the Somfy tab and press the `Add Shade` button. This will open up the shade properties and allow you to enter the information about your shade. You can come back later and edit any of these values later but I caution editing the address after it has been paired. Once you pair the shade with the motor, the motor will store this address. If you change it later it will not know who it is.
![image](https://user-images.githubusercontent.com/47839015/213940348-8552d3da-0798-4034-bcce-39d86c0d53b8.png)
First select the type of Shade you are adding. This can be a Roller Shade, Blind, or Drapery. Roller shades and draperies do not support the optional tilt function. If your window covering has a tilt motor then you will need to use the blind type in order to support it. If you select Blind from the dropdown then a Has Tilt option will become available and the icon will change. If you check the Has Tilt option you can supply the tilt timing for that motor.
![image](https://user-images.githubusercontent.com/47839015/224567158-af02cc0d-07f8-4e36-a4af-24628eec0114.png)
You must provide up to 20 characters for the name of the shade. This can include any printable character.
@ -71,7 +82,7 @@ The Remote Address is expected to be unique for all known addresses and the defa
Remote addresses are 24-bits long and are assigned at the factory for Telis remotes. So unless you have very old remotes you can probably safely assign these to some lower number if you want but only before pairing. Did I mention that these need to be unique for all controller channels and remotes within earshot of the ESPSomfy RTS module.
The `Up Time` and `Down Time` fields are the number of milliseconds it takes for the shade to travel from the down position to the up position and vice versa. This value is provided in milliseconds so if you are counting the number of seconds and it takes 10 seconds to fully travel then this equals 10000 milliseconds.
The `Up Time`, `Down Time`, and optional `Tilt Time` fields are the number of milliseconds it takes for the shade to travel from the down position to the up position and vice versa. This value is provided in milliseconds so if you are counting the number of seconds and it takes 10 seconds to fully travel then this equals 10000 milliseconds. The maximum number of milliseconds is around 54 days so if you have a reaaaaaaaly slow motor you too are supported.
In another example, if it takes 9.5 seconds to go from full down to full up then that would be 9500 milliseconds. Keep in mind the up time and the down time can be different depending on the weight of the fabric and you can make adjustments these values at any time in the future. You will find this to be remarkably precise and always in sync if you set this up correctly. Burn a minute to time your shades and they will always be in sync.
@ -84,7 +95,7 @@ Once you are satisfied with your settings press the `Add Shade` button. This wi
## Editing a Shade
You can edit any shade that you have previously added by navigating to the Somfy tab under the config gears in the upper right. From the list of added shades simply click on the pencil to bring up the shade editing screen.
![image](https://user-images.githubusercontent.com/47839015/213940578-fa11f7aa-a4bc-47e3-915f-cec0caf27802.png)
![image](https://user-images.githubusercontent.com/47839015/224567457-79be110a-57b0-4bf7-b5db-15f59a616cdb.png)
## Pairing a Shade
In order to control the shade motor you must first pair it with the motor. This is not unlike how a Telis remote is paired with the motor and in fact it follows this procedure exactly.
@ -95,7 +106,7 @@ Click the `Pair Shade` button to bring up the pairing screen. This will contain
The pairing and unpairing process is essentially the same but in either instance Somfy does not provide any digital response that the pairing unpairing was successful. The only response is a visual one from the shade when it jogs. If the shade does not jog after pressing the prog button, simply perform the unpair process without putting the shade into paring mode with the external remote and try again. If you followed the procedure correctly this will just work. The range for the Somfy Controller is really, really far... over the hill and through the dell. Did I mention that I am impressed with the range?
![image](https://user-images.githubusercontent.com/47839015/213940820-da994598-2f88-4580-8312-ee1a7d8a406c.png)
![image](https://user-images.githubusercontent.com/47839015/224567606-a3cdf638-0f0b-4af6-8aa4-c911e865015a.png)
## Linking Remotes
Once you have paired the shades it is time to link the other remotes you use to open and close the shades. This linking process makes sure we capture every movement of the shade so that its position is always accurately reported. Now that you have been through the pairing process and saw how painless that was, click the `Link Remote` button to bring up the linking window.