-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Quinetic Switches and Sensors #3098
base: master
Are you sure you want to change the base?
Conversation
Thanks! Can you run Please format the quinetic_switch_decode() doc-comment as valid markdown. First line (and first line in file) should be Generally just check a checksum and do not print it, it's not data. Use Use Use Use The names Don't indent inside parens like this |
Tried to sort all of the above points as best I can. Noticed the changes from the python script have changed instances of "SoapySDR device driver is available." Reverting that text. |
Looking good. Parens go around the bytes, i.e. it needs to be Is Checksum might just work, depending on byte order, try:
Otherwise checksum can be compared as int, i.e.
|
Thanks for feedback.
I'm thinking that it's best to have a field named button to help with MQTT + HASS, with the button_code int value. Equally, it might be best to discard the "release" codes, and just emit the "press" codes which seem to identify button number. Would it make sense to use a "channel" K/V to identify the button within switch? e.g. 1, 2, 3 |
We usually use "button" as DATA_INT with 1=pressed, 0=not-pressed. Can combined pressed be transmitted, e.g. 1+2? I know that EnOcean kinetic switches support this (hold one button down and press another). We would need an output to support that then. Someone would need to go over all our button-like decoders, capture the current practice and recommend a universal schema (with hopefully little changes needed to get all decoders in line). |
Thanks for your clarification and suggestions.
Short of getting into "schema-like" thoughts, I've chosen to employ the following fields for Quinetic Switch:
One notable benefit of doing that is that rtl_433_mqtt_hass.py will add HASS entities for each button within a switch. That means no other tweaks or adaptations, and the channel represents the known button number. |
A reasonable and minimal approach. We can refine the output later, if we find a common schema for buttons. |
Looks good for merge. Lets wait a week for others to get a word in. Closes #2267 |
Relates to #2267
Checksumming added: ID and Action codes are now consistent