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

Issue sending negative code #66

Open
kiki51 opened this issue Oct 18, 2019 · 2 comments
Open

Issue sending negative code #66

kiki51 opened this issue Oct 18, 2019 · 2 comments

Comments

@kiki51
Copy link

kiki51 commented Oct 18, 2019

Hi

I use rpiutils tools to send and receive code over 433mhz with my remote/plug.

I use it under home assistant to power on /off my plug. It replace my remote.

I have buy another set of remote and plug ( otio model. Ref 09ha2) which works fine.
But when I use rfsniffer command to find the remote code sent by the remote, the result is a negative code like : -1094193664.

After that I use codesend with this code and the sniffer return :
Received 13102592.

So I can’t send a negative code, it’s translate like a positive code. And it doesn’t work.

Can you help me to solve this trouble?
Thanks.
Sorry for my bad English.
Eric

@Henykau94
Copy link

I have the same problem can someone please help

@SiberaIndustries
Copy link
Contributor

The reason for the negative values is called "integer overflow". Your transmitter sends a code higher than the current data type (signed integer) can store, its like you want to count to 6 with 1 hand. You can count to 5 and then you have to start again for 5 to 6. Here its a signed int [-2147483648, +2147483647], just a bigger number.

Fixed it in #81 or check it out here

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

No branches or pull requests

3 participants