pimatic / pimatic-homeduino

Pimatic plugin for using 433mhz devices and sensors with a connected Arduino with homeduino sketch
https://pimatic.org/
GNU General Public License v2.0
37 stars 29 forks source link

Home Easy protocol not working #30

Closed Xento closed 9 years ago

Xento commented 9 years ago

Hello the home easy protocol is not working. I can receive the state from my remote but it's a different unit and id as in pilight.

switch4: { unit: 13, id: 10, state: true }

Config from pilight: systemcode": 22, "unitcode": 10

Then I wanted to see what pilight receives when I send something through homedunino. Pilight only receives "arctech_switch_old" as protocol.

So I looked at the implementations of the protocol and I found out, that homeduino works with fixed pulselength and pilight calculates the timings only with one fixed value.

sweetpi commented 9 years ago

Hello the home easy protocol (switch4) is not working. I can receive the state from my remote but it's a different unit and id as in pilight.

switch4: { unit: 13, id: 10, state: true }

Config from pilight: systemcode": 22, "unitcode": 10

Ok what's the problem? homeduino defines unit and id different from pilight.

Then I wanted to see what pilight receives when I send something through homedunino. Pilight only receives "arctech_switch_old" as protocol.

So I looked at the implementations of the protocol and I found out, that homeduino works with fixed pulselength and pilight calculates the timings only with one fixed value.

So sending is not working? Could you explain in more detail what you mean with that?

Xento commented 9 years ago

Sending works, but I can't learn my switch. I think this is because even pilight does not recognize it as home easy protocol.

Xento commented 9 years ago

I fixed the home easy protocol: https://github.com/pimatic/rfcontroljs/pull/37

Icesory commented 9 years ago

Xento you have changed the protocol switch2 not switch4! Can you explain your problem more detailed. eventually we must create a new protocol

Xento commented 9 years ago

Switch 4 was the only one that displayed the correct status. But home easy is not listed in there and I only have home easy switches. Before the switch2 only displayed false. The old timings worked,too. The new ones are closer to my ones. Maybe this change is not needed. But i think the change with the state bit and the bug with the inverting are real bugs.

Am 15.02.2015 um 21:29 schrieb Ronny notifications@github.com:

Xento you have changed the protocol switch2 not switch4! Can you explain your problem more detailed. eventually we must create a new protocol

— Reply to this email directly or view it on GitHub.

Icesory commented 9 years ago

Worked switch4 for you right? Switch2 and switch3 are the same but with inverted states. Please take a closer look to the existing protocols. I think your change is wrong, I use some switch3 and switch4 device with brands they are not listet.

Xento commented 9 years ago

Switch4 only worked for receiving not for sending. Without my change switch2 was always false and switch3 was inverted. Here is what I receive when I switch on: received: [ 350, 960, 10232 ] 01100101010101100101011001010110010101100110011002 And this for off: received: [ 350, 961, 10236 ] 01100101010101100101011001010110010101100110010102 Only the last bit is different. The switch2 and switch3 have 2 bits for the state, this one only has one. I will create a new protocol.

EDIT: I looked at the two protocols. When these protocols have two states, one inverted one not and only the appeareance is switch. Why not use the last state in both protocols and invert it in one of them, like I did.

EDIT2: Pilight does the same, both protocols (Home Easy Switch and Home Easy Control) read bit 11 https://github.com/pilight/pilight/blob/master/libs/protocols/elro_hc.c https://github.com/pilight/pilight/blob/master/libs/protocols/elro_he.c

Xento commented 9 years ago

I opened a new pullrequest for this: https://github.com/pimatic/rfcontroljs/pull/39

sweetpi commented 9 years ago

Thanks.