Followup with my setting with Shelly 1 or 1PM, Domoticz, Domoticz Bridge with Alexa skill and shelly MQTT..... in Ubuntu, I believe PI will be the same.
I have everything configured and its working very well. In addition, I have IOS app Pilot also configured.
Unix mqtt broker installation and configuration
First, you need to install mosquitto/mqtt broker according to the OS of your system. Test out the service before proceed
Second, you need to add a uid and password file to the mosquito broker
Third, you need to change the mosquitto configuration file to activation the password
All these can be found in Youtube
https://www.youtube.com/watch?v=w7QhsFqBr30&t=2s
MQTT and Domoticz, assuming domoticz is installed on the server and is running
In Domoticz server, you need to install Shelly MQTT and MQTT gateway(optional, if shelly is the only thing you want to control) according to Wiki.
Check in the domoticz.sh to find out the HTTP and https port numbers. One of them must be either 80 for HTTP (not recommended and it is not Domoticz default - 8080) and 443 (Domoticz default) for https, because Alexa will need to access later on.
In Domoticz UI, you need to add "Website Protection" with uid and password, because you are about to open a common port(443 for https) to the outside. Then you add the shelly mqtt and mqtt gateway to the hardware section, if they are not already installed/enabled. When you configure shelly mqtt or mqtt gateway, you need to input the IP address, port number, uid and password for the mqtt servers.
DDNS
You need to have a DDNS configured by a DDNS service, I use ChangeIP service which is free. This is required for shelly mqtt to work.
Read
https://da-bridge.tarthorst.net/
Router
You need to add port forwarding for port 443 pointing to Domoticz server IP address
And if it is available, you need to setup a beacon in the router pointing to the DDNS service. Otherwise, install a beacon in your workstation as the DDNS service will provide.
Verify these all working with domoticz using a browser. You should test it in 4 ways:
HTTP:// domoticz IP: 8080(or in my case something different)
HTTP:// ddns: 8080(if 8080 is opened for port forwarding, not recommended)
HTTPs:// domoticz IP: 443
HTTPs:// ddns: 443 (to be used by Alexa skill - Domoticz Bridge)
Shelly
An example is here all the other shelly devices have similar UI
https://www.youtube.com/watch?v=MT7L7XVNuic&t=333s
Please note: you need to disable shelly cloud and configure shelly mqtt in the web UI, not in the app
Alexa app
You need to add domoticz bridge skill and enable it. But before you do, you need to read and TEST domoticz bridge connection according to this website
https://da-bridge.tarthorst.net/
If everything is working ok, you should have domoticz devices show up automatically in Alexa devices list and now you can control it via Alexa voice. I have mixed HTTP and mqtt devices in domoticz and they all working fine with Alexa
Pilot app
Somehow I cannot get the https port 443 working, perhaps I did not have SSL certificate installed. I was able to get it working with the HTTP port which I have been port forwarded for years. I have to add uid and password credentials because I did not have one before.
When everything is set and done, you need to reboot the Unix server to make those changes.
I cannot open/port forwarding port 80 on my ubuntu server, because other process is holding it. Therefore, port 443 is the only path I can install this process.