Skip to content

Add ability to toggle devices from nodes view. - #3291

Merged
blazoncek merged 3 commits into
mainfrom
onoff-nodes
Jul 14, 2023
Merged

blazoncek merged 3 commits into
mainfrom
onoff-nodes

Conversation

@blazoncek

Copy link
Copy Markdown
Contributor

No description provided.

@Aircoookie Aircoookie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like this!

Comment thread wled00/data/index.js
function rmtTgl(ip,i) {
event.preventDefault();
event.stopPropagation();
fetch(`http://${ip}/win&T=2`, {method: 'get'})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could consider T=2&NN so that really only that one instance is toggled (no sync). On the other hand, it might be more intuitive to have this power button do exactly what the native one in the device UI itself does. Which would you prefer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO sync should be respected if enabled.

Comment thread wled00/NodeStruct.h
IPAddress ip;
uint8_t age;
uint8_t nodeType;
union {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it is not a huge deal "wasting" space here, I wouldn't even add alternative type IDs starting from 1 at all, just adds overhead, as we should keep the 82/32-35 IDs anyways for compatibility.
We still have an extra byte for future enhancements without increasing the size of NodeStruct as 24 bit is sufficient for all build numbers until the year 2167 😄

And don't underestimate how many ESP32 variants Espressif can still throw on the market (H6? C6? C2? Hard to keep track...). Maybe we even want to distinguish different flash layouts or something with this in the future, so 7 bits seems reasonable for type.

@blazoncek
blazoncek merged commit b1dfa1d into main Jul 14, 2023
@blazoncek
blazoncek deleted the onoff-nodes branch July 14, 2023 11:08
aenertia pushed a commit to aenertia/WLED that referenced this pull request Aug 18, 2026
Add ability to toggle devices from nodes view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants