Imroy / pubsubclient

A client library for the ESP8266 that provides support for MQTT
MIT License
434 stars 115 forks source link

Another OTA Issue #36

Closed brutevinch closed 8 years ago

brutevinch commented 8 years ago

Using last version of lib.

Can't compile example OTA

METEOSTATION.ino: In function 'void receive_ota(const MQTT::Publish&)': METEOSTATION:57: error: 'const class MQTT::Publish' has no member named 'payload_stream' METEOSTATION:58: error: 'const class MQTT::Publish' has no member named 'payload_stream' 'const class MQTT::Publish' has no member named 'payload_stream'

Imroy commented 8 years ago

Sorry, it's been a while since I've made a release/tag. The 'payload_stream' method and OTA example were added since 1.99.1. I've just made a 1.99.2 release which will include everthing you should need.

brutevinch commented 8 years ago

Thanks

brutevinch commented 8 years ago

@Imroy Can you help me with another problem? After update OTA i've got loop.... i think problem in broker but i can't understand it.

Connecting to AirPort Extreme 2,4


WiFi connected Hostname: meteostation.local IP address: 10.0.1.102 Local Pressure: 750.9 Connecting to MQTT server Connected to MQTT server Subscribing to topic ota/10.0.1.102 Receiving OTA of 335312 bytes... Clearing retained message. Update Success: 12115 Rebooting... rm 0 pm close 7 0 0/14577359 del if0 usl sul 0 0

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset load 0x4010f000, len 1264, room 16 tail 0 chksum 0x42 csum 0x42 @cp:0 ld

Connecting to AirPort Extreme 2,4


WiFi connected Hostname: meteostation.local IP address: 10.0.1.102 Local Pressure: 750.6 Connecting to MQTT server Connected to MQTT server Subscribing to topic ota/10.0.1.102 Receiving OTA of 335312 bytes... Clearing retained message. Update Success: 12062 Rebooting... rm 0 pm close 7 0 0/14526063 del if0 usl sul 0 0

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset load 0x4010f000, len 1264, room 16 tail 0 chksum 0x42 csum 0x42 @cp:0 ld

igrr commented 8 years ago

This looks like two successful OTAs to me. What's the issue?

brutevinch commented 8 years ago

@igrr YES but it is in looop!!! I need using device not only update OTA ))))))))))) @igrr Эта хрень бесконечна! )

Imroy commented 8 years ago

Have you only sent the OTA message once? The sketch should be clearing the retained message once it has successfully flashed the new image.

brutevinch commented 8 years ago

@Imroy Yes i sent only 1 message and when i stop mosquito broker problem is gone. i close this issue. i will use igrr ota. Thank you