This is the first time I install Shelly mqtt, please bear with me
I installed shelly mqtt plugin and MQTT client gateway on my ubuntu server. Also, I set two hardware entries in Domoticz one for the shelly mqtt and another for MQTT client gateway. They are running.
However Domoticz discovered three devices for the same shelly 1 as indicated below and only one of them "garage light" is working. What did I do wrong? My ultimate goal is to have Alexa to discover the "garage light" via Domoticz Bridge. Alexa was able to discover all the dummy switches on domoticz, but not these mqtt devices.
Shelly mqtt
Moderator: leecollings
-
- Posts: 41
- Joined: Saturday 15 April 2017 20:04
- Target OS: Linux
- Domoticz version: 2020.2
- Location: USA
- Contact:
Re: Shelly mqtt
OK, I found one of my problems, you cannot install both shelly mqtt and mqtt gateway in the hardware section of Domoticz. When I stopped the Mqtt gateway, the two devices have disappeared.
Nevertheless, I am still not able to update that mqtt device in Alexa via domoticz bridge.
Nevertheless, I am still not able to update that mqtt device in Alexa via domoticz bridge.
-
- Posts: 99
- Joined: Friday 25 January 2019 11:33
- Target OS: Linux
- Domoticz version: beta
- Location: Poland
- Contact:
Re: Shelly mqtt
You can install the shelly mqtt and mqtt gates in the hardware section of Domoticz at the same time, both can work side by side.
Idx 24 and 25 are Input and cannot be controlled. They give the input state when it changes.
to use them in shelly the button must be a separate switch.
Button Type -- Detached Switch
Idx 24 and 25 are Input and cannot be controlled. They give the input state when it changes.
to use them in shelly the button must be a separate switch.
Button Type -- Detached Switch
-
- Posts: 41
- Joined: Saturday 15 April 2017 20:04
- Target OS: Linux
- Domoticz version: 2020.2
- Location: USA
- Contact:
Re: Shelly mqtt
Thank you so much @besix. Now I get it. Can't set that button type, so I just have to forego that status.
Got the domotize bridge working for Alexa after read and run tests with this:
https://da-bridge.tarthorst.net/
I hate to open port 80 or 443 with my ddns for alexa. Nevertheless, its an eval I cannot avoid.
Got the domotize bridge working for Alexa after read and run tests with this:
https://da-bridge.tarthorst.net/
I hate to open port 80 or 443 with my ddns for alexa. Nevertheless, its an eval I cannot avoid.
-
- Posts: 41
- Joined: Saturday 15 April 2017 20:04
- Target OS: Linux
- Domoticz version: 2020.2
- Location: USA
- Contact:
Re: Shelly mqtt
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.
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.
Who is online
Users browsing this forum: No registered users and 0 guests