-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudMQTT and Direct Operation #2
Comments
Hi,
WiFiManagerParameter custom_mqtt_server("mqtt-server", "MQTT Broker IP", "m21.cloudmqtt.com", STRUCT_CHAR_ARRAY_SIZE, "disabled"); with your broker's IP address
and the lines 67 and 71, with the CN and the fingerprint of your broker's certificate: // TLS support, make sure to edit the fingerprint and the broker address if
// you are not using CloudMQTT
#define TLS
#ifdef TLS
const char* broker = "m21.cloudmqtt.com";
// SHA1 fingerprint of the certificate
// openssl x509 -fingerprint -in <certificate>.crt
const char* fingerprint = "A5 02 FF 13 99 9F 8B 39 8E F1 83 4F 11 23 65 0B 32 36 FC 07";
#endif I'll modify the sketch to work without an active Wi-Fi connection. Sam |
Thank you so much, bro. If not too much to ask, can you implement the input settings of MQTT topics too when we are setting up the network and entering the MQTT username, password, broker IP address and broker port. So we can setup everything on the web configuration portal. Another question is when I long press the button, reset the relay or all the configurations to default? Thanks so much again |
Find another problem (rsrs), there is no auto reconnect function. When I turn restart my router and not restart sonoff, it calls the wifi manager again, to set another wireless credentials. |
Implemented now.
6-7 seconds. If the LED doesn't blink, unplug/plug the Sonoff from power.
The module will restart now if no IP address is assigned to it. It's not easy to test if the module is connected to the internet. My Wi-Fi is always on. void reconnect() {
// test if the module has an IP address
// if not, restart the module
if (WiFi.status() != WL_CONNECTED) {
DEBUG_PRINTLN(F("ERROR: The module isn't connected to the internet"));
restart();
}
... |
Man, you are the best. Really, the best. I will try when I get home. I don't know how to implement functions because I'm new on this. Thanks for help me. If I found another thing, I will tell you for sure. Rsrs |
Did you did this "I'll modify the sketch to work without an active Wi-Fi connection."? |
Not yet. It's complicated because I use the WiFiManager library and if the connection to the router isn't successful, the module restarts. I control it only with MQTT and Home Assistant and I'll probably not implement this feature. Alternative firmwares: |
I understand. I use MQTT and Home Assistant too, but I need to implement this because if my router gets dead, for example, I can't ativate the relay and my house will stay in dark, if it's night. I use sonoff as my light switch. I will study on this, I really like your firmware. Thanks Man. |
newbies here, how to get the fingerprint ? |
if you have the public certificate, just use the following command :
https://knowledge.symantec.com/support/identity-protection-support/index?page=content&id=SO28771&actp=RSS&viewlocale=en_US |
How to assign different Fingerprints for each sonoff (with tasmota fw) device to connect CloudMqtt? For secure connection, each device has a particular Fingerprint. |
I don't want to use CloudMQTT and I dont know what I need to change to set my raspberry ip as local broker. When I'm setting up the wifi credentials, the space for ip broker are defined as CloudMQTT and I can't change it.
Another problem is when I reset the Sonoff, I can't do direct relay operation through on board button without setting up the wifi credentials first. Thats bad because I cant operate the sonoff if I don't have wireless in home, at least for instance.
If I'm saying shit, sorry for my ignorance on this theme.
The text was updated successfully, but these errors were encountered: