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:
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?
When I omport your flow and add a inject node sending a numeric 1 to it, it opens the google page.
Are you sure you are sending a numeric 1 and not a string 1 to the function? Add a debug node to the optput node that is sending to the function node. That way you will see the data being sent.