Tested version of HM10 firmware V545, V549, v550 (V533 doesn’t work) To check your hm10 firmware version upload a serial sketch to the nodemcu (this will enable to talk directly to the hm10) and launch the command: AT+VERR?
First of all, I don’t understand it. What is serial sketch? Where to find it? How to launch the command AT+VERR? Where to launch it? Sorry, still learning.
@masterkenobi, no problem. Been there, done that :-). Since I have a FTDI, i just plugged the hm-10 direclty to my computer and then lauch the arduino IDE and choose the “monitor serial” under tools menu. From this window you should choose the 9600 BAUD and should be able to send the AT commands. I guess you can do the same with the said “serial sketch” and in this case your nodemcu will work as the serial interface. You should also try to identify if your Hm-10 is a genuine one or a clone (mine was a clone). The clone has different AT commands. Try the “AT+NAME” or “AT+NAME?” commands too.
After I plug in the FTDI to my PC, I open up the Serial Monitor. The only place I could input anything is the field on the top. I have entered AT+VERR, AT+NAME or AT+NAME? in the field and click send. Nothing appear in the monitor
Check if the speed is right (should be 9600), and try the line-ending settings (CR+LF, LF, no ending). Ah… i guess so, but just asking: did you selected the right port on tools menu?
It seems you have a clone :-(. Try: AT+ROLE1 and then AT+DISC?. Then the hm10 should report what it find. If you got yourself this deep, you may want to look on the “433mhz, infrared IR to and from MQTT on ESP8266” thread. @1technophile told me how to reflash the hm-10 so you turn a clone in to a “original” hm-10
Thanks. I’m wondering where to buy the genuine HM10 or 11? I’m going to build around 9 gateways. Reflashing the firmware sounds like too much trouble for me.
I’m unsure whether this is genuine or not however I’ve received it yesterday (it comes with v545) and I replaced the clone with this one so I didn’t need to solder anything on this one. So far, so good. I haven’t got any MQTT reset. The “genuine” board has a black PCB instead of blueish/azure on the clone however I really don’t think this is the only difference (and it is also 3/4 times more expensive than the clone )
May I ask what you plan to use the BT gateway for? If planning to use it for lights then it might be too lazy (there is a 10 second interval between scans which could be reduced however not below a reasonable threshold to be used with turning lights on). We have described several limitations to using BT gateway:
Thanks. I plan to use it as room presence detector similar to Happy Bubbles so that when it detects no one in the room, it will trigger the automation to turn off lights and fans. It will solve the problem where lights would turn off if someone stay still for too long in a room. For turning on things, I feel motion sensor is more suitable. Anyway thanks for the link. I will purchase this and give this project another chance.
If finding yourself in the dark is the problem, I would suggest adjusting the automation that takes care of the light in order to reset the timer each time a new movement is recorded (thus the light won’t turn off after 5 minutes since PIR was triggered for the first time when entering the room but rather 5 minutes after last PIR trigger in the respective room).
I can provide the configuration. I employ:
i) several automation that are also dependent on the sun (above/below horizon), on the light switches state and the light level in the room (i.e when blinds are shut);
ii) scripts, used for triggering the lights on and for resetting the one responsible for turning on; and
iii) input sliders (in order to control the various properties of the light bulbs).
I started with several automation that called different scenes however in scenes I couldn’t use input sliders as values for color codes or temp color so I moved to scripts.
thanks for your suggestion. I think my automation for lights is similar with yours. I believe you need to move around within 5 minutes otherwise the lights will turn off. Also, when everyone has left the room, the lights will remain on for at least 5 minutes. To reduce false positive, you can increase the timer to longer duration, but that also means the lights will remain on longer after everyone has left the room.
I believe BLE room presence tracker will solve this problem. The lights will automatically turn off immediately when no one is in the room or someone can sleep peacefully with the fan on without worry the fan would turn off by itself.
Also I plan to create an automation with personalize greeting to every occupants when they walk into the living room every morning.
Anyway, I have ordered the new BLE modules and it will take at least a month to reach me. While waiting for this, I plan to troubleshoot problem with the BH1750 light sensors. Anyone knows why it fails to read from LightSensor BH1750?
I’ve mentioned 5 minutes only as a reference value :slight_smile for the resettable script.
I have different settings (RGB/CT), light intensity and timers (15/5/1 minutes) for: day (above_horizon), sunset to midnight (after: sunset) and midnight to sunrise (before: sunrise). Also, I use 433 wall switches which have different timers (1 hour during day, 15 min after sunset). And switches override PIR sensors.
I found that using 2 PIR sensors in each room helped covering all the blind spots so each time a movement is recorded the timer is reset by either unit.
BLE room presence has the disadvantage that the person must carry the token all the time (while for PIR the person is the token). This is not really convenient while at home as the phone/keys might be left in another room and the lights would stay on in that room even if there is no movement; although would help to know where the token (keys/phone) was left. Obviously, if used for tracking, the phone requires having BT on and not associated to any device.
I use Tile for finding devices associated with a tablet and my secondary phone so that I can find them regardless of location. Usually the secondary phone has BT off and when I arrive home the Tile on the keychain is not associated, so it would be picked up by the BT Gateway. After arriving home, the Tile connects to the tablet so that I can use it for finding the keys or the wallet.
In regard of the light sensor, the last beta of OpenMQTT introduced also the ADC reading so that cheap LDR sensors (coupled with 1K resistor) could be used on the A0 pin.
I don’t know what the battery drain might be when it would permanently scan for the phone to connect to as compared to the case when it is connected 24/7.