-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support Xiaomi sensors V1 and V2 (square form) #10
base: master
Are you sure you want to change the base?
Conversation
I'm not able to check it's still working for V1 sensors. If someone can do that, it would be nice. |
5ba3ead
to
04a6d2c
Compare
Checked right now. |
very newbie here: so I guess with this modifications v2 (square ones) will work as confirmed by @Albertopnp , right? thanks! |
@pFenners Can this be merged on the master? I can do it for myself but @poseidogithub and probably some other people would like it. |
@ClementMarrast I have tried the code and added some extra logging for debugging purposes because I get an error. Any suggestions what is happening? Maybe a newer Firmware with some changes in the parameters? Hope you can help me. Greetings, Boudewijn |
Signed-off-by: Clement Marrast <[email protected]>
I'm running an older firmware : Can't tell you what's happening here. It seems to be more on Bluetooth side. Maybe the sensor is too far? I've done an update for V2 sensors and negative temperature... It's getting cold now! |
Oke I have done some debugging. As far as I can see the fill_cache is called without an error but after that self.cache_available() is still false.... and the cache seems not to be filled. Any suggestions? |
@BoudewijnvanLangerak I don't know, I didn't write this part of the code, I don't know what's happening behind. Using bluetoothctl, do you correctly see your Mijia from your Pi? The MAC address is correct? Can't tell you more than these "classic" checks. |
Oke just to let you know. I used the MijiaTemp application from my phone didn't change anything to the script and now it works. I get the values. Not all the time but most of the times it just works. Made a cronjob for every single sensor because if a sensor does not respond the others are not called because of th error. |
Good to know, thanks for the feedback. |
Hi Albertopnp,
I'm not using domoticz anymore, even not theses sensors.
It will be hard for me to check and test.
Le sam. 15 juil. 2023 à 03:47, Albertopnp ***@***.***> a
écrit :
… Hi Clement,
I don't know if you have time to maintain this old script.
I'm using it in my Domoticz and it is the only one I found supporting V1
and V2 sensors.
The domoticz request (line 106) is not working in the new Domoticz version
due to security updates.
Do you mind check it? I guess it is related to the new format of the API
URLs
(see here please: https://www.domoticz.com/wiki/Security)
I tried to make it work myself but I couldn't... not good enough at
python...
If you have some time to check it that would be great.
If you don't, no worries I will try to investigate myself during summer
holidays.
Thanks and Regards
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALGCSZXILTUU7FVUF3LWOS3XQHZBRANCNFSM4LE56ADA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Clement, Thanks for your answer. I undestand. In fact I've found the solution. (That's why I removed my message). I'm still using your script and It works really nice. Bonne continuation! PS: by the way, thanks to pFenners as well!! |
Good to know, thanks for sharing!
Le mer. 19 juil. 2023 à 23:11, Albertopnp ***@***.***> a
écrit :
… Hi Clement,
Thanks for your answer. I undestand.
In fact I've found the solution. (That's why I removed my message).
Just in case somebody gets here with the same problem:
You need to add the following line to Domoticz - Settings - Security -
Trusted Networks : 127.0.0.*;192.168.1.*.
(or the IP address from your Domoticz).
I'm still using your script and It works really nice.
So I would like to take the oportunity to say to you: thanks for
developping it!!.
Bonne continuation!
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALGCSZUZFG3MTGB4W34VH2TXRBEO3ANCNFSM4LE56ADA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Add the support of V2 sensors by modifying function to specify the sensor version.