Hello everyone, with this board you can use Ascom Switch and Ascom Dome via Wifi!
Each two devices are recognized form ascom aplacha, no usb connectio or driver are needed to work!
Switch can be ON/OFF or PWM!!!!
The switch are already tested with N.I.N.A! Dome is already tested with Ascom device hub, Nina and Starkeepper Voyager Software
It's a work in progess, but it's already tested with great stability!
WiFi Manager for first connection. Automatic reconnection in case of disconnection (hoping for a router restart) Ota Update to update the firmware without any cables.
Actually Ascom Dome function is tested with:
My dome is R.O.R rolling roof, I used a gate motor, so I use just two output and two input:
The start signal is HIGH until I will not lost the acutal position sensor.
Actually Ascom Switch function is tested with:
16 Switch can be configurated as output or input, pwm signal or analog input. PWN singals are automatically setted up with a range from 0 to 8192.
Error sended to ascom alpaca:
The software was made with Arduino IDE and ported subsequently to Platformio for better management Version 1.2 requred I/O config form the firmware, with version 2.0 you need to download the firmware only the first time!
💥 3.0.0 - BREACKING NEWS! Now switch, calibrator and dome are module, if you don't plan to use it, you can disable it!, the web page and the discovery will hide it for you. Also pin validation during the setup is better now
💥 2.0.0 - BREACKING NEWS! Now all the board can be setupped by the browser. Dome I/O and Switch setting is now editable from the browser and you can save the confi files. Before update write in a memo all your setting.
What's new in version 3.0.0?
Auto Close Dome if anyone is talking with the board (browser or ascom alpacha driver) it's ok Switch, Cover Calbirator, and Dome are modular now. If you don't use you can comment the respective row at the beginning of the main.cpp:
#define DOME
#define SWITCH
#define COVERC
You don't use the dome?
\\#define DOME
#define SWITCH
#define COVERC
What's new in version 2.0.0?
Web pages run now alpine.js and all the js under the hood is rewrited in a modern way. Now Dome and switch are in the same page, olso settings now are in the same page! New dome function: Auto Close if anyone is talking with the board (browser or ascom alpacha driver) [IS UNDER DEVELOPMENT], you can enable or disable this featur by browser setup page.
Knowed browser bugs:
This folder contain a vite project with web browser pages, in this way I can have a clean and powerfull css by Taliwind 3.
First of all we need to install Visual Studio Code and add Platformio extension.
Download Visual Studio Code from: https://code.visualstudio.com/
Install it.
One installation is finish, Go to Extension and search Platformio, then install it.
And wait until restart vs code is needed:
At this point, download the software from this page, go up click on Code and click on Download Zip
Extact the folder where you want, BE CAREFUL, don't extract the files inside the folder! extract directly the folder!
Go to VsCode and click on the Platformio Icon, click on Pick a Folder and select the extracted folder
At this point wait platformio will download all the necessary things needed to make the board work:
Once is finish on the right you will have this menu:
Click build and wait until you will not have this message:
Now we are ready to upload the firmware!
If it is your first time connecting an esp32 to the pc you need to install serial driver depending on your bard serial chip:
CH340 driver: https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all (download at the buttom of the page) CP210x driver: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
(check the video on the CH340 page to see wich COM port is used by your device)
Connect your esp32 board to a usb port On the menu we seen before we need to click:
Upload Filesystem Image
After some while the board will rebot.
Now we need to click on Upload
Wait for success printed out.
If is your first time setup, you need to connct the board to your wifi, don't check into the code, the board will manage everything for you! Open your WiFi and you will have TeslaBoard wifi, connect to him
Open a brwoser and type http://192.168.4.1, once the portal is ready click on Configure Wifi
Click on your WiFi, type the password and click on save
In few seconds the board will be up and running, go to your route setting and check the board IP. From this moment, the board will try yo connect everytime to your wifi without asking nothing.
First of all we need to install the last Ascom platform (version 6 or higher) from here: https://ascom-standards.org/Downloads/Index.htm
Not every software as ex. NINA, open the Ascom Device Selector, and the board cannot be founded, in this case we need to crate a new ascom dynamic driver:
Open ASCOM Diagnostic:
Click on Choose Device>Choose device to connect:
Select the device type:
This operation is needed for each device Dome,Switch,Cover Calibrator (you can skip the device you are not planning to use.
Click on Alpaca and then Enable Discovery
Once is green, open the list and you will see New Device:
Open the setting menu, and check the Manage conncetion as well:
Click OK and then OK again.
The board is ready to use! Go to your software (in my case N.I.N.A) and the device will appear:
To acces to the Board page, type on your browser the IP of the board.
From here we can see the state of our Dome cover and you can send Open Close or Halt commands.
From here you can see the state of the switches and command it, for Input switch you cannot send any commands. For Output you can set ON/OFF state For PWM Output you can slide to the desired value.
Pin Start is the pin used to give the start to the motor Pin Halt is used to stop the motor
Pin Shutter Open should be ON when the shutter is Open Pin Shutter Close should be ON when the shutter is Closed
The board does not allow having both inputs active.
Enable closing in case of missing connection - If selected the shutter will be closed in ascom don't talk with the board within xxx minutes (computer crash safety) not developed yet
Save you store the configuration on the board Download Configurazione - you can download the Dome configuration for backup.
Here you can setup all the Pin you want to use (MAX 16)
You can give a name and a description (max lenght 32)
You can choose the type of the switch (Input, Output, PWM or analog input)
According to the esp32 datashet be sure of wich pin you want to use or you can you can run into problems, any valditation rules are developed for the moment! Read this article: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ If you need a PCB you can use a mine one: https://github.com/StefanoTesla/esp32-kraken as you can see the pin signed with S are Safe to use, and with the I the Imput only pin. From pin 16 to 33 are safe to use, pin 34 35 36 and 39 are input only. Don't set pin from 6 to 11, you will brick the board! All the PWN singals are automatically setted up with a range from 0 to 8192.
Save to store modification. **If you change the pin number or type, it will not work until a board reboot.++
Save config file to have a configuration backup
Only if you have download the firmware from the usb port, you are able to upload the firmware via wifi
To do this from your browser you can go on http://your.ip.add.ress/update
You can choose if you want to upload a new firmware or filesystem, the difference is: firmware change only the software, filesystem write webpages and configuration files.
From setup page download each configuration files. Go to the project folder and open the folder data
Paste here your configuration files and override the existing one.
Open the project with platformio and click in the right menu on build
Now open your browser and go to http://your.ip.add.ress/update choose firmware
And select the file firmware.bin that you can find in yourProjectFolder/.pio/build/esp32doit-devkit-v1
Read "Use of a backup of your configuration files
Open the project with platformio and click in the right menu on Build Filesystem Image
Now open your browser and go to http://your.ip.add.ress/update choose filesystem
And select the file spiffs.bin file that you can find in yourProjectFolder/.pio/build/esp32doit-devkit-v1