Code Monkey home page Code Monkey logo

Comments (7)

chromoxdor avatar chromoxdor commented on September 2, 2024

How does the communication work between other P2P nodes and the node that you look at in the web browser. Is direct contact created between the web browser and the node you are looking at or is the traffic "routed" through the node you are looking at in the web browser??

Hi Jonas,

When you start easyfetch the first time it simply fetches the JSON of the node where easyfetch is hosted. (you can see the JSON output if you click on the Button "show JSON " in the /tools tab in ESPEasy).
Only the containing information is used to generate the content in easyfetch. One of the entries is the node list.
e.g.

"nodes":[
{"nr":1,
"name":"Main",
"build":20719,
"platform":"ESP Easy Mega",
"ip":"192.168.1.132",
"age":0
},{"nr":2,
"name":"Junkers",
"build":20258,
"platform":"ESP Easy Mega",
"ip":"192.168.1.182",
"age":1
},...

This list is used to generate the unit-list of the sidenav.
If you click on one of the units, easyfetch starts to fetch the JSON output of this unit through the corresponding IP.

That the nodes can find each other (and also communicate) they use a special P2P network
The P2P network is an ESPEasy feature and has nothing to do with easyfetch.
Infos and tips regarding this topic can be found here: https://espeasy.readthedocs.io/en/latest/Controller/C013.html

The unit list in easyfetch is the same as the on in ESPEasy in the /main tab. So if the units do not appear there, they will be missing in easyfetch as well.
Bildschirmfoto 2024-01-23 um 17 27 38

BTW FYI: I didn't document some new features in easyfetch. 🫣
But if you wanna try:

  • custom color for sensor and big-value tiles: devicename + ? + hex color(without leading #) e.g.: "sensor?1E847C"
  • the clock plugin generates a button tile now wich lights up according to the state of the first value (output). by clicking on it the plugin page opens.
  • when using "_" it will be displayed as space in value names
  • when using "." it will be used for wordbreak in long value names (so you can decide where the name should break)

from easyfetch.

chromoxdor avatar chromoxdor commented on September 2, 2024

Is direct contact created between the web browser and the node you are looking at or is the traffic "routed" through the node you are looking at in the web browser??

To elaborate that:
Since easyfetch gets the JSON output of the unit you selected to render the tiles (and everything else) it directly contacts this unit to fetch the data.
But sending commands is a different thing. Because of the CORS policy, easyfetch has to send every command trough the unit that hosts easyfetch.
For example: When you press a button called "Relay" on a unit with the unit number 2 the command will look like this: http://<IP_main_unit>control?cmd=SendTo,2,"event,RelayEvent"

from easyfetch.

JonHea avatar JonHea commented on September 2, 2024

from easyfetch.

chromoxdor avatar chromoxdor commented on September 2, 2024

can this also be solved on TextbigVal!?

It could be... do you need it?

from easyfetch.

chromoxdor avatar chromoxdor commented on September 2, 2024

can this also be solved on TextbigVal!?

i just added this in the latest update... :)

from easyfetch.

JonHea avatar JonHea commented on September 2, 2024

from easyfetch.

chromoxdor avatar chromoxdor commented on September 2, 2024

Do you want me to wish for more features if I come up with something??

I am of course very interested to hear what other people might be missing in easyfetch.
Feature requests are always welcome but i can not promise that they will ever be implemented since i want to keep the whole thing as small as possible. But i am already thinking about restructuring easyfetch so that features can be easily deactivated for devices with limited space (e.g. 1M units).

from easyfetch.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.