'ET Display Home' a flow to help manage your ESPeasy and Sonoff/Tasmota flashed devices


#1

This project is designed to help you keep your Wemos and Sonoff devices under control by providing a dashboard with a link to the latest ESPeasy ano/or Sonoff Tasmota release, the node name, status, current software version (devices with older versions are hi-lighted), The current RSSI value, a link to each online device's configuration page and other infomation that will seem reasonable to provide.

The project uses two tables in an SQLite database and is designed that, if needed in a new releases, it will drop and recreate the tables and data in the DB for all online devices.

You need to have sqlite and nmap installed on a pi:
sudo apt-get install sqlite3 nmap

Current Release: V0.1.8a - If you are updating from a release prior to v0.1.8 this Requires running STEP 2 read the 'Release Notes' comment node to see changes.

Here is the flow: ET_Display_Home_v019.json (45.9 KB)


Greenhouse irrigation
Apply custom css styling to dashboard elems
#2

Updated to v0.1.4 - made a change to drop/create tables instead of deleting the file and trying to recreate the tables. That was causing an error forcing you to stop start NR.


#3

As a long-time db admin, I find the idea of dropping/recreating tables (even in sqlite) to be... well, harsh... Most applications are designed to only affect the rows inside the table, not the table(s) themselves, or any other "schema" objects for that matter.

I think it would better to remove all the rows using the truncate <tablename>; statement (if available -- not sure about sqlite though?). If not available, the usual sql statement is delete * from <tablename>;

The truncate command has the advantage of resetting any autoindex columns, and is faster to execute, but for a table of this size, that will be irrelevant. Anyway, just my $0.02 fwiw...


#4

thanks for the comments Steve. I have a new version that is doing a delete * and will handle Tasmota devices too. Just putting a couple finishing touches on it. Because of the number of possible devices (max 255) I wan't too worried about performance. I will check up on the Truncate command.


#5

Have to agree Steve, many moons ago I was also a db admin. Seeing "delete *" still causes me anxiety :wink:


#6

the only reason I was dropping the table and am now doing a delete * is asthis has been evolving, I've been adding new rows to the DB and wanted to make it as painless for a noby as possible. When it is running and goes out and looks for new devices and the status of existing devices, I do a replace.


#7

Excellent work BTW. I did look at ESPEasy but decided to go the Sonoff Tasmota route.


#8

After seeing the two, I like the ESPeasy controls better than the Tasmota. Some items are hidden with Tasmota and can onluy be changed by sending commands to the device.

I just sent a copy of my latest release (v0.1.6) to a friend to test. If he has no problems I'll post it. It will show you both ESPeasy and Tasmota devices.


#9

Or by building it with the settings preset. I have a fork of tasmotta with each of my devices on a local branch with all the settings built in. Then I just have to checkout the relevant branch and build it and upload it to the device.


#10

I have both flavours.
I use ESPeasy on all my Wemos D1 Minis as they have 4Mb of flash memory.
I've gradually changed over my SonOff S20s and SonOff in-line switches (that only have 1Mb of flash) from ESPeasy to Tasmota (as I can OTA Tasmota). Upgrading via Tasmota's web management page is very easy.


#11

Just loaded version 0.1.6 to the first post. now supports both ESPeasy and Sonoff/Tasmota flashed devices.

If you have any issues, let me know.

PaulW


#12

Just loaded version 0.1.7 to the first post.

0.1.7 - Typo's and cleaning up some labels, removed some debugging,
changed display to color node green when online and orange when offline

If you have any issues, let me know.

Paul


#13

Hi Paul - just to say your program works like a dream.

Thanks for spotting that I hadn't given each of my SonOff devices a unique friendly name.

Cheers from David.

PS: Really like your choice of the name for your project.


#14

Of course it now means he has to do a mobile phone version just so he can extend the pun to its logical conclusion :slight_smile:


#15

Brilliant - now why didn't I think of that one??:cry:


#16

@dynamicdave suggested the name

New Release v0.1.8 - Fixes a bug (mea culpa) where devices may not show.

The nodes table was keyed off the 'System.Name' for espesasy or the 'Status.FriendlyName' for a tasmota device which by habit I all made unique. My tester did not have the names unique, so device 1 put it's data in the database and then device 2 - with the same name - updated the row with it's data. Device 1 disappeared.

To fix this I've changed the key to the IP. HOWEVER, this may lead to what I call 'goast' entries. Let me explain; when you first load the espeasy or tasmota software to a device, it picks an unused IP address on your network - for example sake lets say it picks 192.168.1.120 - now if you run the update a row will be entered into the database with 192.168.1.120 as the index. Now if you use the device software to change the IP (say you want all your espeasy devices to be in the range 192.168.1.30-50) to 192.168.1.30 and do an update, a row will be created with 192.168.1.30 as the index. BUT the row with 192.168.1.120 still exists - this is a 'ghost' entry.

In the next release, I'll add a way to selectivitly delete rows from the database.

As always comments, requests, or criticisms welcome.

Paul


#17

New Release v0.1.8a - found a small bug that wouldn't let you link to the latest Tasmota release. Also slipped in code to subtract 100 from the tasmota RSSI value to be consistant with the espeasy RSSI values


#18

Just my 2 cents:

  • add the changelog
  • add a note, that an update could break a working device and should only be done if necessary
  • add a column "previous version", so that one can go back
  • add a possibility to save the settings of a device

#19

@moebius Walter thanks for your comments! This (currently) does not do upgrades or set the settings on the devices. It just grabs the info about the devices and puts it all in one place.

  • change log => release notes in the 'Release Notes' comment node on the first tab
  • Do you really think anyone - who is compenent enough to flash the device in the first place - won't know that updating to a new version might cause problems? Personally I'm a firm beleiver of waiting a bit brefore updating :stuck_out_tongue:
  • save previous version -That is an idea but I won't know when an update is done, though I supose if I look at the release that is reported against the version stored, I could move the stored verson to a new column in the table (prior_version) and then put in the new version...hmmm let me think about that. (RFE001)
  • savings settings: There is a link (the IP of the device) that takes you to the devices web pages. Both the espeasy and tasmota pages already have an option to save/restore the devices settings.

#20

Sorry, that my ideas didnt match with your tool - i didnt try it and the screenshot inspired my fantasy...

Btw: I meant the change log of the firmwares.