erdose / xiaomi-mi-lywsd03mmc

Xiaomi Mi BLE Temperature & Humidity Sensor
MIT License
26 stars 7 forks source link

I have an error in the log #17

Closed seby90 closed 1 year ago

seby90 commented 1 year ago

I am using the latest version of domoticz 2023.1 and I am trying to use your script. I have installed the latest version of python 3.9.2. I did not go to the step of modifying the cron file for an automatic execution every 5 minutes. I have done a chmod 777 of the whole xiaomi-mi-lywsd03mmc directory. When I run ./xiaomi-mi-lywsd03mmc and edit the log file, this is what I get: 2023-02-22 10:50:34 INFO Start script... 2023-02-22 10:50:34 INFO Input parameters: Domoticz Server IP: 192.xx.xx.xx Domoticz Server Port: 8XXX Domoticz Server User: XXXXXX Domoticz Server Password: XXXXXXXX Discovery data from MAC: A4:C1:38:XX:XX:XX 2023-02-22 11:54:50 INFO Temp: 18.1 2023-02-22 11:54:50 INFO Hum: 66 2023-02-22 11:54:50 INFO Comfort type: 1 2023-02-22 11:54:50 INFO Battery level: 77 2023-02-22 11:54:50 INFO Voltage: 2.902 2023-02-22 11:54:50 INFO The request is http://192.XXX.XX.XX:8XXX/json.htm?type=command&param=udevice&idx=236&nvalue=0&svalue=18.1;66;1&battery=77 2023-02-22 11:54:50 INFO The response is <Response [401]> If I copy the command from the log ( http://192.XXX.XX.XX:8XXX/json.htm?type=command&param=udevice&idx=236&nvalue=0&svalue=18.1;66;1&battery=77 ) into my internet browser, mysteriously domoticz receives the data!

An idea of the problem? thank you in advance for your feedback

seby90 commented 1 year ago

We have found the problem. In the declaration of the trusted networks under domoticz, I had not entered the type of address of my local network correctly. Since it is ok the script works well !