You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I finally got the connection to my Home Assistant MQTT broker to work, but I had to add a MQTT-user and a password (see blue marking) in order to connect.
While trouble shooting I added the two lines in yellow in order to make thing easier.
The next hurdle I cant get my head around is a "NoneType" error message. Since the Pico isn´t connected to any HAN-meter I don´t understand the issue since there will not be any characters on the UART ... or what am I missing?
The text was updated successfully, but these errors were encountered:
I think you have to connect your Pico to a HAN port/serial port to use uart.readline() successfully using your code, otherwise there will be a timeout, see this query and its answers. Based on that I use this code in my Pico to read lines from the HAN port:
Tip: During development or testing, i.e. when the Pico isn't connected to a HAN port, you can fake a port using a text file instead as shown in the code below:
When using the faked port, i.e. when using the uart file object, you can use the same code to read lines from the file as used when reading lines from the HAN port. I use this text file to fake the port, test_data.txt
I finally got the connection to my Home Assistant MQTT broker to work, but I had to add a MQTT-user and a password (see blue marking) in order to connect.
While trouble shooting I added the two lines in yellow in order to make thing easier.
The next hurdle I cant get my head around is a "NoneType" error message. Since the Pico isn´t connected to any HAN-meter I don´t understand the issue since there will not be any characters on the UART ... or what am I missing?
The text was updated successfully, but these errors were encountered: