433toMQTTto433 Bidirectional Arduino Gateway

No its not just username and pwd is used

when you said you tried from windows, is your broker on the same PC in windows, or is it a different pc?

i have configured it on rpi using home-assistant

Did you check that there is no iptables config blocking new IP?

I am troubleshooting it now

You can try setting the ip of your pc for the OpenMQTTGateway I will confirm or exclude this hypothesis

Got it workingā€¦ My bad had to give manuall ip as i was not using DHCP. Thanks for the help :slight_smile:

great, enjoy!

Do we have to change the topics also in user_config.h. I am getting output for serial monitor like -

.
WiFi connected
client mqtt not connected, trying to connect
Attempting MQTT connectionā€¦
connected to MQTT broker
subscription OK to the subjects defined

not like - arduino ā€œconnectedā€ & ā€œsubscription OK to home/MQTTto433/ā€ and nothing coming up more on serial monitor

No need to change the topic in user_config.h.

What are you testing, IR, RF or BLE?

i am testing RF only

ok did you try to publish to home/MQTTto433 topic

mosquitto_pub -t home/commands/MQTTto433 -m 1315156

as stated on the guide:

This is the output i am getting. Maybe problem is with RF transmitter and receiver but i was using same on RPi with command line in HA. I have double checked the connection with nodemcu. Using pin d1 and d2. Now LWT is also showing offline

You have to remove the / after MQTTto433 as the example
mosquitto_pub -t home/commands/MQTTto433 -m 1315156

so as to have more details subscribe also to :
sudo mosquitto_sub -t home/# -v

You will see the topics on which you are publishing.

Please note that you are on the thread of the arduino gateway, as you are using a nodemcu I advise to post your questions on the dedicated thread.

Oh i didnā€™t noticed. I will check and report on the other post :slight_smile: Thanks

@Partybug this config you have here, is this for a switch or binary sensor or ? I canā€™t seem to get this to trigger when the pir sends itā€™s payload so i went to use a trigger in the automation but i rather have this defines separately.

Hope to hear from you,

thanks
/donnib

Had to re-read the forum. I posted several configs. All of them are for etekcity switches except for the doorbell. I do have a pir sensor in my office now and I use it to turn on one etekcity switch and a philips hue light in the ceiling. The pir sensor is a compatible one listed in this forum so it sends a 433mhz code to the gateway for MQTT.

Hereā€™s my trigger section of my config for the pir. You will have to set up your automation scripts which are covered in another forum. Hope this helps. :slight_smile:

  - alias: OfficePres
    trigger:
      platform: mqtt
      topic: home/433toMQTT
      payload: '30###07'
    action:
      - service: script.turn_on
        entity_id: script.officemot
      - service: automation.turn_off
        entity_id: automation.officepres
      - delay: 
          minutes: 2
      - service: automation.turn_on
        entity_id: automation.officepres   

The pir sensor sends multiple instances of the same code in rapid succession. So I turn this script above (script.officepres) off for 2 minutes before I want to see the next motion. The script.officemot will turn off the light automatically after 10 minutes passes. If there is motion every 2 minutes - the timer is reset. Occasionally the lights turn off if Iā€™m reading a long forum post and forget to move. :slight_smile: You canā€™t perfect everything. :slight_smile:

Good Luck - Partybug

that is great, good job @partybug, i am very interested turn on tekcity when i seat on my chair.
did you use any occupancy sensor ? chair or bed? i would like use that, but i dont find any configuration to use a esp and mqtt. i find one solution, but use mysensors,and i dont want do build other gateway.

I never even heard of an occupancy sensor. What a great ideaā€¦ Do they exist?

they exist, but if i understood correctly they are expensive unless you create them yourselve.

here is a video how to create bed occupancy sensor