I have a little problem and also a solution but it doesn't work.
I want to open a URL like www.google.com when a Raspberry Pin was set by a motion detector (for example). The GPIO Pin is connected to the function and I can see over the debug window that a 1 (number / not string) comes out.
I wrote a Python function like this:
if (msg['payload'] == 1):
I also can see that the if condition was true because when I write something like "abc" inside a failure occurs when the motion sensor was set.
It seems that the function webbrowser.open_new_tab('...') simply doesn work. Do you know why? Is there another solution for this problem? Perhaps with an Java function?