Hello,
I just try to change my SmartHomeControl to Openhab and I'm trying to talking to one ESP8266 with an PCF8574-PortExpander.
But I'm not succesfull with my work.
I'm using the EspEasy R147. Via an http-call I can switch seperately the 8 Ports of the PCF8574, but I'm not able to switch them via MQTT.
The name is = I2CSwitch, the Gpio2 is SDA and the Gpio0 is SCL.
The "Devices" are created as the following picture..
.
Has anybody an idea how to switch via MQTT-Command?
I tried in MQTT.FX it via Publish with <I2CSwitch/PCFGPIO,1,0> for switchting, but no success.
Thanks
Best Regards
gahle
MQTT Publish on I2C-Bus
Moderators: grovkillen, Stuntteam, TD-er
MQTT Publish on I2C-Bus
- Attachments
-
- Devices2.JPG (46.12 KiB) Viewed 9191 times
Re: MQTT Publish on I2C-Bus
Please, please, please, upgrade to a less than 4 years old release of ESPEasy (R147 is dated Q1 2017...), latest build is always available from https://github.com/letscontrolit/ESPEasy/releases
I'm no expert on MQTT, but you need to address the topic 'cmd' on that unit (so probably the topic is 'I2CSwitch/cmd'), with payload pcfgpio,1,0
It is helpful, at least for ESPEasy, to use different names for each task.
I'm no expert on MQTT, but you need to address the topic 'cmd' on that unit (so probably the topic is 'I2CSwitch/cmd'), with payload pcfgpio,1,0
It is helpful, at least for ESPEasy, to use different names for each task.
/Ton (PayPal.me)
Re: MQTT Publish on I2C-Bus
Yep, the main reason to use different task names is to be able to use them in rules and also in the MQTT topic the "%tskname% part will be replaced by the... task name.
So if you keep using the same name for tasks, you won't know what GPIO pin publishes its state to the MQTT broker.
So if you keep using the same name for tasks, you won't know what GPIO pin publishes its state to the MQTT broker.
Who is online
Users browsing this forum: No registered users and 73 guests