Tasmota over the ethernet wire?

1,539 views
Skip to first unread message

wro...@tirnet.de

unread,
Jan 8, 2019, 1:33:00 PM1/8/19
to SonoffUsers
I know that it might sound like blasphemia in those IoT days, but has anybody tried to use Tasmota over the wire?

WLAN is great, but may not always be the best solution.
If it comes to reliability and rough environents, wired connections may somtimes have advantages.
For many of my planned widgets, I'd prefer to place them at the end of an ethernet cable with some poor-man-PoE quirks instead of installing an AC plug and a transformator plug everywhere.
But nontheless I'd like the functionality of TASMOTA (MQTT, Sensor libs, logging, web, rules, timers...) and smooth integration in the system.
At best, the HA should not care if the widgets were wired or aired.

I searched this list for some commonly konwn culprits aka Ethernet controllers (ENC28j60 , W5100, KSZ8851SBL) known in the arduino ecosystem, but got no match.

I'll keep this in mind when I try my fist steps on PlatformIO now.
From earlier work with the ESP series, I think, for a wired solution, this wold not be the best choice.
The wireless stuff both in the ESP core and in the hardware may place significant obstacles on Ethernet implementation.
But PlatformIO promises easy integration, so why not try to build TASMOTA for STM32 or sth like that?

Did anybody try this yet, and maybe could even report some success?

Rolf Bakker

unread,
Jan 9, 2019, 12:59:28 AM1/9/19
to SonoffUsers
I was looking for something similar and bougth some of the 2ch and 8ch devices of tutuuu.com You can find them on aliexpress https://www.aliexpress.com/item/LAN-Ethernet-2-Way-Relay-Board-Delay-Switch-TCP-UDP-Controller-Module-WEB-Server-O07/32833984767.html The relays can be managed via http, tcp and or udp commands. On github you’ll find the information on those devices, search for SR201.

However I have not flashed them with Tasmota, wouldn’t know if that is possible at all.

Philip Knowles

unread,
Jan 9, 2019, 6:13:55 AM1/9/19
to wro...@tirnet.de, SonoffUsers

I agree WiFi shouldn't be the only way. Let's face it most of us have walls with switches connected by wires. Ethernet over mains has been around for years. I'm surprised no one has produced a Ethernet over mains switch yet.
OpenWRT has a fork which looks very similar to what Tasmota does.

Regards

Phil K

--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cybe...@gmail.com

unread,
Jan 9, 2019, 7:20:20 AM1/9/19
to SonoffUsers
Yes, I too at one point wondered about PowerLan instead of WiFi

But to become viable as cheap popular solution, it all hinges on the existence of tiny and cheap single chip solutions, and they only seem to come in wifi variants.
I was wondering: It may be that to couple data on top of mains, you'd need a relatively big (2 or 3 cc) signal transformer. Like ethernet PHY usually has.

A pity. Maybe PowerLan is not an ideal high bandwidth solution, but for mains connected low-bandwidth IoT stuff it would be very nice and more reliable 


Nickolaos Contaxakis

unread,
Jan 9, 2019, 8:18:30 AM1/9/19
to cybe...@gmail.com, SonoffUsers
What about using the serial connection, many professional grade solutions from Control4, Crestron, Lutron and Somfy are still using a serial or serial like connection.

Yes, that would require a serial connection to the MQTT server or a serial to ethernet bridge.  But that should be a fairly simple matter to resolve.  That serial cable could also carry power 48V/24V/12V that can be the rectified to the appropriate voltage for the need. 

Just my 2 cents.

Nickolaos

Phil

unread,
Jan 9, 2019, 9:09:29 AM1/9/19
to SonoffUsers
the linked to boards dont appear to be esp based so would probably involve a major rewrite of tasmota to fit whatever soc is employed..
there is a spi/arduino 5v module  for ethernet coms and spi is used for coms in some tasmota builds..


anyone feeling inspired??  i would expect at least a few gotchas on the path so have not been brave enough to look further..  

I have a few esp based devices (sonoff and wemos) which are very flakey when it comes to wifi connectivity,  monitoring apps like tasmoadmin loose and find such modules 50/50 and web/console sessions are a pita as connections drop between commands frequently (not after restart provoking commands either)..  while i feel comfortable using such devices for mainly timed and automatic response duties  the ability to add an ethernet module and network stability would be very useful..  

George Ioakimedes

unread,
Jan 9, 2019, 10:04:44 AM1/9/19
to SonoffUsers
There are projects that have a ESP32 connected over Ethernet, there is even at least 1 board available that does PoE with the ESP32. I haven't looked at the ESP8266 spec in a long time but if it has the same ability to connect to Ethernet through RMII interface then it would be fairly straightforward to have a PoE ESP8266 solution running Tasmota. I thought I saw at one time a fork of Tasmota to the ESP32 but I don't know if that is being maintained.

wro...@tirnet.de

unread,
Jan 10, 2019, 5:35:27 AM1/10/19
to SonoffUsers

Well, Yeah, but switching targets divorces me from the ESP8266 based sonoff gadgets and china clones
Which might not really be a problem, of course.

wro...@tirnet.de

unread,
Jan 10, 2019, 5:37:37 AM1/10/19
to SonoffUsers
isn't it the Arduino and even more Platform-IO unique selling point to ease this switching of platforms?
Is there so much of platform specific code inside of tasmota?

wro...@tirnet.de

unread,
Jan 10, 2019, 5:42:42 AM1/10/19
to SonoffUsers
my notion of "poor man's PoE" is crimping the 4 Ether wires into the RJ 45 and use the other 4 for Power.
On both ends. No Standard, no interoperability.

There are cheap CN "PoE"-labelled gadgets that offer this by plug-betweens.
Mabe handy, but confusing if sbdy else stumbles across such an superficially-professional-looking bot not-to-standard installation.

wro...@tirnet.de

unread,
Jan 10, 2019, 6:12:38 AM1/10/19
to SonoffUsers
Interesting device, but still somewhat expensive.
For one Project in mind, I need ~ 40 switches and same number of 220 V sensors.
And switching to another protocol complexifies installation and maintenance.
But crafting skd of MQTT <-> TCP-UDP-HTTP whatever gateway on a linux machine does not seem that big problem.

But if I found such a gadget with 8 or 16 relais, I would go for that.

wro...@tirnet.de

unread,
Jan 10, 2019, 8:54:45 AM1/10/19
to SonoffUsers
Yeah, good old serial.
Thanks for reminding me.
Yust sent som SN-orders to pile up my stock of USB-serial dongles , ESP-01S, RS485 converts
And a 16 Channel "Modbus" relais.
Not sure whether Modbus is just RS485
duckduck just reveals this .... let's see....

wro...@tirnet.de

unread,
Jan 11, 2019, 6:54:09 AM1/11/19
to SonoffUsers
Trying to peek down that rabbit hole they call "OSI Stack".

found stuff like this

./sonoff/xdrv_02_mqtt.ino:99:PubSubClient MqttClient(EspClient);
./sonoff/xdrv_02_mqtt.ino:463:  EspClient = WiFiClientSecure();      

"WiFiClientSecure" appears to be a symbol in the ESP core

       ~/test/tasmota/Sonoff-Tasmota$ grep -nri "WiFiClientSecure" . | grep './firmware.map' | wc -l
948

so this might be the point where we might cut ESP WiFi out and hook lwip or sth like that.
Good News it that tasmota runs on pubsub-client anyway, and this is known to to work with lwip.

I haven't looked at the Web server part.
Easiest were to switch it off and safe flash space.
At least for the start...

The problem is that having both Ethernet and Wifi on such a small thingie is that meeting timing issues of both tasks get's complicated.
I found 50 ms call mimics in the main loop of sonoff.ino - sounds good for the start
have to dig in my old notes whether that's enough to process ethernet.

Having two interfaces in one gadget also complicates network maintenance.
tried to tidy that up for the NodeMCU some times ago, but ran out of time then.
Not inclined to repeat that error...

And I mean, there are openWRT gadgets for 20 bugs on the market.
There's no need to do bridging and routing in an ESP, right.
So - get rid of WIFI when Ethernet is running - I think, for the moment.....

wro...@tirnet.de

unread,
Jan 15, 2019, 5:28:24 AM1/15/19
to SonoffUsers
OK , I opened an issue on the "wired ethernet" case here:

My first test of ethernet driver in ESP8266 was somewhat discouraging.
I consider to port tasmota to STM32, but yet I don't know how thightly tasmota is woven to hardware specifics under it's hood.
Any help appreciated :-)
Reply all
Reply to author
Forward
0 new messages