Two IC2 displays

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
RadovanCiz
New user
Posts: 3
Joined: 27 Mar 2021, 09:54

Two IC2 displays

#1 Post by RadovanCiz » 27 Mar 2021, 10:05

Hi, I have two I2C displays connected to Wemos D1 Pro via the same I2C bus. I would like to send a text to the second LCD. Sending to the first one via command LCD works fine but I didn't find any command like lcd1 or MQTT possibilities on how to send it to the second one. Anyone have an idea?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Two IC2 displays

#2 Post by TD-er » 27 Mar 2021, 10:30

Have you tried this command prefix for addressing a specific task when you're running multiple instances of the same plugin?
https://espeasy.readthedocs.io/en/lates ... f-a-plugin

RadovanCiz
New user
Posts: 3
Joined: 27 Mar 2021, 09:54

Re: Two IC2 displays

#3 Post by RadovanCiz » 27 Mar 2021, 11:12

I've tried
192.168.1.95/control?cmd=lcd,4,1,"A"
Ok - the first LCD
192.168.1.95/control?cmd=2.lcd,4,1,"A"
Command unknown: 2.lcd,4,1,"A"
192.168.1.95/control?cmd=[2].lcd,4,1,"A"
Command unknown: [2].lcd,4,1,"A"
192.168.1.95/control?cmd=LCDDolni.lcd,4,1,"A"
Command unknown: LCDDolni.lcd,4,1,"A"
192.168.1.95/control?cmd=[LCDDolni].lcd,4,1,"A"
Command unknown: [LCDDolni].lcd,4,1,"A"

I'm using ESP_Easy_mega_20201130_normal_ESP8266_4M1M firmware
Devices in ESP  Easy
Devices in ESP Easy
I2C.PNG (8.17 KiB) Viewed 6712 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Two IC2 displays

#4 Post by TD-er » 27 Mar 2021, 12:12

Not sure if it does work like that when sending commands via HTTP.

You could try to send it as an event, with the string as an eventvalue (not 100% sure strings as event value will work here)

So you call your events something like displayone and displaytwo.
The event you try to send is something like this:

Code: Select all

event,'displayone=4,1,"A"'
N.B. see the extra single quotes on the parameter of the event command.

Then in the rules you do something like this:

Code: Select all

on displayone do
  [LCDHorni].lcd,%eventvalue1%,%eventvalue2%,%eventvalue3%
endon

on displaytwo do
  [LCDDolni].lcd,%eventvalue1%,%eventvalue2%,%eventvalue3%
endon

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Two IC2 displays

#5 Post by Ath » 27 Mar 2021, 12:14

RadovanCiz wrote: 27 Mar 2021, 11:12 I'm using ESP_Easy_mega_20201130_normal_ESP8266_4M1M firmware
The feature of prefixing a command with its taskname has been merged on January 3rd, 2021, so is not available in the build you are using.
Please upgrade to a newer build to use that feature.
/Ton (PayPal.me)

RadovanCiz
New user
Posts: 3
Joined: 27 Mar 2021, 09:54

Re: Two IC2 displays

#6 Post by RadovanCiz » 27 Mar 2021, 12:37

It works with ESP_Easy_mega_20210223_normal_ESP8266_4M1M firmware. I didn't notice that the firmware remain the same after ESP web device update. Thank you

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests