nlrb / com.weather-sensors

Wireless weather sensor app voor Athom Homey
https://apps.athom.com/app/com.weather-sensors
MIT License
14 stars 26 forks source link

Alecto V1 Temp-Humidity sensor is displyed with a random channel value #29

Closed Javiast closed 6 years ago

Javiast commented 6 years ago

Hi Ramon, I hope everything is fine with you. Here I am trying another of your great apps, which is working fine with the first sensor it tried, but I think I found a small bug.

The sensor (temp + humidity) is identified as an Alecto V1 and the issue is that the same sensor is randomly displayed with different channel values (at the end it appears as 3 different sensors in homey).

After some testing this weekend I think the reason is because you are reading the channel value from the 10th and 11th bits when the ch id is actually carried by the 5th and 6th bits. This is consistent with the info in the link (https://github.com/merbanan/rtl_433_tests/tree/master/tests/alectov1 you provided some time ago in the athom forum):

_Format for Temperature Humidity AAAAAAAA BBBB CCCC CCCC CCCC DDDDDDDD EEEE _RC Type Temperature__ Humidity Checksum A = Rolling Code / Device ID

Device ID: AAAABBAA BB is used for channel, base channel is 01 When channel selector is used, channel can be 10 (2) and 11 (3) _B = Message type (xyyz = temp/humidity if yy <> '11') else wind/rain sensor__

What do you think Ramon?

LEt me know if you need any additional info, logs, etc.

Thanks in advance, Javier

nlrb commented 6 years ago

Hi Javier,

Excellent find, thanks! The current code doesn't make sense indeed, will change the channel part.

Best regards, -Ramón

Javiast commented 6 years ago

My Pleasure Ramon. This if fun. Keep testing so more things are coming :-)

Javier

El mié., 7 mar. 2018 a las 19:30, Ramón Baas (notifications@github.com) escribió:

Hi Javier,

Excellent find, thanks! The current code doesn't make sense indeed, will change the channel part.

Best regards, -Ramón

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlrb/com.weather-sensors/issues/29#issuecomment-371236605, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad3-aOsqfAeDB7LwWts79Ms7LGCGa5Ptks5tcCc3gaJpZM4Sfl5K .

Javiast commented 6 years ago

Hi Ramon,

many thanks for the new version.

I'm testing it new. Please notice that regarding the channel id in the temp sensor, channel id is code using a basic BCD coding. As you are reversing the bit order and add 1, channel appear as 3 when channel used is 1, (or 4 when ch is 2).

Please., let me know if you need any traces or any other info.

Thanks and best regards., Javier

On Sat, Mar 10, 2018 at 3:56 PM, Ramón Baas notifications@github.com wrote:

Closed #29 https://github.com/nlrb/com.weather-sensors/issues/29 via a4608df https://github.com/nlrb/com.weather-sensors/commit/a4608dfc608724f0d44bf389eadcf0ee273a8a9d .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlrb/com.weather-sensors/issues/29#event-1514654127, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad3-aG5pb-CJornOapvW3586lwyQf7hmks5tc-mGgaJpZM4Sfl5K .