Anyone using ESPEasy with Home Assistant?

If so, could you please paste your config? https://github.com/ESP8266nu/ESPEasy

Check out this one: https://community.home-assistant.io/t/espeasy-firmware/593

Thanks. I had seen that. The problem was, you need to configure a switch (input) to allow ESPEasy to publish a topic regarding its state. I did this and it worked by calling the switch ‘relay’ and its value as ‘state’. You then get messages published to {devicename}/relay/state which is great.

Problem was, the message did not contain the retain flag so it HA rebooted, the switch (relay) would always return to off and HA would not know its state until it changed.

I posted this flaw on the ESPEasy forums and the developer pushed out a new build (R121) that has a global ‘retain flag’ option under advanced > tools. I tested this last night and this works a treat.

I’ve complied an OTA bin file for Sonoff (1024) and NodeMCU (4096) so you can quickly upgrade your ESPEasy install with the web browser. If anyone would like to try it, let me know.

Hi xbmcnut,

I’m new to Home Assistant, but have been playing with espeasy with both sonoff and NodeMCU, and im trying to get HA to see my sonoff’s… So i would very much like to try your firmware files :slight_smile:

Regards,

Jan

Sure. I’ve tested them both with Sonoff (1M) and NodeMCU (4M) boards. Simply upload to the boards using the web interface.

ESPEasy R121 1M Sonoff file
ESPEasy R121 4M NodeMCU file

Hi xbmcnut,

I got it uploaded to my sonoff, setup goes fine, but it connects to my wifi and 1-2 seconds after it disconnects. I never had this issue with espeasy R108… The 3 connect/disconnect, i was in the setup and choosed my wifi and credentials… Have you seen that with your sonoff’s?

I’ll try to total erase the esp and reflash your code onto it again…

Regards,

Jan

WD : Uptime 0 ConnectFailures 0 FreeMem 25552
WD : Uptime 1 ConnectFailures 0 FreeMem 19032
WD : Uptime 1 ConnectFailures 0 FreeMem 17552
WIFI : Connecting… 1
WIFI : Disconnecting!
WD : Uptime 2 ConnectFailures 0 FreeMem 17112
WD : Uptime 2 ConnectFailures 0 FreeMem 17232
WD : Uptime 3 ConnectFailures 0 FreeMem 16328
WIFI : Connecting… 1
WIFI : Disconnecting!
WD : Uptime 3 ConnectFailures 0 FreeMem 14048
WIFI : Connecting… 1
WIFI : Disconnecting!
WD : Uptime 4 ConnectFailures 0 FreeMem 17800
WD : Uptime 4 ConnectFailures 0 FreeMem 17576
WD : Uptime 5 ConnectFailures 0 FreeMem 17096
WD : Uptime 5 ConnectFailures 0 FreeMem 9656
WD : Uptime 6 ConnectFailures 0 FreeMem 5448

Exception (28):
epc1=0x4000bf0e epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3fff3310 end: 3fff35f0 offset: 01a0

stack>>>
3fff34b0: 3ffe0030 3fff1650 3fff1650 40223033
3fff34c0: 3fff1efc 3fff1650 3fff3540 40223892
3fff34d0: 3fff1efc 3fff1650 3fff162c 402205d3
3fff34e0: 00000000 0000009f 0000009f 3fffbec4
3fff34f0: 0000007f 00000023 3fff7ed4 0000000f
3fff3500: 0000000f 3fffc6fc 0000005c 3fff042c
3fff3510: 3fff685c 0000000f 00000000 3fff6844
3fff3520: 0000000f 00000000 00000000 00000000
3fff3530: 00000000 3fff79bc 0000000f 00000003
3fff3540: 3fffbd1c 0000019f 00000034 4021d5a4
3fff3550: 3fff166c 3fff25c8 3fff79bc 00000000
3fff3560: 00000000 4021e3e0 0000000f 40224cd8
3fff3570: 00000000 00000000 3fff162c 3fff25c8
3fff3580: 0000053a 3fff1650 3fff162c 4021f40b
3fff3590: 3ffe9918 00000000 000003e8 4021e2a5
3fff35a0: 00000000 3fff5914 3fff042c 402244f8
3fff35b0: 3fffdad0 00000000 3fff042c 40204062
3fff35c0: 00000000 00000000 3fff042c 40216714
3fff35d0: 3fffdad0 00000000 3fff25c2 402244cc
3fff35e0: feefeffe feefeffe 3fff25d0 40100718
<<<stack<<<

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
áªU
INIT : Booting Build nr:121
WIFI : No SSID!
INIT : I2C
INIT : Boot OK
INIT : Normal boot
WD : Uptime 0 ConnectFailures 0 FreeMem 26808
WD : Uptime 1 ConnectFailures 0 FreeMem 26776
WD : Uptime 1 ConnectFailures 0 FreeMem 26744
WD : Uptime 2 ConnectFailures 0 FreeMem 26712
WD : Uptime 2 ConnectFailures 0 FreeMem 26680
WD : Uptime 3 ConnectFailures 0 FreeMem 26648
WD : Uptime 3 ConnectFailures 0 FreeMem 26632
WD : Uptime 4 ConnectFailures 0 FreeMem 25456

Hi xbmcnut,

Yep that help to erase the esp and reflash :slight_smile:

WD : Uptime 0 ConnectFailures 0 FreeMem 21240
WIFI : Connecting… 1
WIFI : Connected!
WD : Uptime 1 ConnectFailures 0 FreeMem 21960
FLASH: Settings saved
FLASH: Settings saved

Hi xbmcnut,

Can you give me and example of your espeasy settings? (config/devices) and how you create the switch in configuration.yaml

Regards,
Jan

Will post a guide on my blog and a link here in the next day or so.

Apologies for the delay. Had man flu all last week. My blog post with what I’ve learnt so far is now up. Sorry it’s a bit rough but it might help someone? http://xbmcnut.blogspot.co.nz/2016/08/using-espeasy-with-home-assistant.html

Interested in this to, I just found ESPEasy and have flashed it to my NodeMCU, the log show the temp but I don’t get any to mosquitto running on HA… I can only find build 120, did they pull 121 back for some reason?

R145_RC6 is available here http://www.letscontrolit.com/wiki/index.php/ESPEasy#Release_candidates but if you want, PM me and I can give you links to 1MB and 4MB versions of R121.

Bloody hell, I googled and downloaded it from Github so I thought it was the newest!

Another quick question, looking in ESPEasy at devices I can see the temperature and using MQTTLens in Chrome I can see that the info is coming in at /ESP01/temp/Temperature so I added the following to my yaml:

sensor 4:
platform: mqtt
name: “kitchen_temp”
state_topic: “ESP01/temp/Temperature”
qos: 0
unit_of_measurement: “C”

HA just shows unknown C for some reason

By default, ESPEasy uses a / in front of the topic. Is that still in play?

state_topic: "/ESP01/temp/Temperature"

1 Like

woho, Thanks that worked!

Time to order a bunch of NodeMCU’s and DHT’s from aliexpress! Anything else I should get at the same time… thinking of some PIR’s to run at the same ESP’s

I’m preferring Electrogradon and Sonoff now as the relays are integrated so much easier. Have also just got two Wemos. Have loaded code to control them via Echo (wemo emulation) but will flash with ESPEasy soon. Got the relay shield with those so makes a nice tidy package. Drop a CAT5 to your flush box with one of these on the end and you’ve got a PoE relay controlled via MQTT. Nice!

@xbmcnut , I have read your blog. That’s very helpful indeed.

I am facing a completely different issue, so couldn’t go to HA part yet. The issue I am facing currently is the connection issue with mosquitto server which is hosted in a pi3 running hassbian. Interestingly, if I choose the Domoticz MQTT as protocol, then ESP can connect to the broker just fine and send the data as expected. But if I choose any other MQTT, it just doesn’t connect. Weird!! When I was connected to MQTT broker using Domitcz MQTT, I tried to check how the mqtt messages are presented with the help of mosquitto_sub. Unfortunately the JSON structure in this case is not easy to use. As an example, my test DHT sensor data is presented like below:

{..."idx": 1, "DHT" : "Temperature 17 ; Humidity 85;0" }

As you see, the data structure is not suitable to pick via Template ?

By the way, I am on EspEasy R120_4096 firmware. Any suggestion ?

Hi @tarikul,

What exacly do you want to do?

Because in my case i’m using few nodemcu and some wemos, with EspEasy andmosquitto in HA and i’m showing idependent values (temperature, humidity and rssi signal) in group in HA.

In my case i have EspEasy v147, in one case u use for cover + temp and humidity, and other to take temperature and humidity values of DHT22 sensor.

@garvarma Thanks a lot for your quick reply. But I am afraid I really understood your comment properly…

I am trying to attach several sensors(Temp/Hum , Lux, Motion) to ESP12E (running ESPEasy) and send the data via MQTT and eventually notify Home Assistant. In my case, HA and Mosquitto Broker is running in different pi. As I mentioned, I can read the sensor data and it can be send to the broker but only if I choose the protocol as Domoticz MQTT not OpenHAB MQTT. And I have no idea how to achieve the value from the JSON format I posted. I though it should be something like … {"DHT Temp": 17 , "DHT Hum" : 85 ...} in that case, it was just a matter of picking the value and show in the weather group.

May be I can try to use R147 first. But before I try, I am interested to know your setup.

What protocol you selected ?
What was the JSON format ?
Are you using cloud MQTT or broker on a self hosted device ? which version ?

Best Regards

@tarikul

What protocol you selected ?

In my Wemos and NodeMCU that have EspEasy i have OpenHab MQTT

What was the JSON format ?

About this i dunno i need to check it. But why you want json format if you are using mqtt?

Are you using cloud MQTT or broker on a self hosted device ? which version ?

In my case i’m using a broker. The broker is the raspberry where also i have HA installed. I don’t remember which version of mosquitto i have installed i did it long time ago.

But when i will be at home, i can upload some pics about confgiration.