Xiaomi_LYWSD03MMC_for_HA
Xiaomi_LYWSD03MMC_for_HA copied to clipboard
OsError28
Hello,
I don't know what the problem is, but once in a few days I have an oserror28 error and I have to upload everything again.
The line causing the error is f.write(timestamp() + ' ' + message +'\n')
and the OSError 28 is "No space left on device". The log file is filling up your device. Use uos.listdir()
to list the files on your device. You should see something like this:
['boot.py', 'readlog.py', 'ble.py', 'mqtt.py', 'main.py', '20200716ble.log', '20200717ble.log', '20200718ble.log']
The start of the logfile names are the date 2020-07-18 etc. There is a routine that removes files more than three days old.
if you run
>>> machine.RTC().datetime()
(2020, 7, 18, 5, 8, 39, 22, 483894)
you should see the current time and date. If you don't, it may be that you are not connected to the internet and your RTC is not being set.
Can you let me know what you get?
Same here. Deleting the ble.log start working again
I think you are using an out of date version. As you see from my example, the latest version produces daily log files and cleans up after itself. Try the latest files and let me know how you get on.
Hello,
The last source from ble.py always creates a file called ble.log. No value is set for parameter fname in function "debug" so always is creating a file with the same name
You are correct. I have a bug. Leave it with me.
On Mon, Jul 20, 2020 at 8:43 AM desarrolloddol [email protected] wrote:
Hello,
The last source from ble.py always creates a file called ble.log. No value is set for parameter fname in function "debug" so always is creating a file with the same name
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AnthonyKNorman/Xiaomi_LYWSD03MMC_for_HA/issues/4#issuecomment-660861386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV6CXOXSONV3EVN4ICQQW3R4PYRJANCNFSM4O7THGBA .
New version of ble.py uploaded
I uploaded a new ble.py file and now it looks ok. Thanks.
Hello Anthony,
With the latest update the file is created with a filename according to the current date. Despite of this, is needed to purge the logs to avoid the disc full problem.
Thank you.
New version of mqtt.py should clan up after itself,
OK. Try the latest version of ble.py