Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RF] Added Pilight RAW packet return support #1604

Merged
merged 7 commits into from
Apr 25, 2023

Conversation

V1pr
Copy link
Contributor

@V1pr V1pr commented Apr 11, 2023

Description:

This PR adds RAW packet support for Pilight module. Once the ability is enabled before compile, the RAW packet return can be enable/disabled with MQTT command:

mosquitto_pub -h 127.0.0.1 -m '{"rawEnabled":true}' -t "home/SonOff_RFB/commands/MQTTtoPilight/protocols" -d

The returned JSON looks like this:
Client (null) received PUBLISH (d0, q0, r0, m0, 'home/SonOff_RFB/PilighttoMQTT', ... (176 bytes))
{"format":"RAW","rawlen":106,"pulsesString":"c:0102010102020202020101010101010102020201020102020202020201010101010101010101010102010102010201020201010203;p:521,944,1924,3845@"}

The pulseString format is Pilight's native. For those who are not familiar with it:
c:* are the indexes for the p:* array, which are the different pulse length. (e.g. pulse[0] = 521ms, pulse[1]=944ms..., so c[0], which is a '0' = 521ms pulse, c[1], which is a '1' =944ms pulse etc)

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

@V1pr
Copy link
Contributor Author

V1pr commented Apr 18, 2023

@1technophile pls review

main/User_config.h Outdated Show resolved Hide resolved
@1technophile
Copy link
Owner

Done. Could you update the docs also to explain how to make it work:
https://docs.openmqttgateway.com/use/rf.html#pilight-gateway

@V1pr
Copy link
Contributor Author

V1pr commented Apr 24, 2023

Done. Could you update the docs also to explain how to make it work: https://docs.openmqttgateway.com/use/rf.html#pilight-gateway

@1technophile done all the changes, edited the docs too.

@V1pr V1pr requested a review from 1technophile April 24, 2023 10:56
@1technophile
Copy link
Owner

@V1pr I'm not seeing the docs update, am I missing something ?

@V1pr
Copy link
Contributor Author

V1pr commented Apr 24, 2023

@1technophile my bad, overlooked and the change was created under a new branch... fixed.

@1technophile
Copy link
Owner

Thanks

@1technophile 1technophile changed the title Added Pilight RAW packet return support [RF] Added Pilight RAW packet return support Apr 24, 2023
@1technophile 1technophile merged commit e3e7004 into 1technophile:development Apr 25, 2023
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