Skip to content

RF433 json usermod - #4234

Merged
DedeHai merged 7 commits into
wled:mainfrom
kilrah:0_15_rf433_json_usermod
Jan 17, 2025
Merged

DedeHai merged 7 commits into
wled:mainfrom
kilrah:0_15_rf433_json_usermod

Conversation

@kilrah

@kilrah kilrah commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

Inspired by https://github.com/athom-tech/Sound-Reactive-WLED/tree/master/usermods/RF433
Modified to handle similar cases as other remote methods through json

Usermod for controlling WLED using a generic 433 / 315MHz remote and simple 3-pin receiver
See https://github.com/sui77/rc-switch/ for details

Build:
- Enable by defining USERMOD_RF433 in my_config.h
- Uncomment "sui77/rc-switch @ 2.6.4" in platformio.ini default env lib_deps section

Usage:
- Connect receiver to an interrupt-capable pin
- Set pin in Config->Usermods
- Info pane will show the last received button code
- See https://kno.wled.ge/interfaces/json-ir/json_infrared/ as reference to create a "remote433.json" file
and upload it to the ESP in http://ip/edit, the key for the actions is the button number retrieved from above.

@blazoncek

Copy link
Copy Markdown
Contributor

Thank you.
Please provide a minimal "readme.md" to accompany the usermod similar as found in other usermods.
Please also revert changes in platformio.ini and add the information into platformio_override.sample.ini (and readme.md)

@DedeHai

DedeHai commented Oct 31, 2024

Copy link
Copy Markdown
Collaborator

This looks like a great addition. Did you test it to work on all ESP variants?

A few suggestions:

  • provide a list of compatible pins for all ESPs in the readme
  • even better: restrict pin selection to compatible pins
  • provide an example json file

@kilrah

kilrah commented Oct 31, 2024

Copy link
Copy Markdown
Contributor Author

Did you test it to work on all ESP variants?

Tested on esp32, c3 and esp8266

even better: restrict pin selection to compatible pins

How can that be done? Believe it's all of them anyway

provide an example json file

No problem to just put one in the folder?

@DedeHai

DedeHai commented Oct 31, 2024

Copy link
Copy Markdown
Collaborator

not sure how to restrict pins but I think AR usermod does it, maybe look at others for examples but I have seen UMs where unusable pins are red. In the deep-sleep usermod I just create a list but there I do not use 'pin' because already used pins can be repurposed, so not going through pinmanager.

yea, I would just put the example json in the usermod folder, easier to find than going through KB and download an IR remote file.

@blazoncek

Copy link
Copy Markdown
Contributor

FYI you cannot restrict GPIO in usermods. Not yet.
Existing restrictions come from used pins.

@kilrah

kilrah commented Oct 31, 2024

Copy link
Copy Markdown
Contributor Author

I looked around and at least for ESP32, S3 and 8266 all pins can be used as interrupts so there should not be any restriction.

Move doc to separate readme
Add sample config
Fix missing json handling
@kilrah

kilrah commented Nov 4, 2024

Copy link
Copy Markdown
Contributor Author

There, hopefully that's fine... I changed the default_env in platformio_override.sample.ini because the existing one doesn't exist anymore and so just copying the whole sample would break.

Comment thread platformio_override.sample.ini Outdated
Comment thread usermods/usermod_v2_RF433/usermod_v2_RF433.h
@netmindz
netmindz changed the base branch from 0_15 to main December 16, 2024 13:29
@softhack007 softhack007 added the usermod usermod related label Jan 6, 2025
@DedeHai

DedeHai commented Jan 12, 2025

Copy link
Copy Markdown
Collaborator

@kilrah can you update to latest (probably just need to up the UM number)?
I would then merge this.
Oh, and you may want to add the "wait for bus" glitch-fix (see #4386)

@kilrah

kilrah commented Jan 16, 2025

Copy link
Copy Markdown
Contributor Author

will do

Kilrah added 3 commits January 16, 2025 22:54
# Conflicts:
#	platformio_override.sample.ini
#	wled00/const.h
#	wled00/usermods_list.cpp
@kilrah
kilrah force-pushed the 0_15_rf433_json_usermod branch from 908557d to db13136 Compare January 16, 2025 22:50
@DedeHai
DedeHai merged commit b9aeb19 into wled:main Jan 17, 2025
@kilrah
kilrah deleted the 0_15_rf433_json_usermod branch January 17, 2025 08:13
blazoncek pushed a commit to blazoncek/WLED that referenced this pull request Jan 21, 2025
* RF433 remote usermod
@netmindz netmindz added this to the 0.16.0 candidate milestone Jan 25, 2025
mySwitch.disableReceive();
if (modEnabled)
{
mySwitch.enableReceive(receivePin);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the receivePin is not allocated through the pin manager, meaning it can also be assigned to other functions.
@kilrah I don't think that is intentional?

@kilrah kilrah Feb 9, 2025 •

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.

@DedeHai The pin selection uses it so it is blocked in the GUI, are we supposed to expect that not to be enough?

image

image

aenertia pushed a commit to aenertia/WLED that referenced this pull request Aug 18, 2026
* RF433 remote usermod

---------

Co-authored-by: Kilrah <kilrah@kilrah.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

usermod usermod related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants