Esp8266 + hm10 + dht22

Hmm,

You should see some informations regarding the setup of the gateway before having 9.8s of uptime.
Typicaly OMG will say what was setup.

Like this:

⸎*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] .
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS
*WM: [1] STA IP Address: 10.0.0.XX
connected…yeey :slight_smile:
saving config
{“mqtt_server”:“X.X.X.X”,“mqtt_port”:“XX”,“mqtt_user”:“XX”,“mqtt_pass”:“XX”,“mqtt_topic”:“home/”,“gateway_name”:“OpenMQTT”}OpenMQTTGateway mac:
XX:XX:XX:XX:XX:XX
OpenMQTTGateway ip:
10.0.0.XX
XX
Connecting to MQTT by IP adress
X.X.X.X
BLEinterval btw scans
55555
Minrssi
-100
ZgatewayBT HM1X setup done
MQTT_MAX_PACKET_SIZE
1024
Setup OpenMQTTGateway end
MQTT connection…
Connected to broker
Subscription OK to the subjects
omgStatusDiscovery
Pub json discovery into:
homeassistant/binary_sensor/ECFABC5EDA12/config
{“stat_t”:“home/OpenMQTT/LWT”,“name”:“OpenMQTTGateway_ESP8266_BLE”,“uniq_id”:“ECFABC5EDA12”,“dev_cla”:“connectivity”,“pl_on”:“online”,“pl_off”:“offline”,“pl_avail”:“online”,“pl_not_avail”:“offline”}
Pub json discovery into:
homeassistant/switch/ECFABC5EDA12restart/config
{“stat_t”:“home/OpenMQTT/LWT”,“name”:“restart OMG”,“uniq_id”:“ECFABC5EDA12restart”,“pl_on”:“{"cmd":"restart"}”,“pl_avail”:“online”,“pl_not_avail”:“offline”,“cmd_t”:“home/OpenMQTT/commands/MQTTtoSYS/config”,“device”:{“name”:“OpenMQTT”,“manufacturer”:“OMG_community”,“sw_version”:“v0.9.3”,“identifiers”:[“ECFABC5EDA12”]}}
Pub json discovery into:
homeassistant/switch/ECFABC5EDA12erase/config
{“stat_t”:“home/OpenMQTT/LWT”,“name”:“erase OMG”,“uniq_id”:“ECFABC5EDA12erase”,“pl_on”:“{"cmd":"erase"}”,“pl_avail”:“online”,“pl_not_avail”:“offline”,“cmd_t”:“home/OpenMQTT/commands/MQTTtoSYS/config”,“device”:{“name”:“OpenMQTT”,“manufacturer”:“OMG_community”,“sw_version”:“v0.9.3”,“identifiers”:[“ECFABC5EDA12”]}}
gatewayBTDiscovery
CreateDiscoverySensor
gatewayBT
Pub json discovery into:
homeassistant/sensor/ECFABC5EDA12gatewayBT/config
{“stat_t”:“home/OpenMQTT/BTtoMQTT”,“name”:“gatewayBT”,“uniq_id”:“ECFABC5EDA12gatewayBT”,“val_tpl”:“{{ value_json.id }}”,“device”:{“name”:“OpenMQTT”,“manufacturer”:“OMG_community”,“sw_version”:“v0.9.3”,“identifiers”:[“ECFABC5EDA12”]}}

Role is 0 = Slave or Peripheral
AT+IMME = 0 (Connect immediately (assuming a previous connection has been applied)

Yes perfect

We can see here that the HM10 setup worked

As HM10 firmware V707 is quite new, it is possible that it has some compatibility issues and it doesn’t respond to scan command. Could you try with v609 please?

In particular this:

V700
-Default baud rate change to 115200
-Removed AT+ANCS command
-Removed AT+COMP command
-Removed AT+128B command
-Added new function used to support different brand BLE device
-Added AT+FINDSERVICES? command
-Added AT+FINDALLCHARS? command
-Added AT+NOTIFY_ON command
-Added AT+NTOIFYOFF command
-Added AT+READCHAR command
-Added AT+CHAR command
-Added AT+READDATA command
-Added AT+READDESC command
-Added AT+SEND_DATA command

The baud rate for HM10 serial communications used by OMG is 9600 you can also try to set it to 115200.

I will try v609, tried to change the baud rate but no succes

Edit: after flash:

⸎*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] . 
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS 
*WM: [1] STA IP Address: 
connected...yeey :)
saving config
{"mqtt_server":"","mqtt_port":"","mqtt_user":"","mqtt_pass":"","mqtt_topic":"home/","gateway_name":"OpenMQTT"}OpenMQTTGateway mac: 

OpenMQTTGateway ip: 

Connecting to MQTT by IP adress

BLEinterval btw scans
55555
Minrssi
-100
ZgatewayBT HM1X setup done 
MQTT_MAX_PACKET_SIZE
1024
Setup OpenMQTTGateway end
MQTT connection...
Connected to broker
Subscription OK to the subjects
omgStatusDiscovery
Pub json discovery into:
homeassistant/binary_sensor/ECFABC5EDA12/config
{"stat_t":"home/OpenMQTT/LWT","name":"OpenMQTTGateway_ESP8266_BLE","uniq_id":"ECFABC5EDA12","dev_cla":"connectivity","pl_on":"online","pl_off":"offline","pl_avail":"online","pl_not_avail":"offline"}
Pub json discovery into:
homeassistant/switch/ECFABC5EDA12restart/config
{"stat_t":"home/OpenMQTT/LWT","name":"restart OMG","uniq_id":"ECFABC5EDA12restart","pl_on":"{\"cmd\":\"restart\"}","pl_avail":"online","pl_not_avail":"offline","cmd_t":"home/OpenMQTT/commands/MQTTtoSYS/config","device":{"name":"OpenMQTT","manufacturer":"OMG_community","sw_version":"v0.9.3","identifiers":["ECFABC5EDA12"]}}
Pub json discovery into:
homeassistant/switch/ECFABC5EDA12erase/config
{"stat_t":"home/OpenMQTT/LWT","name":"erase OMG","uniq_id":"ECFABC5EDA12erase","pl_on":"{\"cmd\":\"erase\"}","pl_avail":"online","pl_not_avail":"offline","cmd_t":"home/OpenMQTT/commands/MQTTtoSYS/config","device":{"name":"OpenMQTT","manufacturer":"OMG_community","sw_version":"v0.9.3","identifiers":["ECFABC5EDA12"]}}
gatewayBTDiscovery
CreateDiscoverySensor
gatewayBT
Pub json discovery into:
homeassistant/sensor/ECFABC5EDA12gatewayBT/config
{"stat_t":"home/OpenMQTT/BTtoMQTT","name":"gatewayBT","uniq_id":"ECFABC5EDA12gatewayBT","val_tpl":"{{ value_json.id }}","device":{"name":"OpenMQTT","manufacturer":"OMG_community","sw_version":"v0.9.3","identifiers":["ECFABC5EDA12"]}}

Still nothing

Uptime (s)
120
{“uptime”:120,“freeMem”:38144,“rssi”:-58,“SSID”:“VFNL-C9D1E0_ub”,“ip”:“10.0.0.55”,“mac”:“EC:FA:BC:5E:DA:12”,“modules”:“BTHADiscovery”}Pub json into:
home/OpenMQTT/SYStoMQTT
{“uptime”:120,“freeMem”:38144,“rssi”:-58,“SSID”:“VFNL-C9D1E0_ub”,“ip”:“10.0.0.55”,“mac”:“EC:FA:BC:5E:DA:12”,“modules”:“BTHADiscovery”}
Uptime (s)
240
{“uptime”:240,“freeMem”:38144,“rssi”:-58,“SSID”:“VFNL-C9D1E0_ub”,“ip”:“10.0.0.55”,“mac”:“EC:FA:BC:5E:DA:12”,“modules”:“BTHADiscovery”}Pub json into:
home/OpenMQTT/SYStoMQTT
{“uptime”:240,“freeMem”:38144,“rssi”:-58,“SSID”:“VFNL-C9D1E0_ub”,“ip”:“10.0.0.55”,“mac”:“EC:FA:BC:5E:DA:12”,“modules”:“BTHADiscovery”}

you mean nothing new with v609?

Yes, last logs are from v609

And can you confirm that the HM10 is set to 9600bps?

Yes

I will test with v609 on my setup to see how it behave.
My current setup is with an older hm10 firmware version.

Did you manage to find a issue/solution?

i didn’t had the time to test it yet

After some searching it appears that my nodemcu doesn’t read the serial port with the HM10 when the speed is at 115200. This speed is too high for software serial.
If I change the speed of the HM10 to 9600 (AT+BAUD0), OpenMQTTGateway detects the BLE devices correctly with firmware v707.

Ok, I give it a try soon

I did not try and switched to Tasmota. That works.

Thanks anyway

That’s a pity :frowning:

For your info the BLE gateway has just been refactored, it will be now easier to maintain and this way I will continue to add BLE devices with service data fast.
And provide an extensive list of compatible BLE devices. As far as I know the biggest one :slight_smile: