[RELEASE] Tasmota for HE - Auto-detecting Tasmota drivers + Tasmota firmware 7.x/8.x for HE (for use with Tuya, Sonoff and other ESP devices)

Yes, this is a newly added supported attribute. For you to see this you must have updated just the Parent driver. As you found out, updating the child device driver fixed it. :slight_smile:

Hi,

I'm currently moving all my IoT devices in their own Wifi network, so I deleted all my tasmota device before, moved them into the new network and it works for all but one, which will always throws errors:
2020-07-25 01:44:02.335 pm [error] java.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI on line 2871 (parse)
But it reports fine and I don't have a 2nd Device with the same ID and I also can't change the parent device.
I there a fix or do I have to redo that one device, since refresh or configure doesn't solve it, nor a reboot of the hub :slight_smile:

It is probably trying to change to use the MAC address as the ID, but some other device is using that MAC address. Are your devices on a different subnet than HE? If you want to keep using IP as the ID there is a setting for that in the Parent device.

Hi,
Currently the tasmotas are in a different network (10.10.10.0/24) than the hub, but that will also change. Setting the IP as the ID fixed it and they are fixed from DHCP.
Same MAC, unless you change them manually, shouldn't happen. I had it with all devices later on.

This would in most cases mean that as far as HE is concerned they all use the same MAC address. Routing MAC addresses between subnets is usually not done.

That would be how you need to do it when on different subnets.

@peterbrown77.pb In case you missed it, there's a specific child driver which convert a Tasmota child switch to a contact sensor in HE. Just install that child driver and change the driver of the child devices you want to have as a Contact sensor instead of as a Switch.

1 Like

Thanks @markus . I looked at using a virtual garage door control device that was changed by the tasmota switch through rules.. But I decided to stick with a switch for now. But good to know about being able to change it to a contact sensor through just a driver. May come in handy.

Finally got around to moving the remainder of my Teckin SP10s (total 17) over to my server hub running your latest driver and using hubconnect to take care of the rest.

No issue and works flawlessly.

Tomorrow I hope to start the update from Tasmota 8 to 8.3.1. Always something to do. Lol.

Thank you again @markus for the work done.

2 Likes

Thanks for writing this integration because it's exactly what I need to use my Sonoff 4CHR2(latest stock firmware version) relay for outdoor flood/safety lights.

I'm new to Hubitat and Tasmota and have never flashed any of these devices before.

I do currently have the relay connected to the ewelink app and controllable.

If I have this right, the next steps I need to follow to use in HE are:

  1. Flash 4CHR2 with Tasmota... And then reflash with Markus' firmware
  2. In HE, install the drivers and app from Markus HERE
  3. Enjoy

Does that sound correct?

So my question and where I'm at now is can I flash Over-The-Air(OTA)? I do not have a USB dongle with a header that I have seen in some videos. Can I just go from stock to Tasmota OTA?

Thanks all!

I did something stupid and flashed straight from OEM to tasmota-minimal, expecting it to work as I have previously used it to convert from normal Tasmota to the Hubitat builds.

Now I can see the device and connect to its wifi (which is oddly named ESP-BC368C, rather than Tasmota-xxx) and even get an IP number (192.168.4.2) from the device. Problem is that there are no open ports at all! Web interface is not there.

Have I killed the device (short of fitting a serial interface to it)?

You will need to use "tuya-convert" or something similar to get the initial firmware on.

I use an old Raspberry Pi 2 with a super cheap Wifi USB dongle to do this. There are many other approaches though, depending on your technical know-how and what you run for computers in your house.

Unfortunately not with that device, when it comes to Sonoff stock to Tasmota OTA is only possible with BASICR3,RFR3, MINI and D1 since these are the only models which support DIY mode.

When flashing over serial (which is very easy on your model once you get the USB-TTL dongle) you can go straight for my Tasmota-version, no need to use any others. That is a need when running Tuya Convert, which is not supported on Sonoff devices.

I remember there being a way to at least sometimes recover from this without going the serial flashing route. I'll have a look. The Minimal build is very dangerous to use when not already running Tasmota on the device, it almost always ends up in this way.

Not for Sonoff devices unfortunately.

EDIT:
@uptownruss There is a possible OTA solution I have never tried:

Hi @markus and thanks for your reply and suggestions. Yes, I actually tried Sonata before posting here. The issue is that it seems to no longer work with any newer firmwares and I fell into this category. I suspect anyone buying a unit now has a firmware newer than will work with it. Please see GitHub - mirko/SonOTA: Flashing Itead Sonoff devices with custom firmware via original OTA mechanism where it says: " ATTENTION: It appears SonOTA does not work with devices running current firmware"

...so it sounds like OTA is not an option for me and I am required to flash via a physical cable and dongle then... Bummer, but oh well. I was hoping to do this tonight but I'll have to get one.

It sounds like either of the below will work for me then, right?
https://www.amazon.com/dp/B07R8BQYW1/

  • I like that this is a single cable but I have to lookup on a piece of paper which wire is which... Blah, I don't like that.
  • Not a single cable but at least I can see which pins each wire goes to..lol. I think I'll go with this one.
  • Oh wait... This one has a jumper to change VCC from 3.3v to 5.0v... Do I need this selectable for flashing different devices?

I had to confirm this and as I suspected, when you get that AP mode, you're in the Arduino bootloader. It MIGHT be possible to use the Arduino OTA feature to port 50000 in order to get Tasmota flashed properly, but I have never done that and am not even sure where to begin searching for that.
The only other possible route (except USB-TTL) is finding the reset procedures for your device and try it that way. It could get you back into a working mode, it could also make it so that you don't even get to enter the Arduino bootloader again.

Looking at the reviews that one looks unreliable. It is also not clear if it can be set to run the serial connection with 3.3V instead of 5V. It has both as outputs, that doesn't mean it can be set to communicate using 3.3V.

Do remember you need something to easily keep the connection with the board. I don't know how the connectors look on your particular device, but for many device you either have to solder or come up with a way to hold the pins in place. Easiest to just hold pins is place is with something flexible (like pogo pins or something else similar).

In general all devices you will flash are 3.3V since they are based on the ESP8266 chip. It is however much easier to flash all devices if you can find one that can supply up to 500mA of power as well (very few do this). It makes for a simpler connect since you don't want to be running on mains power and connect the TTL at the same time. That can go badly. You can do it with the 500mA supply, but you may end up with weird transmission issues at times.

This one is probably the best choice of the 3.

Ah, excellent point and I wasn't thinking about that. It still seems the third dongle should work fine for this device at least. I haven't opened my unit, but this is a picture of the PCB I found while searching and it already has pins there:

Ahh...another interesting point. I have a usb power meter somewhere. I should test my USB2 and USB3 ports on my pc. Also, I can test my portable fast USB charger as well. ....unless you're saying the dongle itself may step down the power regardless of what's coming into it.

You're just full of good points for me to watch out for! Haha..thanks

1 Like

This device looks very easy as long as you have the female dupont connectors to connect with :slight_smile: Most devices are NOT this easy.

The normal USB spec is 500mA, so that is not the issue, the question is what the usb dongle delivers over 3.3V. What you get from the USB port is 5V. Before I found a USB-TTL dongle that could deliver 500mA I had to get my 3.3V power supply from another USB to 3.3V adapter connected to the same USB port (to ensure the ground was the same). This quickly became annoying. I've noticed most dongles don't even specify this. I can unfortunately not point you to the one I bought. I live in China. I think that if you buy the third one you linked to you will be fine with at least this device. Just don't connect it to mains while flashing :stuck_out_tongue:

Haha, yes I will be sure..always a good reminder though. 3rd dongle has been ordered..won't be here until Saturday. :package: :truck: :weary:

1 Like

I extended my portscan and 50000 was not open. I also connected the WiFi to my PC so that I could run more tests and the Arduino IDE is not finding the board at all.

I think that it is time for the serial approach, however, take a look at this main board... I don't even see anything that resembles a CPU!

All of the other devices that I have messed around with have had ESP modules on them, or ESP chips. Unless the module is built into the actual LED, I can't see how this works.

Then this bootloader probably doesn't have that feature.

This is the driver from AC to DC, the chip must be on a different board.