smi
May 26, 2018, 6:58pm
1
Hi!
So I set up ESP easy together with PN532 to read NFC tags and then open doors with it.
Opening the dore works perfectly when triggering on a MQTT state but I can’t send any messages / commands from HA to ESP Easy.
This is the configuration of ESP easy:
And that’s how I try it in HA:
HA config:
mqtt:
broker: core-mosquitto
username: XXXX
password: XXXXX
Does anyone know what’s wrong with this?
Thanks!
cyn
May 26, 2018, 7:05pm
2
I think you might be having trouble with the leading /
I use mqttfx to monitor my mqtt transactions to see what I am sending & receiving.
smi
May 26, 2018, 7:18pm
3
Thanks for your input!
Well the trailing slash seamed to be a problem as only after I deleted it, MQTT lens was able to see the messages:
But still: The value doesn’t change on ESP Easy
any reason your ESP config isn’t using a username?
cyn
May 26, 2018, 7:36pm
5
Your post shows ESP subscribing to home/doorlock without leading slash
HA is publishing /home/doorlock with leading slash
smi
May 26, 2018, 7:49pm
6
@forsquirel : it’s just deleted for the screenshot
@cyn : yeah, I changed that (see screen from my second post)
cyn
May 26, 2018, 8:20pm
7
OK I got confused by your response when you said trailing, but I think we are in sync now. On my esp devices I use rules to do an action when the ESP device receives a command. Hope this helps
HA publishes: ESP/cmd event,retrieveStatus
in rules I have
On retrieveStatus do
Publish sendOut/UTIL/Unit22/Status,{ “temp”: [DS18B20#Temperature] }
endon
cyn
May 26, 2018, 8:23pm
8
Setup Rules by going to Tools, Advance, & check Rules
bachoo786
(Bachoo786)
June 14, 2018, 11:46pm
9
Hi @smi
How did you setup your pn532 with esp8266? I have got my pn532 from China but cannot find the correct arduino code and libraries to download and test.
Can you please guide me ?
Thanks.
your topics are not the same in both the screenshots.
“/home/…” =/= “home/…”
EDIT: Sorry, I see you’ve already adjusted for this mistake.