-
Notifications
You must be signed in to change notification settings - Fork 797
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
Conversation
@1technophile pls review |
Done. Could you update the docs also to explain how to make it work: |
@1technophile done all the changes, edited the docs too. |
@V1pr I'm not seeing the docs update, am I missing something ? |
@1technophile my bad, overlooked and the change was created under a new branch... fixed. |
Thanks |
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: