Announcement

Collapse
No announcement yet.

MQTT crashes and restarts when topic received

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael McSharry
    replied
    The eWeLink firmware must be very small for as little as it does inside the ESP microprocessor. Look at how may different type of interfaces that are supported in a single Tasmota image. No single product needs all of these. In past years the devices had 512K program memory and now they are 1M or 4M. The only notes I have seen in Tasmota about limitations relates to SSL support not fitting so one needs to give up something if they want SSL.

    It is more of a business decision as to who their target market is and the complexity they want to support.

    Leave a comment:


  • Timon
    replied
    Although playing round with devices is fun and I like to do it I also want to see more devices that support standards as well as their own private protocols. That's why I like Shelly as they support MQTT out of the box where SonOff doesn't. The problem with Shelly is only a few products are available in the US.

    I have the same issue with many manufactures not supporting MQTT so the devices can still communicate even when the Internet is down. Some of the manufactures I'm pushing are Liftmaster, Ubiquities UniFi line, Ring especially the Ring Alarm. If they were to add MQTT it would be great but I'm not holding my breath.

    BTW, I suspect that Sonoff likely doesn't have room on their processor to hold both what they are normally running and MQTT which is too bad. Can you confirm that?

    Leave a comment:


  • Pete
    replied
    Looked at the Shelly product list...nice stuff...what is it that you like about them John? Noticed too their main offices are in Sofia, Bulgaria.

    Here configuring multiple micro routers for the WiFi devices network and there is a scanning option (Espurna) which picks the AP based on signal strength.

    Cold reset on the Espurna firmware is just holding the button down for 10 seconds which brings you back to AP mode and reconfiguring everything.

    With Tasmota and Espurna you can save and reload your old configuration once you have access.

    Leave a comment:


  • Michael McSharry
    replied
    If you put Tasmota on them and the device has some form of control button then four quick clicks puts it into AP mode. https://github.com/arendst/Sonoff-Ta...i/Button-usage

    Leave a comment:


  • Timon
    replied
    The only Shelly devices we can't use are the ones that plugin since they are not in the US plug format. Not 100%sure about the light bulb although it does have an Edison base and show it works from 120 to 240VAC. The main problem is only a few of the devices seem to be available in the US.

    So if you make any network changes, such as WiFi passwords, you have to re-flash or can you just press the config button and get back to the WiFi setup menu?

    Here comes the RAIN again. At least we don't have snow in SoCal.

    Leave a comment:


  • Michael McSharry
    replied
    Once Tasmota or ESPurna has been loaded they retain your setup. Only the executable changes on a firmware upload. This means there is no need to go into AP mode. If you toggle between the two you will need to do that because settings are stored in different places.

    If your intention is to embed Tasmota/Espurna in the junction box where an existing switch is located then Shelly is your best option. It is small and designed for this purpose. Makes no difference if Europe or USA.

    Leave a comment:


  • Timon
    replied
    Originally posted by Michael McSharry View Post
    The only one I know that comes with MQTT from the factory is Shelly https://shelly-api-docs.shelly.cloud/#settings-login. They make it convenient to reflash with other firmware too.

    The factory firmware in most Sonoff devices, and likely others, provides a WiFi method to update firmware. The program SonOTA.exe https://github.com/mirko/SonOTA/releases implements the protocol used by Sonoff/eWeLink to allow update of alternate firmware vs. the latest version from the factory. There was a short period of time last year where Sonoff version 1.6 was shipped and it broke this update. Version 1.5 and now version 2.x continue to support it.

    The problem spot for many on SonOTA.exe is that they forget to disable fully all their firewalls and the update fails in its final stage in this case. There are YouTube videos on flashing with SonOTA.exe.

    eWeLink is never used when flashing alternate firmware. If I remember correctly, a factory Sonoff will setup its own SSID and expect the smartphone or similar device to connect to this network. The next step is then use a browser to tell the Sonoff what your network SSID and password is so it configures itself to use this SSID rather than its own. Rather than a browser it may be eWeLink that is used to configure the Sonoff. Again, this is normal use of Sonoff and not the approach to flashing new firmware.
    Shelly seems to be mainly for Europe although some of the modules can be used here. I'll keep them in mind.

    I think I'm generally clear but let me make sure.
    • You can update the device firmware via WiFi as well as using a flashing cable. So the Tasmota firmware could be initially be loaded that way.
    • You can put the devices into Access Point mode so the WiFi settings can be set.
    The one thing I'm not clear on is can both of those items still be done once in the same way the Tasmota firmware has been loaded and is there any change on how it's done?

    Leave a comment:


  • Pete
    replied
    Here switched over to using esptool.py to upload firmware or erase rom via Linux command line. Works 100% of the time via JTAG.

    Easy install...
    pip install esptool

    esptool.py --port [serial-port-of-ESP8266] write_flash -fm [mode] -fs [size] 0x00000 [nodemcu-firmware] .bin

    For using Espurna firmware you just upload the firmware bin. Reboot. The device comes up in AP mode and not configured.

    I program the WiFi device while still plugged in to the USB port via 5VDC.

    Leave a comment:


  • Michael McSharry
    replied
    You need to JTAG initially to upload the firmware and from there it is a plug n play configuration all via the web browser interface and you can configure the device to have a static IP
    I have toggled back and forth between ESPurna and Tasmota using the OTA capability of both. One should be able to start with SonOTA.exe with a factory device to load a simple Tasmota and then use Tasmota/ESPurna OTA to load whatever version one wants.

    I do admit that JTAG is faster for me and sometimes I have difficulty with SonOTA.

    Leave a comment:


  • Pete
    replied
    Here went to using Espurna firmware on my modded SonOff WiFi basics and MagicHome Controllers. You need to JTAG initially to upload the firmware and from there it is a plug n play configuration all via the web browser interface and you can configure the device to have a static IP.ith

    Been tinkering here with Home Assistant,, Domoticz, Smarthings et al. That and continues to play well with mcsMQTT.

    I do use smartphones (tinker, root and cook smartphones) and only remote control used is via VPN on the smart phone. No remote smartphone cloud connections used today. Actually do not really utilize any smartphone automation and remote based in the cloud (probably never will). Hoping that a linux based smartphone comes to being.

    Click image for larger version  Name:	1-wire.jpg Views:	1 Size:	57.2 KB ID:	1283372

    Click image for larger version  Name:	espurna.jpg Views:	1 Size:	73.0 KB ID:	1283371

    The modded MagicHome controller pictured is using Espurna plus a hardware add of a digital pot which turns on and off the device plus is a brightness controller. Here using the device for the kitchen counter single color LED lamps.

    Click image for larger version  Name:	MagicHome.jpg Views:	1 Size:	87.8 KB ID:	1283382

    Leave a comment:


  • Michael McSharry
    replied
    The only one I know that comes with MQTT from the factory is Shelly https://shelly-api-docs.shelly.cloud/#settings-login. They make it convenient to reflash with other firmware too.

    The factory firmware in most Sonoff devices, and likely others, provides a WiFi method to update firmware. The program SonOTA.exe https://github.com/mirko/SonOTA/releases implements the protocol used by Sonoff/eWeLink to allow update of alternate firmware vs. the latest version from the factory. There was a short period of time last year where Sonoff version 1.6 was shipped and it broke this update. Version 1.5 and now version 2.x continue to support it.

    The problem spot for many on SonOTA.exe is that they forget to disable fully all their firewalls and the update fails in its final stage in this case. There are YouTube videos on flashing with SonOTA.exe.

    eWeLink is never used when flashing alternate firmware. If I remember correctly, a factory Sonoff will setup its own SSID and expect the smartphone or similar device to connect to this network. The next step is then use a browser to tell the Sonoff what your network SSID and password is so it configures itself to use this SSID rather than its own. Rather than a browser it may be eWeLink that is used to configure the Sonoff. Again, this is normal use of Sonoff and not the approach to flashing new firmware.

    Leave a comment:


  • Timon
    replied
    I realized that I missed one way to setup WiFi devices without the need to flash or use BlueTooth. That's by having a way to force the device to disconnect from the local WiFi network, if it's connected, then connect to a device by looking to a specific name. It's basically the way that many dash cams have you connect to them.

    So, when one flashes devices with the Tasmota software can you still use this method to connect and configure them? Do you use the eWeLink software or something else? If this information is here on the forums please point me to it.

    Also, has any of the manufactures ever been contacted about including MQTT in their products since it is an approved IoT communication protocol?

    Leave a comment:


  • Pete
    replied
    I use Linux desktops these days and SFTP in the explorer window and whatever DB editor is out there in internetlandia ...works well..rarely edit Homeseer DB's these days.

    Leave a comment:


  • Michael McSharry
    replied
    I do my own work on Windows and WINSCP the files to-from Linux machines. It is more like working with excel than with Access or other database. They made a nice UI for the novice that only needs minor edits.

    Leave a comment:


  • Timon
    replied
    Originally posted by Michael McSharry View Post
    Wildcard is now supported in the Action triggers so +/NUC8i3 would trigger on either of the topics. I had not thought of allowing multiple topics map into the same HS device. It is something I can look into.

    At this time the two approaches. The first is what you know. The second is by edit of /data/mcsMQTT.db when mcsMQTT is not running. DB Browser for SQLite is what I use as it is quite intuitive. You would edit the Source column of a row to change the subscription topic. You could also use SQL expressions directly on the database to do mass edits. The database is just a file so easy to backup and restore.
    Yuck, I hate editing databases. I'd always rather have an edit button, with warnings, for editing the topics. However it is what it is and I'll work with it.

    Is DB Browser already loaded someplace and if not where does one get it?

    Found the site. I assume I could load the browser on another system and edit a copy of the mcsMQTT.db file then put it back?

    Leave a comment:

Working...
X