On 1/24/19 10:14 PM, RT wrote:
Thanks all this really helps, my toggle / select is a little messy
please don't!
switching the toggle to 1 will:
switching the togglle to 0 will:
and this just accidentally happens to be like that. if you re-paint your patch from an image, it might as well do the following when switching the toggle to 1:
which clearly is just nonsense.
so why are you sending those odd "ON" and "OFF" messages and the beginning? you will also get ugly "already connected" errors, if you switch the device fast enough, so that the webserver has not terminated the connection yet.
the *first* rule you should learn when starting to patch in Pd, is using trigger, whenever you want to connect a single outlet to more than one inlets. everytime. always. every single time. really.
so remove the entire hickhack with your toggle and bang, and replace it by a simple:
[tgl] | [select 1 ] | | [on( [off( | ________/ |/ [symbol] |
then, between [list strip] and [netsend] do the following:
| [list strip] | [t a b] | | | [disconnect, connect 192.168.1.20 80( | ____/ |/ [netsend -b]
this will start a new connection exactly before you are going to send data to the webserver. and it will only send the HTTP-request once (with the correct parameters)
gfnadsr IOhannes