Can you elaborate on expected and actual behaviors?
It’s turning the lights on each time the gateway reboots?
This would be normal if MQTT messages are published with retain flag as each time gateway reboots is sending the on payload.
Or is it that the lights are on only when pushing the physical remote button/turning on from HA, then off immediately?
If you are using one light and one switch button then you need to have an off command posted in the same topic the on payload is included (something like “13981488off” or “13981489”; it has to be a code that is not posted by a 433 Mhz physical device) - have a look on posting no. 299 that refers to an automation for posting an off payload for PIR sensor. A switch would not need off payload after a certain number of seconds but rather with the next button press should post the off payload (toggle functionality).
Then, what is the functionality for the physical lights relay?
433 Mhz relays have 3 modes of operating: 2 modes (momentarily/doorbell type and toggle with one button remote) and a third one (latched) with two physical 433 Mhz remotes (press button X results in on, press button Y then off).
It’s turning the lights on each time the gateway reboots
I think that retain flag is the reason, what I need is keeping the light as it was, gateway reboot don’t change the status
By the way anyone know which app can make Android phone to ibeacon? I used ibeacon emulator but every restart the app the macaddr change, so I can’t track it in HA through fake HM-10 module
Today the fake HM-10 module cause the nodemcu reboot randomly as @Petrica
So, new issue: Cloning the repo doesn’t seem to bring the required libraries with it. What am I doing wrong here? Do I just have to install each library individually?
The error was “file not found” and I think the file was NewRemoteSensor.h or something.
I just git cloned https://github.com/hjgode/homewatch and moved all the contents of /homewatch/arduino/libraries to my Arduino/libraries folder. That cleared that up.
So I managed to upload it to the Huzzah. My problem now is that I’m not sure which pins I need to use and/or if I need to change one of the RF_RECEIER_PIN values in config_RF.h
I mean, GND and 3V were pretty easy to figure out.
It IS connected to the LAN for sure. So I’ve got that.
I don’t think it will work, you should better download all the libraries located into the libraries folder of openmqttgateway and place them into arduino library folder
Regarding the PIN just follow the documentation, if you don’t use RFM69 or I2C the following wiki doc will help you:
This release add several gateways and sensors to the mix:
RFM69 bidirectional gateway, enable now to talk to moteino and other RFM69 based devices with the RFM69 advantages; long range, acknowledgment, encryption. This gateway is based on the work of @bbx10
I2C sensor support thanks to the work of @hannesdi
Over The Air update thanks to the work of @PatteWi
RF with KAKU protocol supported when sending MQTTtoRF2, thanks to the newremoteswitch library from @fuzzylogic
support now new IRRemote_ESP8266 library 2.x.x
HM-11 is now supported added to HM-10
I divided user_config.h into one config file per gateway/sensor so as to avoid taking all the parameters when using only parts of the gateway
@Petrica im trying to create an automation to there takes sensor state and publish at to mqtt in json format
but i can’t find a way to publish a mqtt message.this will be working?
So I got it working with the Adafruit Feather Huzzah.
Here’s the hitch: I am only using the RF receiver module. No transmitter, no IR, no DHT. Mostly because I don’t have a need for all those other things at the moment, but also because the Huzzah is kind of a strange board. There seems to be no rhyme or reason to the order of the pins. For example, there is a Pin 0 and a Pin 2, but no Pin 1. So I had to comment out the IR component and change the RF_RECEIVER_PIN to 2 instead of 1. That’s the first way I found to make it work, and I stuck with it.
Now my problem is that these cheap door sensors only go one way. How do I reset the state of a binary sensor?
Ah. I was looking at the wrong file, thinking I could do it from configuration.yaml. This makes sense though.
What’s a little weird about this is you can make the exact same payload_off code for each door sensor. Makes it easy to keep track of, I guess. It just seems like it would be a bad idea.
@jxjhheric
In addition to the right message you need to ensure also that posting is made to the correct topic. What type of switches and lights are you using? The topic seems a little confusing as you have named your topic switch and bulb & set and command. Is it the topic for the lights or for the switches?
Try to find what topic and payload combination work from command line then use that for the automation:
mosquitto_pub -h 192.168.x.y -t “wc/switch/bulb/set/command” -m ‘{“id”: “123testid”, “name”: “Test Device”, “distance”: 5.678}’
Use mosquitto_sub to verify what is posted and where (mosquitto_sub -h 192.168.x.y -t “wc/switch/bulb/set/command”). You can also use wildcards (mosquitto_sub -h 192.168.x.y -t “wc/switch/bulb/set/#” or mosquitto_sub -h 192.168.x.y -t “wc/switch/bulb/#”, etc.)
Refer to MQTT component for details on state, command and availability:
Also, a number of changes have been introduced in v.0.52 (refer to Breaking Changes section for MQTT switch in regard of the availability):
@teslas_moustache
You could include it into configuration.yaml but with a large number of components and automation things are going to get really scary. You can create a folder named “automation” inside “.homeassistant” folder. Inside “automation” create files (with “.yaml” extension) where you write each automation. Then in configuration.yaml include the following (make sure all the automation goes to this folder and do not remain inside configuration.yaml as you will get duplicate names): automation: !include_dir_merge_list automation/
Look for splitting other components of the configuration.yaml into smaller parts:
as what you said above ,i try to set when thresholdbtdevice1 sensors is on , mqtt publish {“id”: “123testid”, “name”: “Test Device”, “distance”: 5.678}, so mqtt_room component can tracker my loction
in short ,i want to use ble in opengateway to work with mqtt_room component in ha