MCP Status without device

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

MCP Status without device

#1 Post by Micha_he » 15 Sep 2022, 16:11

I use a MCP23017 via I2C, without configured devices. The internal command's like 'MCPGPIO,4,1' works. But when i use the command 'Status,MCP,4' or 'Status,M,4' I get a state of '0'.

Code: Select all

{
"log": "",
"plugin": 9,
"pin": 4,
"mode": "input",
"state": 0
}
Is this command don't work without a device is setup ?

User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Greece
Contact:

Re: MCP Status without device

#2 Post by iron » 15 Sep 2022, 19:45

You initiate monitor at/after boot ?

Monitor,MCP,<MCPGPIO>
-D

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: MCP Status without device

#3 Post by chromo23 » 15 Sep 2022, 20:05

I am also not sure this command works correctly ... but the project i used the mcp23017 for is already deployed and i only have remote access to the software...so i can do no proper testing.

Edit: but there also seems to be a discrepancy in the mode... it seems that you use the the mcp23017 as an output but the log states the gpio as an input.. did you also set the mode?

Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: MCP Status without device

#4 Post by Micha_he » 15 Sep 2022, 20:22

Yes, the mode is set to output at start.

@iron: Yes, I set the monitor at start and the monitor works, event is generated.

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

Re: MCP Status without device

#5 Post by Ath » 15 Sep 2022, 20:49

Micha_he wrote: 15 Sep 2022, 16:11 Is this command don't work without a device is setup ?
The "status" command is (also) an ESPEasy core command and doesn't need a device/task to be set up, only connected (but that shouldn't be a problem :lol:), as it directly reads the status via the I2C bus.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 79 guests