Wait, scratch my latest comment. My Pi changed IP addresses so I had to update the config file. It’s in a bit of a goofy state now due to these index out of range errors.
By the way, can you help me understand your code a bit better. When I do a view source I’m not able to easily see what gets run when I click various buttons. If I could see that I’d be able to trouble shoot much more quickly and even propose some changes myself.
To clarify, if I could easily tell that when you clicked a certain button in your UI you’d call http://IP_ADDR/sn1=1 that would be a big help. I must be missing something obvious but I’m just not seeing that in the source.