private void updateButton(){
        if(state==oldState) return;
        oldState=state;
        //System.out.println("St"+ state);
        SwingUtilities.invokeLater(() -> {
            if((state&0b00001000)!=0 && (state&0b00000010)==0){ //Fail & auto
                toiletButton.setBackground(new Color(255, 47, 252));
                toiletButton.setText("<html><p style=\"font-size: 16\">" +
                        "Failure binding port 2302<br>" +
                        "Remote control unavailable<br>" +
                        "Left click for local control</p></html>");
            }
            else if((state&0b00000100)!=0 && (state&0b00000010) == 0 ){ //Not init & remote ctl
                toiletButton.setBackground(new Color(154, 154, 154));
                toiletButton.setText("<html><p>Waiting</p><p style=\"font-size: 16\">Remote control</p></html>");
            }
            else {
                String s = "<html><p>";
                if ((state & 0b00000001) != 0) {
                    toiletButton.setBackground(new Color(255, 134, 137));
                    s+="ONE OUT";
                } else {
                    toiletButton.setBackground(new Color(134, 255, 136));
                    s+="ALL IN";
                }
                s+="</p><p style=\"font-size: 16\">";
                if((state&0b00000010) != 0 ){
                    s+="Local control";
                }else{
                    s+="Remote control";
                }
                s+=remoteID+"</p></html>";
                toiletButton.setText(s);
            }

        });
    }