JemRF Serial Monitor 2.3.0
Press ctrl-c to exit
01HELLO----
Wed Sep 27 02:04:34 2023 43 AWAKE----
Wed Sep 27 02:04:34 2023 43 TMPA22.19
Wed Sep 27 02:04:34 2023 43 SLEEPING-
Wed Sep 27 02:05:58 2023 84 TMPA22.05
Wed Sep 27 02:05:58 2023 84 SLEEPING-
Wed Sep 27 02:09:46 2023 43 AWAKE----
Wed Sep 27 02:09:46 2023 43 TMPA21.60
Wed Sep 27 02:09:46 2023 43 SLEEPING-
Any ideas as to why this is happening?
Thank you,
Paul
I figured it out. The problem was in the rf2serial.py file. here it's trying to concatenate received data (ser.read()) to the llapMsg variable. In Python 3, you need to make sure that you are working consistently with either bytes or strings. The problem was the following line of code:
llapMsg += ser.read()
I changed to the following:
llapMsg += ser.read().decode(‘utf-8’, ‘ignore’)
Hopefully this helps somebody else. I tested the db and it is storing the data.
Kind Regards,
Paul