Updated Configuring the Software (markdown)

rstrouse 2023-01-22 14:30:36 -08:00
parent 8f6f28cd12
commit c3c119a6e2

@ -3,4 +3,107 @@ From here on out we just need to get the shades talking to the ESPSomfy RTS devi
# 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.
Select your WiFi network from the list, enter the passphrase and hit save. This will disconnect the ESP32 from its own network and connect it to your WiFi network. From here on out you can access it by navigating to `http://ESPSomfyRTS.local` on your local WiFi network. That is until you change the host name and it will then start to use `http://<your hostname>.local`. This allows you to have several ESPSomfy RTS modules on your network at the same time each with thier own name. You probably only need this if you have more than 32 shades to control or the radio is encased in Kryptonite, or it is located on another planet, or has a magic spell of protection on it. It should also show up in your Windows networking list as the module has SSDP and mDNS built in. This is here so I can use discovery on Home Assistant later but it is nice to just see it in Windows Explorer.
Select your WiFi network from the list, enter the passphrase and hit save.
![image](https://user-images.githubusercontent.com/47839015/213939084-b97ca744-f0f8-464e-bc95-60c5596f585c.png)
While you are here also click on the General tab an 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.
You will need to disconnect from the wifi network after you have provided your credentials to see the device on your local network. This will disconnect the ESP32 from its own network and connect it to your WiFi network.
From here on out you can access it by navigating to `http://ESPSomfyRTS.local` on your local WiFi network. That is until you change the host name and it will then start to use `http://<your hostname>.local`. This allows you to have several ESPSomfy RTS modules on your network at the same time each with thier own name.
You probably only need this if you have more than 32 shades to control, or the radio is encased in Kryptonite diminishing the signal, or it is located on another planet, or has a magic spell of protection on it. It should also show up in your Windows networking list as the module has SSDP and mDNS built in. Lots of unlikely or's just had to be listed.
# 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.
![image](https://user-images.githubusercontent.com/47839015/213939595-9cb1afa1-66b9-473f-a78e-0f295fdcd9d1.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.
![image](https://user-images.githubusercontent.com/47839015/213939940-5595636f-18bd-4cee-834e-c45a3666efb1.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.
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.
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.
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. Unless you are having issues with competing signals or you want to reduce the range then leave these at 812.5kHz and 47.6kHz respectively. If you are a radio head and not just somebody who has listened to the band on occasion then these settings should be familiar. The base frequency for the radio is already tuned to 433.42mHz carrier frequency.
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.
Once you are satisfied with your settings press the Save Radio button then press done. We can now set up our shades
# 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 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.
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.
* **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.
![image](https://user-images.githubusercontent.com/47839015/213940348-8552d3da-0798-4034-bcce-39d86c0d53b8.png)
You must provide up to 20 characters for the name of the shade. The Remote Address is expected to be unique for all known addresses and the default is generated from the MAC address of your ESP32. This can be any value so long as it is unique. Change it at will but did I mention that it must be unique and the algortithm to calculate a new address only makes sure the address is unique among all the addresses that the ESPSomfy RTS module already knows about.
Remote addresses are 24-bits long and are assigned at the factory. So unless you have very old remotes you can probably safely assign these to some lower number if you want. 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 it takes 10 seconds = 10000 milliseconds.
So 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.
Once you are satisfied with your settings press the `Add Shade` button. This will change the screen to include more button functions. You can either perform these processes now or come back later to perform these functions once you have added all your shades.
* **Save Shade** - Saves the current settings for the shade
* **Pair Shade** - Allows you to pair the shade with the somfy motor
* **Link Remote** - Links the channel on your Somfy remote to the shade. This ensures the position of the shade can be known at all times. You can link up to 5 channels to each shade. Beyond that you probably need to simplify your life because you have remotes strewn everywhere. Honestly you should get checked.
## 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)
## 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.
On left side of the shade in the list there will be an edit pencil. You guessed it you should click on it to bring up the shade editor window. If you just added the shade and pressed the `Add Shade` button you should already be here.
Click the `Pair Shade` button to bring up the pairing screen. This will contain instructions on how to put the motor into pairing mode so you can proceed. After the motor jogs press the `Prog` button on the paring screen and the motor should once again jog to tell you it was successful. There is no communication from the motor to the remotes so I am relying on you to verify that the motor jogged after pressing the `Prog` button. If it didn't then don't say it did. You will have to go through the unpairing process if you aren't honest about it and try again.
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. So if the shade does not jog after sending the response 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)
## 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.
When this screen is open the controller is listening for any remote out there that is sending a command to the shade. Simply press any button on the remote you want to link. If you are having trouble deciding which button to press, press the up button. Once the remote is detected it will automatically close the link remote window as soon as it hears the remote.
![image](https://user-images.githubusercontent.com/47839015/213943798-b72f4528-5ddc-4450-9dd3-252a53dbff57.png)
To unlink an external remote from the shade simply click on the trash can icon from the linked remotes list.