433mhz, infrared IR to and from MQTT on ESP8266

Hi @Florian,

Could you also provide a compiled binary for ESP32 dev module? I think that NodeMCU flasher can work also with ESP32.

There are a lot of compiling errors on 0.6 with Arduino 1.8.5.

Thanks

I assume you meant to address @1technophile instead of me :wink:

Right :slight_smile:

Hi there,

I guess I should open another topic, but itā€™s closed related :-). Thanks again @1technophile and contributors to make the code compatible with the esp32. Since Iā€™m mostly interested in BLE the esp32 is perfect. I did the little modification to the advertisedDevice.haveRSSI() so it reports the devices on a room topic and itā€™s working fine with the mqtt_room component.

I know that the code is still in ā€œbetaā€ but I can see that from time to time the esp32 disconnect/connect again to the MQTT. How may I help to debug this (btw, using version 0.6.1)?

Hi,

Could you indicate the following info please:
-time between disconnections
-version of your mqtt broker
-does it disconnect to the wifi also?
-did you experienced mqtt disconnection with another device?

Hello all,
im struggling a strange problem with gatewayā€¦ actually i have 2 problems:
1-when i first starts my nodemcu it will only connect to broker if i open the serial monitor. after connection establish to the broker i can close the Serial mon and it will continue to work as it should.
2-After node establish the connection it will fire the what seems the last command was on memory so every time it start it will trigger my rf relay, if i will restart the broker it will send the last rf command also im using rf433 to mqtt and mqtt to rf433
can anyone point me for a solution?

hi,

Still in the early stages of testing, but at first I was using a Mosquitto version 1.4.8 running on a virtualbox ubuntu 16.04 vm. Now Iā€™m using my ā€œproductionā€ Mosquito (same version) and across the internet and it seems stable. No disconnection oth the wifi was observed before. It seemed to disconnect about once a minute or two.

btwā€¦ Iā€™m using a no-ip domain as my mqtt broker and itā€™s working fine so far.

On a side note, it seems that the esp32 gets a little hot comparing to the esp8266, isnt it?

Hi, could you try some basics config like:
basic pubsub example from pubsubclient library and a local broker

Here my feedback with my DOIT ESP32 board:

  • last ESP32 arduino env sync
  • libraries as stated in the wiki
  • mosquitto v3.1.1 on a local network
  • connected to MQTT via IP adress
  • using RF, RF2 and BT gateways

ESP32 getting tidy I think <30Ā°

Working without disconnection since 1 hour

Hi,

My esp32 is running at 33c, so perhaps itā€™s not that hot :-). The connection with my mqtt server seems somewhat stable. I left it running yesterday and it was ok for about 15hrs and then disconnected and stay offline. My guess is that it couldnt handle the IP change, but not sure. What should happen if you use a FQDN instead of a IP in configuration? Should it try to resolve the name at every connection attempt?

Hi,

really donā€™t know how a FQDN influence this, I searched what it is but donā€™t catch the impact, could you give me some inputs?

Hi,

Sure. What I meant is that I have a dyndns domain so i can access my homeserver from outside using a ā€œFully Qualified Domain Nameā€ (FQDN) which is simple what we know as domain name. So, inside my user_config.h configuration instead of using a ā€œdefine mqtt_server 192.x.x.xā€, I have something like ā€œdefine mqtt_server myhome.homelinux.netā€. The problem with my domain name, is that my dsl ip changes from time to time, so now myhome.homelinux.net may resolve (ā€œtranslateā€) as one ip, and one hour from now, may resolve to another ip.

When the esp32 starts, it resolves the domain to a IP. Later in the day my IP changes and the connection to the MQTT drops. My question is, when this happens, what the device try to do? It try to connect to the same IP as it first resolved or it try to resolve the domain name again?

Hi @clyra,

Do you connect a router behind the xdsl modem?

If not, may I suggest using a DDNS service for internet connection to resolve on your public IP and dnsmasq for resolving to routerā€™s WAN IP connected behind the modem (as most probably the xdsl modem is locked up)? You could do this with basically any DD-WRT compatible router.

Although it ends up in a double NAT environment (and it would be a little more difficult to setup DDNS), you can access the MQTT broker with the same myhome.homelinux.net address on both internet and LAN.

Hi @Petrica

Sorry for my bad englishā€¦ I do have a DDNS service and I can connect from outside (my esp32 is at my workplace).

But Iā€™m trying a new approach now. Iā€™m running a MQTT at the remote location and did a MQTT bridge connection from my lan to this location (there I have a fixed IP). So far so goodā€¦

Iā€™m finally starting to get into this and following the wiki on your github.

I think Iā€™ve got everything sorted out except one thing (so farā€¦). Maybe itā€™s not even an issue.

I keep seeing references to #ifdef related to which module you are using (ESP8266, ESP32 or Arduino).

The only thing I canā€™t find is where the module type is actually defined. Does it automatically figure out what the module is that itā€™s loaded onto or am I missing where itā€™s defined?

Iā€™ve looked and looked and canā€™t find it anywhere.

Hi @finity

The sketch can be used to power up different hardware.

You define specific hardware module in Arduino IDE -> Tools -> Board

I get that but is that the only place that the definition comes from is when you compile it for your specific board?

The definition isnā€™t defined in the actual code?

And while Iā€™m hereā€¦:smiley:

I came up with another question.

I would like to use the gateway for 315mHz stuff too.

Iā€™ve followed the github issues thread and created all the required files and made the changes to the main file.

the only thing there I dont follow is 1technophileā€™s comment here:

I will try first to connect both emitter data pins together. Regarding receiver i think you will have to duplicate the gateway and connect each receiver to different pins; produve several instance of myswitch depending on the pin.

What does he mean by that?

I see in both RF files they use the same pins. I think I can confidently assume that you canā€™t do that (or can you? :thinking:). If not which pins can I use instead?

It will compile depending on your board (and what modules you select in user_config.h) by including only those elements.

Afterwards, you need to pay specific attention to the pins for your actual board.

Alright! Iā€™ll give it a try.

Thanks!

@Petrica

And it seems that we are playing reply leapfrog. :smiley:

Did you notice the post of mine right above your last one about 315mHz stuff?