I think you would have better battery life with moteinos but i need some input about zwave battery life before confirming that.
Regarding the 0.4 you can add a dht with i2c if you connect it to D5 you will have to change the pin definition into the program. It is not available by default due to the fact that with i2c you can plug temperature sensor or other sensors to the bus.
Is there any wireless, independent (433 Mhz) LDR sensor?
For temperature and humidity there are weather station remotes on 433 Mhz, however for LDR I haven’t seen a similar solution.
I would be reluctant in placing a NodeMCU in environments with high temp, high moisture (such as in a bathroom). Even with DYI waterproofing I’m not comfortable with cables carrying more than 5V (there was also that guy who got electrocuted in the bathroom when using the iPhone charger).
Hi,
i have problem with 433toMQTT with NodeMCU,
i have MQTT communication between HA and the Node, but for some reason there is no rf signal receive or transmit from the Node…
HI,
i managed to solve this issue, now i can get the MQTT massage via mosquito but i didn’t succeed with configuration it to trigger event in HA.
my goal is to make an rf wall switch to trigger rf relay and to show status of the relay in the UI,(i know all about the un reliable with rf status…)
i managed to control the relay via HA with MQTT. but this is where im stuck at…
I have been using this project for some time, fantastic bit of kit. I do have an issue however.
I have recently added 3 door sensors that send both open, and closed codes. That part works perfectly. The issue is when HA is restarted, if a door is open, it will revert back to closed on reboot. The open status does not seem to be retained.
This is the binary_sensor I have set up for one of the doors.
- platform: mqtt
name: "Front Door"
qos: 1 # I have tried 0 for this as well
state_topic: "home/433toMQTT"
payload_on: "12510986"
payload_off: "12510990"
device_class: door
retain: true
I have even tried using an automation to publish the state on change to attempt to have it retained, no joy.
- alias: Set State of Front Door
trigger:
platform: state
entity_id: binary_sensor.front_door
to: 'on'
action:
service: mqtt.publish
data:
topic: 'home/433toMQTT'
payload: '12510986'
retain: true
There is nothing wrong with your settings. OpenMQTT is set to publish without retain flag.
Your automation to publish the state is on the wright track, however you might want to use another topic for publishing in order not to get confused as the home/433toMQTT gets overwritten each time a new message is received (and it is not retained, thus when restarting HA it is blank). There are a few components that support restore state however binary sensor is not among them.
- alias: Set State of Front Door on
trigger:
platform: state
entity_id: binary_sensor.front_door
to: 'on'
action:
service: mqtt.publish
data:
topic: 'home/devices/frontdoor'
payload: 'on'
retain: true
- alias: Set State of Front Door off
trigger:
platform: state
entity_id: binary_sensor.front_door
to: 'off'
action:
service: mqtt.publish
data:
topic: 'home/devices/frontdoor'
payload: 'off'
retain: true
and then the binary sensor (the one that you have would become an intermediate sensor and you can hide it from HA):
- platform: mqtt
name: "Front Door Modified"
qos: 0
state_topic: 'home/devices/frontdoor'
payload_on: "on"
payload_off: "off"
device_class: door
Actually, you can use a single automation in order to reduce number of entities managed by HA (as the trigger would look for changes in the binary sensor or not set an intermediate binary sensor after all, but in this case it needs the condition part to look for either payloads on or off - 12510986 or 12510990). Are you comfortable with that?
@Petrica Thanks for the reply. I had assumed that the retain flag wasn’t being sent. This is something that would be very beneficial to be added in, however.
I will adjust my automation and see how I go. Thanks again.
@Petrica I think I have it sorted, thanks for the suggestions. Here is my config, just using one door sensor as an example. I have a single automation covering all the open/close events for all 3 doors (I think)
Except you would need to change the other two mqtt binary sensors to monitor “home/door” topic too. There is no need for any binary sensor to monitor “home/433toMQTT” topic anymore (you end up with one automation as the sole overhead).
Yes, I have all 3 doors using the /home/door topic, I think that is what you mean?
The problem now is I need to write an automation to have the home/433toMQTT binary sensor grab the state of the /home/door binary sensor as when I reboot twice, the state is lost again as the 433toMQTT binary sensor resets at boot. I hope that makes sense.
But again, this is a quick and dirty fix (the downside is that if the doors are opening/closing while HA is restarting then the state will be in topic “home/433toMQTT”; because automation is not working until HA is up again the topic “home/door” is not being updated).
The best way would be to have OpenMQTT publishing with Retain flag (and thus to have binary sensors monitor “home/433toMQTT” again).