I've made a snippet to connect to a remote mqtt server that I do not administrate, I know the Java message is accepted but the python message isn't. Any idea? I'm not familiar with python byte stuff.
I do JSON > byte stuff
In Java I can send a message with payload in byte or bytearray
But in Python, the message is received but the admin report broker error
`b'{\n "subject": "subject1",\n "date": "Wed, 17 Feb 2021 13:27:32 +0100"\n}'` to topic `testtopic/testchannel`
abc being my json.
>>> 'abc'.encode('utf-8') b'abc'
>>> bytearray('abc', 'utf-8') bytearray(b'abc')
400 Bad Request: [{"error":"BadRequest","description":"date has invalid format"}]
python3: bytes vs bytearray, and converting to and from strings