Page 3 of 4

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 12:36
by chromo23
iron wrote: 16 Feb 2022, 11:52 Add the GitHub link to your signature please :)

probably a good idea...

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 12:47
by chromo23
Patou wrote: 15 Feb 2022, 14:18 Sorry I made it public now.
Here is the link https://docs.google.com/document/d/1rmj ... ue&sd=true
Thank you for your work! You are much better with that, than i will ever be. :)
It looks really good.
some things caught my eyes:
- you dont need to write a slidervalue to the corresponding task anymore. this is now done by the dashboard.
- there are more options for time and date and there is also year. and you don´t need code for it anymore. the values will be displayed automatically
- You can call an item of a “bigVal” Task something that consists “clock”/”time”, “date”, “year” to get this displayed independent of the value. (german speaking person can also use “uhr” and “datum” -> for date format with dots)
i´ll read it more thoroughly when i have more time for it...

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 13:19
by TD-er
The reboot is only (really) needed when uploading config.dat or security.dat.
All other file uploads it is not needed.
But maybe I should enforce it when uploading one of those, as you will otherwise corrupt the settings file when saving anything.

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 13:46
by chromo23
TD-er wrote: 16 Feb 2022, 13:19 The reboot is only (really) needed when uploading config.dat or security.dat.
All other file uploads it is not needed.
But maybe I should enforce it when uploading one of those, as you will otherwise corrupt the settings file when saving anything.
please don´t.
i never needed a reboot for uploading a css or html file.
for testing these files it would be especially annoying...

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 17:11
by TD-er
That's what I meant too...
Only when those files were updated, the node should reboot, or at least refuse to save.

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 17:40
by chromo23
ahh i get it.. you mean an enforced reboot when uploading .dat files.
puhhh.. relieved :D

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 18:03
by TD-er
chromo23 wrote: 16 Feb 2022, 17:40 ahh i get it.. you mean an enforced reboot when uploading .dat files.
puhhh.. relieved :D
Remember the second part of the name of ESPEasy ;)

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 19:25
by Patou
Hello,

I did not find enough explanation in your post about date time day month and year so please adapt the text when you have more time
I added the last iframe at the end of the document.
Nice work ( I can only write manuals ! not able to do your job but I appreciate to use it)
https://docs.google.com/document/d/1O9_ ... ue&sd=true

Patou

Re: maybe easier to use Dashboard replacement

Posted: 16 Feb 2022, 20:56
by chromo23
Patou wrote: 16 Feb 2022, 19:25 Hello,

I did not find enough explanation in your post about date time day month and year so please adapt the text when you have more time
there is nothing more to it ;)
if in bigVal or bigValC you call a taskitem with these names then regardless of its value in espeasy it will show the time,date,year

Re: maybe easier to use Dashboard replacement

Posted: 23 Feb 2022, 16:28
by chromo23
@Patou
I changed some small things without formatting
and some pictures are could be updated or missing.
If you have github i really would appreciate it if could publish/put the manual in the easyfetch repository. So it would be easier for me to collaborate.

Re: maybe easier to use Dashboard replacement

Posted: 28 Feb 2022, 16:06
by chromo23
There is a new test.html with some new features for testing:

What’s new:

- url parameter: add ?unit=<unitnr> to the url to directly access a node (good for bookmarking)

- up to 4 buttons with one dummy: Name a dummy device something that consists "dButtons" and every value becomes a button.
You can add an option for colorbuttons with "?C"(see picture below)
b1.png
b1.png (39.93 KiB) Viewed 71976 times
b1f.png
b1f.png (14.08 KiB) Viewed 71976 times
- add a thingspeak value to display the last value of a field of a public thingspeak channel, use this scheme for a value-name: "name&<channel>&<fieldnumber>" optional you can give it a unit of measurement with ?<unit of measurement> (like in every other field):
ts1.png
ts1.png (32.13 KiB) Viewed 71976 times
ts1f.png
ts1f.png (11.99 KiB) Viewed 71976 times
ts2.png
ts2.png (30.39 KiB) Viewed 71976 times
ts2f.png
ts2f.png (14.5 KiB) Viewed 71976 times
- take the red pill: long press the house button and it will bring you to the devices webui without fetch...

Re: maybe easier to use Dashboard replacement

Posted: 01 Mar 2022, 15:54
by chromo23
small update to dButtons:

- add "&<nodenumber>" to the valuename and the button send its events (normal or long) to the corresponding node.
Edit "&A" will send an event to all connected nodes (it replaces the "allNodes" dummy-device)
Bildschirmfoto 2022-03-01 um 15.49.29.png
Bildschirmfoto 2022-03-01 um 15.49.29.png (32.66 KiB) Viewed 71938 times
Buttonmania:
Bildschirmfoto 2022-03-01 um 16.16.51.png
Bildschirmfoto 2022-03-01 um 16.16.51.png (32.93 KiB) Viewed 71935 times

Re: maybe easier to use Dashboard replacement

Posted: 02 Mar 2022, 18:02
by iron
Definitely needs detailed documentation.

I have been following it from the start and I have to go over a collection of older posts to get working now.

Re: maybe easier to use Dashboard replacement

Posted: 02 Mar 2022, 19:06
by chromo23
I know..... i should rename the topic to: "maybe you have to study a lot to use this dashboard replacement" :D

I just added a new feature:
- an empty bigVal-tile: name a value "noVal" and you’ll get an empty tile
noval.png
noval.png (36.31 KiB) Viewed 71905 times
noval2.png
noval2.png (30.16 KiB) Viewed 71905 times

and right now i update just test.html with new features....

Re: maybe easier to use Dashboard replacement

Posted: 21 Mar 2022, 14:29
by chromo23
Finally i found some energy to write a small documentation of easyfetch on github.
I hope it is halfway understandable...
and please contact me if i forgot something.

Re: maybe easier to use Dashboard replacement

Posted: 22 Mar 2022, 22:45
by Patou
Good guide ... easy to follow
Thanks
Patou

Re: maybe easier to use Dashboard replacement

Posted: 28 Mar 2022, 20:34
by chromo23
I added a url parameter live update (just found out that this is possible without reloading the page every time :) )
Clicking on a unit in the list adds the corresponding url parameter (?unit=x) to the url.
So if you reload the page you start with the unit selected before.

Initially it was only possible to enter the parameter by hand to have direct access to a unit
chromo23 wrote: 28 Feb 2022, 16:06 What’s new:

- url parameter: add ?unit=<unitnr> to the url to directly access a node (good for bookmarking)

Re: maybe easier to use Dashboard replacement

Posted: 09 Nov 2022, 14:39
by Haldi_2
@TD-er can we make this Post Sticky? I think that's a pretty cool addon that should get more recognition.

@Chromo23 maybe update the First Post with all the new infos. And change Thread Title to something like 'Addon: Custom Dashboard "EasyFetch"'

Re: maybe easier to use Dashboard replacement

Posted: 09 Nov 2022, 14:43
by TD-er
Made it sticky.

Re: maybe easier to use Dashboard replacement

Posted: 09 Nov 2022, 16:42
by Ath
Haldi_2 wrote: 09 Nov 2022, 14:39 maybe update the First Post with all the new infos. And change Thread Title to something like 'Addon: Custom Dashboard "EasyFetch"'
Board settings to avoid spam don't allow to edit messages after a couple of days...

Re: maybe easier to use Dashboard replacement

Posted: 10 Nov 2022, 15:25
by chromo23
I am not sure if this thread should be sticky since it only provides the reader with the history of rocky road to an alternative dashboard...
There is almost no useful content for using esyfetch in its latest form.

A instructions and the dashboard itself can be found on github (follow the link in my signature)

Re: maybe easier to use Dashboard replacement

Posted: 11 Nov 2022, 19:58
by Haldi_2
Okay, well maybe make a new thread that explains how to set it up in a few short steps and a few example screenshots?
Then this one here can get lost im time.

i Do think this is a very practicall addon that more people should know about.
And as TD-ed made it stick he seems to agree.

Re: maybe easier to use Dashboard replacement

Posted: 11 Nov 2022, 20:07
by TD-er
Haldi_2 wrote: 11 Nov 2022, 19:58 [...]
i Do think this is a very practicall addon that more people should know about.
And as TD-ed made it stick he seems to agree.
Well I do agree that the amount of documentation on the dashboard functionality is far below what's acceptable.
But I also agree that it is way more important to have something properly documented instead of "see here is a thread where there should be information on how to use this feature, good luck!"

Re: maybe easier to use Dashboard replacement

Posted: 11 Nov 2022, 23:15
by chromo23
@TD-er isn´t there a possibility to give thread-starters the ability to change the content of their first posts? I haven´t looked at phpbb yet but i am sure there is some kind of user management like profiles.
I can think of things like the release notes and announcements, newest updates on plugins and also addons like my dashboard that would be sticky and you do not have to scroll through the whole thread.
I think most of the people are used to a forum instead of using (and registering to) GitHub for the latest news.

On the other hand i really like the Tasmota approach where you have all the content in one place... The most confusing for me with ESPeasy at the beginning was gathering info from three different places. Fortunately this has changed with the progress of ESPEasy.readthedocs.io. Thanks a lot to all participants for that by the way!!!

Re: maybe easier to use Dashboard replacement

Posted: 03 Dec 2022, 11:22
by chromo23
@TD-er

is it possible to deactivate the authorization request for an individual index page?
As soon as i set a password in espeasy i also have to type my credentials when opening this dashboard.
A workaround is to run the dashboard on a different unprotected device because just fetching json data from a password protected device is no problem.
But at some places there is a need to protect all devices and just grant access only to my dashboard.
Could you help me with that?

Re: maybe easier to use Dashboard replacement

Posted: 03 Dec 2022, 12:24
by Ath
A somewhat similar subject is already in this issue: #4220

Re: maybe easier to use Dashboard replacement

Posted: 03 Dec 2022, 14:23
by chromo23
Ath wrote: 03 Dec 2022, 12:24 A somewhat similar subject is already in this issue: #4220
Not quite. The discussion there is about protecting sensitive information in json. I would like to have the ability to access custom HTML pages without a password prompt

Re: maybe easier to use Dashboard replacement

Posted: 03 Dec 2022, 19:19
by chromo23
Small updates for "easyfetch"

- I fixed an issue where slider values were not updating on esp32s, caused by a bug described here: https://github.com/letscontrolit/ESPEasy/issues/4374
- Sliders now have a "switch" function. If you click on the left half of the slider, the value becomes the set minimum (default=0) and if you click on the right half, it becomes the maximum (default=1023)

Edit: reduced the "switch" areas of the slider to the upper and lower 1/6th

Re: maybe easier to use Dashboard replacement

Posted: 04 Dec 2022, 19:19
by chromo23
@TD-er and @Ath

I wanted to integrate an easier way to create a toggle-button in easyfetch.
Currently you have to add a rule for a Button to work:

Code: Select all

On ButtonEvent Do
  GPIOToggle,14
Endon
For this new behavior you just name the value of a "switch"-device "bntState" + "?" + the gpio you want to toggle (e.g. "btnState?14")
It creates a tile that sends the toggle command.
The problem is, that the "GPIOToggle"-command doesn´t work when the gpio is already set in the devices page.
Is there a workaround for that?
Bildschirmfoto 2022-12-04 um 19.08.48.png
Bildschirmfoto 2022-12-04 um 19.08.48.png (79.92 KiB) Viewed 68051 times
Bildschirmfoto 2022-12-04 um 19.09.05.png
Bildschirmfoto 2022-12-04 um 19.09.05.png (32.02 KiB) Viewed 68051 times

Re: maybe easier to use Dashboard replacement

Posted: 04 Dec 2022, 19:26
by chromo23
And i know, that this error message makes sense since the device is an input as the name switch suggest.
But me and probably other people too use this for outputs like a relay as well, since you immediately can see the output state in the devices tab.. (and easyfetch also uses the state of the device to color the virtual button accordingly)

Re: maybe easier to use Dashboard replacement

Posted: 04 Dec 2022, 22:29
by TD-er
You could set the pin to some output level at boot, or maybe on the Hardware tab at the bootstates section.

Re: maybe easier to use Dashboard replacement

Posted: 04 Dec 2022, 23:15
by Ath
That check & error message is only applied to GPIOToggle, so you could use an alternative like:

Code: Select all

gpio,14,=![plugin#gpio#pinstate#14]

Re: maybe easier to use Dashboard replacement

Posted: 05 Dec 2022, 19:53
by chromo23
TD-er wrote: 04 Dec 2022, 22:29 You could set the pin to some output level at boot,
This works, but contradicts the approach to make (easily) an user-friendly dashboard switch without using rules.
TD-er wrote: 04 Dec 2022, 22:29 or maybe on the Hardware tab at the bootstates section.
This doesn’t work...

Ath wrote: 04 Dec 2022, 23:15 so you could use an alternative like:
gpio,14,=![plugin#gpio#pinstate#14]
That’s working but only for local usage. But i would need it to work also for the remote units via SendTo
I seems that the last part of the command doesn’t get parsed correctly at the receiver end.

sender:

Code: Select all

SendTo,12,"gpio,15,=![plugin#gpio#pinstate#15]"
reveiver log (state is always the same):

Code: Select all

254980929: gpio,15,=!0
254980931: Command: gpio
did i maybe wrapped the command wrong?

Edit:

Code: Select all

=![plugin#gpio#pinstate#15]
actually gets parsed but on the sender side....

Re: maybe easier to use Dashboard replacement

Posted: 05 Dec 2022, 20:11
by Ath
chromo23 wrote: 05 Dec 2022, 19:53 Edit:

Code: Select all

=![plugin#gpio#pinstate#15]
actually gets parsed but on the sender side....
Yes, that's the case, can't yet see a way to prevent that, other than having a rule on the remote side that does this code, only needs 1 argument... but still a rule to be added there :?

Re: maybe easier to use Dashboard replacement

Posted: 05 Dec 2022, 21:16
by chromo23
Ok, thanks. I now solved it differently.

Re: maybe easier to use Dashboard replacement

Posted: 13 Dec 2022, 12:37
by chromo23
I did some changes in code structure, functionality and appearance.

- new color-scheme for light mode
- simple toggle switch when adding a switch plugin without using rules,
available since the latest builds (if "Inversed Logic:" is set the value-name needs to be changed from "State" to "iState")
if you have an old build use "btnState" + ? + "gpio Number" instead (e.g. btnState?12)
(i also prepared a PWM slider but that needs pin states in json)

- number input (name a dummy-device "vInput"), enter a number and confirm with "enter" or "click" on the upper part of the tile
- always-square - layout always puts empty tiles automatically at the end to make it square
- sysinfo in the nodelist
- create empty Tiles in dButton and vInput that hides in mobile mode by entering "noValAuto" as a value-name (just "noVal" crates an empty tile without this ability)

Edit: almost forgot... the cron plugin is now properly visualized

New Colors:
newcolors.png
newcolors.png (73.77 KiB) Viewed 67884 times
Simple toggle switch:
button.gif
button.gif (729.13 KiB) Viewed 67884 times
Number input:
vinput.gif
vinput.gif (1.17 MiB) Viewed 67884 times
Always square:
always square.gif
always square.gif (402.89 KiB) Viewed 67884 times
Sysinfo:
sysinfo.gif
sysinfo.gif (423.54 KiB) Viewed 67884 times
Cron Tile:
cron.png
cron.png (34.26 KiB) Viewed 67872 times

Re: maybe easier to use Dashboard replacement

Posted: 22 Dec 2022, 12:14
by chromo23
Tip of the day:
You can use easyfetch more dynamically by enabling and disabling certain tasks dependent on user interaction.
(For now we have to link the device that needs to be en- or disabled with another device which keeps a state but in the latest builds it is possible to retrieve the state of a taks in rules. See here: https://github.com/letscontrolit/ESPEasy/pull/4421 This allows even more sophisticated scenarios.)

Here a very simple code example:

Code: Select all

On TimerEvent Do
  If [dButtons#Timer]=0
    TaskValueSet,2,2,2
    TaskEnable,3
  Else
    TaskValueSet,2,2,0
    TaskDisable,3
  Endif
Endon
And the result:
dynamic1.gif
dynamic1.gif (88.84 KiB) Viewed 67724 times
Another example (a countdown timer for a light):
dynamic2.gif
dynamic2.gif (365.72 KiB) Viewed 67724 times

Re: maybe easier to use Dashboard replacement

Posted: 22 Dec 2022, 12:18
by TD-er
Cool!

Re: maybe easier to use Dashboard replacement

Posted: 13 Jan 2023, 15:24
by chromo23
I found some time to enhance easyfetch a bit..

What´s new:

- auditive feedback
enable/ disable click sounds persistently (via cookie) -> longpress the "x" in the sidenav

- nodelist enhancements
-hover to open sidenav on desktop
-slide ltr or rtl to open/close the sidenav on mobile devices

Re: maybe easier to use Dashboard replacement

Posted: 13 Jan 2023, 16:31
by TD-er
Next will be trying to match icon files on the file system with task names?
Oh, which reminds me, you asked for a directory listing in JSON a while ago...

Re: maybe easier to use Dashboard replacement

Posted: 13 Jan 2023, 18:47
by chromo23
TD-er wrote: 13 Jan 2023, 16:31 Next will be trying to match icon files on the file system with task names?
I will think about it? ;)
TD-er wrote: 13 Jan 2023, 16:31 Oh, which reminds me, you asked for a directory listing in JSON a while ago...
Huh..did I? I asked so many things that i probably can´t remember this one. :D
But the more JSON you throw at me the better.... :P

Re: maybe easier to use Dashboard replacement

Posted: 13 Jan 2023, 20:25
by TD-er
chromo23 wrote: 13 Jan 2023, 18:47 [...]
TD-er wrote: 13 Jan 2023, 16:31 Oh, which reminds me, you asked for a directory listing in JSON a while ago...
Huh..did I? I asked so many things that i probably can´t remember this one. :D
But the more JSON you throw at me the better.... :P
I probably read your request between the lines then, but still sorry I didn't do it yet.
You maybe didn't know you wanted it but I don't like to keep people from features they eventually would want to have :)

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 08:26
by ciberyan
Very nice job ! congratulations ! I look at the code but :o :lol:

Would be nice to have an indication of version or revision in the dashboard

Fred, France

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 09:22
by chromo23
Hi Fred,
happy to hear that you like easyfetch.
ciberyan wrote: 20 Jan 2023, 08:26 Would be nice to have an indication of version or revision in the dashboard
Do you mean an indication of the build of ESPeasy?
Like this?
sysinfo.png
sysinfo.png (48.04 KiB) Viewed 67302 times
Edit:
I am not sure what should be displayed here anyway since it is redundant to the infos you can gather from the webui of the device itself.

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 09:38
by ciberyan
Hello
No I speak of the revison of YOUR html code
To know when to upgrade

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 10:12
by Ath
Ah, look up Semantic Versioning ;)

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 10:52
by chromo23
Ath wrote: 20 Jan 2023, 10:12 Ah, look up Semantic Versioning ;)
Thank you Ath :D
ciberyan wrote: 20 Jan 2023, 09:38 Hello
No I speak of the revison of YOUR html code
To know when to upgrade
Since i commit every small change immediately i see no need in versioning. I have not planned any new features in the future and since almost all of my commits are bug fixes so it is always time to upgrade to the latest file. ;)
Nevertheless i will maybe add an info about the commit number to have a reference point. I have to look where i can squeeze this in because i am very close to my self-imposed 10k limit :)

The latest "version" of easyfetch will probably not change for a while since i hopefully have fixed all bugs. I will start to concentrate now on the more unpopular part of easyfetch...documentation :oops:

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 10:54
by TD-er
chromo23 wrote: 20 Jan 2023, 10:52 [...] on the more unpopular part of easyfetch...documentation :oops:
Popularity depends on who you ask :)
I always love documentation.... when it is done :)

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 11:10
by chromo23
TD-er wrote: 20 Jan 2023, 10:54 I always love documentation.... when it is done
Do we have a volunteer? :D
But seriously, i am a bit disabled and it takes a lot of energy to sit in front of the computer and do stuff. And since documentation comes last i simply often do not have any energy left for that. (i guess i could change my behavior to implement a better routine but this is easier said than done)

Re: maybe easier to use Dashboard replacement

Posted: 20 Jan 2023, 11:53
by TD-er
I know the feeling.. well not about your body not cooporating.
I really don't think I could manage it when my body would refuse to cooporate. That would be extremely frustrating.

So please do what you can and nothing more!
I really appreciate the effort so far and it is to nobody's interest if you cause yourself to burn-out and loose interest (or energy to continue).

I know that starting documenting at the start of a design process often feels like wasted time as you can often throw away when you gain new insights.
On the other hand it may help to put at least a few ideas in writing, so there is some backlog of intentions for others to read.

So maybe you could add just a single readme txt file where you simply write down in a few sentences:
- Workflow
- Intented use cases
- New ideas

That would already be a good starting point for someone to pick up drafting some documentation which you then could review.