MQTT for the android app

Started by Graham, January 27, 2019, 03:50:42 PM

Previous topic - Next topic

Graham

ok thanks Matt,

I updated github with that change
let me know your github username and I'll add you as a collaborator
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

mcsarge

mcsarge is my GitHub user.

I have changes for the size of the stored port as well. I would also like to look into storing either a URL or an IP for the Classic. When I use ngrok to get port 502 from out behind the cellular system firewall, I get an address like tcp://0.tcp.ngrok.io:12345" and the host IP is dynamic so I can look up the IP for the host but it changes.

Matt
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

Graham

I invited you as a collaborator to the ClassicMQTT repository

+ I re-added the support for blynk and a few other fixes so you'll have to do a pull to sync my updates

Are you planning to put the ESP on the same local network as the classic so you won't have to port forward 502?

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

mcsarge

Graham,

Ultimately, I might put the ESP in the same network, but right now the island is under a few inches of snow and ice locked so nobody is getting to it until Spring. To be honest, I will probably take the code for your esp and convert it to a python app to run on my Raspberry Pi which is local to the Classic and already internet connected and it will post to my server on Azure or to a Mosquitto install on my local Pi - not sure yet, but i do not want to use a ton of data up on my cellular connection keeping the MQTT updated off-island.

Matt
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

mcsarge

Hey Graham,

I am trying to build the Classic MQTT on an Adafruit ESP32 Feather - which is just an ESP32 board and I keep getting some errors in Platformio which seem to indicate that there is a mismatch in libraries. Have you seen this before? Any suggestions?

.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp: In member function 'bool AsyncClient::connect(IPAddress, uint16_t)':
.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp:115:8: error: 'ip_addr_t {aka struct ip_addr}' has no
member named 'addr'
   addr.addr = ip;
        ^
.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp: In member function 'bool AsyncClient::connect(const char*, uint16_t)':
.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp:148:35: error: 'ip_addr_t {aka struct ip_addr}' has no member named 'addr'
     return connect(IPAddress(addr.addr), port);
                                   ^
.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp: In member function 'bool AsyncClient::operator==(const AsyncClient&)':
.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp:192:66: error: 'ip_addr_t {aka struct ip_addr}' has no member named 'addr'
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

Graham

Quote from: mcsarge on February 18, 2020, 05:00:40 PM
Hey Graham,

I am trying to build the Classic MQTT on an Adafruit ESP32 Feather - which is just an ESP32 board and I keep getting some errors in Platformio which seem to indicate that there is a mismatch in libraries. Have you seen this before? Any suggestions?

.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp: In member function 'bool AsyncClient::connect(IPAddress, uint16_t)':
.pio\libdeps\featheresp32\ESPAsyncTCP_ID305\src\ESPAsyncTCP.cpp:115:8: error: 'ip_addr_t {aka struct ip_addr}' has no
...

ESPAsyncTCP is a dependant of AsyncMQTTClient

here are the versions that platformIO uses on my system (attached image)
if you look your libdeps folder, do you have the same?
have you changed the platform.ini board or platform
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

mcsarge

Graham,

In my lib_deps I just have the library names, I did not use specific versions, I will change to use the versions and I am sure that will fix it.

Many thanks,

Matt
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

Graham

Quote from: mcsarge on February 19, 2020, 07:48:58 AM
Graham,

In my lib_deps I just have the library names, I did not use specific versions, I will change to use the versions and I am sure that will fix it.

Many thanks,

Matt

hmm, I didn't have to specify the versions, I just deleted everything under .pio\libdeps\esp32dev then clicked build
build output attached
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

mcsarge

I did the same thing a couple of times and still get build problem. Maybe I have a library installed that is over-riding the most recent version of a library or something. I will give it another go.

Matt
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF