PubSubClient and AndroidJSON

The problem should be obvious from the error message. You can't use a String as the pin argument to digitalWrite(). If you insist on using String then you will need to use toInt() to convert it to an integer. See: