Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5610

MicroPython • Re: [Solved] MQTT on Pico W with broker on Pi - How to connect to broker ?

$
0
0
I see this is marked as solved, so my remark is probably not relevant. But when I connect to my mqtt broker then I can use the pi 's hostname instead of the ip address. Perhaps this is router dependant I'm not an expert in this, but the following ways of assigning the broker address both work. The hostname will not change (unless its manually changed of course) whereas the ip address may vary unless fixed ip addresses are used.

# mqtt server
config['server'] = '10.0.1.37' # ip address
config['server'] = 'P5-dorky' # pi5 hostname

Statistics: Posted by SirFico — Tue Jul 23, 2024 2:38 pm



Viewing all articles
Browse latest Browse all 5610

Trending Articles