toblum / McLighting

The ESP8266 based multi-client lighting gadget
MIT License
1.05k stars 289 forks source link

Issues setting up Adafruit_MQTT configuration from wifiManager in Arduino #488

Open Behzad-6-1 opened 4 years ago

Behzad-6-1 commented 4 years ago

I am trying to configure Adafruit_MQTT_Client with value from wifiManager at setup. ` // load json, etc mqtt = new Adafruit_MQTT_Client(&client, mqtt_serv, mqtt_port, mqtt_name, mqtt_pass);

//Set up the feed you're subscribing to openClose = new Adafruit_MQTT_Subscribe(mqtt, mqtt_name );`

with value loading from wifiManager I have tried many ways my last try as above compiler is happy with but now I am stock with another one in my loop

` while ((subscription = mqtt->readSubscription(5000))) { //If we're in here, a subscription updated... if (subscription == &openClose->subscribe)

` exit status 1 'class Adafruit_MQTT_Subscribe' has no member named 'subscribe'

I have tried it with and without &

i am very new on this forum so may not follow all the rules please advise correction.

I can add my code but don't want to make this too long let me know where is the best place to add lengthy codes