-
Notifications
You must be signed in to change notification settings - Fork 163
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
Added skipidentical support for ATC mode #74
Conversation
Hi mvdklip, thanks for your contribution. |
Hi JsBergbau, Thanks for noticing. Yes I did change the criteria because voltage constantly changes. For me including the voltage in the criteria effectively destroys the whole identical mechanism. Could you please test and see if you get more stable voltage readings? Does the identical mechanism work for you when including the voltage? Example readings: @400000006048c3e02e6eaa54 BLE packet: A4:C1:38:29:8D:59 00 1110161a18a4c138298d59009e31410ae8eb -85 You see how RSSI and voltage constantly change? |
What if I would just put battery level back and leave the voltage out? |
Yes I've also noticed that with ATC Firmware voltage level changes quite often, definitvely much more than with original firmware. Since each voltage measurement uses a small amount of battery charge measuring voltage level too often is not a so good idea. I've planned to compile my own ATC firmware version with default measurement interval of 10 seconds, no switching between battery and humidity and a much longer battery measurement period, perhaps one hour or so. Haven't thought about much so far. |
I am personally using pvvx ATC firmware: Disabling the (display) switching between battery and humidity is ease with that firmware. You can can just disable the 'Show batt.' option in the flasher. Maybe you're better off contacting pvvx and asking whether the voltage reading interval can be reduced? |
You can also easily disable that in the original ATC/Telink flasher. However if battery is quite empty thermostat resets and the defaults are back. One of my thermostat shows 43 % battery level. However when connecting to change the interval and disabling battery indicator it reboots because maintaining the bluetooth connection seems to need to much energy. What advantages has the pvvx firmware compared to original ATC firmware for you? |
Main reason to use pvvx version for me is the ability to set a pincode so that i can prevent random strangers from connecting to my bluetooth devices. Also the fact that it's actively developed. Even atc himself recommends pvvx firmware instead. It should also offer better battery life than original atc firmware. |
Ok. I was confused with pvvx's version because his flasher https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html doesn't show any options like changing interval compared to the original Telink flasher https://atc1441.github.io/TelinkFlasher.html I'll give it definitively a try. Since pvvx claims his version needs less power than original ATC version changing battery measurement intervall is a good idea. |
Great! You think this PR can be merged now that I restored battery level as part of the identical check? |
Battery is measured every 10 seconds. Measuring needs 4 mA for 200 µs, this is on average 0,00008 mA. A CR2032 with 220 mAh would last for almost 314 years measuring battery. So changing this interval doesn't really change anything. So how about conditional code: If in ATC mode --skipidentical doesn't consider voltage (and battery level?) but in connection mode it works like before. |
Added code for including the battery voltage when not in ATC mode. |
Thank you very much for your contribution and making this script even better. |
Instead of single variables for the previous measurement and identical counter I changed the script to use dictionaries so that it can keep track of previous measurements and identical counters per sensor. I also fixed the instantiation of the previous measurement by making sure that the sensorname is being copied; otherwise the comparison between the current and previous measurement fails!