Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I2C io interface
#31
I don't know if this will help.

On the SIP Options page > Station handling > Active-low relay box inverts the logic of SIP's output when that box is checked.
<p><br></p>
Reply
#32
Hi Dan,
Yes, with that setting I tested the normal and inverted behavior and it worked fine. However I've seen in the "Relay board" plugin (which we of course don't use here) there is also the Active-low-high option and was wandering why this is build in instead of using the general option you also referred to.
Reply
#33
The Active low setting in the plugin was created before the setting in Options.
The setting in Options was added later to work with the shift register interface which does not require a plugin.
<p><br></p>
Reply
#34
thanks, that makes sense and confirms my findings while testing. So no additional settings needed for my plugin.

Hopefully @litronas can also confirm the good working of this.
Reply
#35
Thanks to both of you and I'm going to delete and start over, I take install Sip, install the plugin and in options I change the logic, save and restart.
I'll keep trying.
Reply
#36
After many tries.
In the end I give up, I'm going to buy some displacement registers, and I'll try. for the next one I will buy the correct relays, and I will use your complement. Thank you very much and sorry for the inconvenience Gerard and Dan

As seen in the photo, turn off the watering station and in the advanced area of the complement 0x00 turn off everything 0xFF turn on everything. the opposite that puts in the explanation


Attached Files Thumbnail(s)
   
Reply
#37
Please don't give up. We might learn both of this issue and it might help others.

Can you give me some info about the relay boards you want to use and the led indicator shown on the photo?

I'm sure we can/will solve this.

**edit**  I have seen the 8-bit led bar module. That module behaves exactly as most (99%) of the relay boards and the photo you show is the correct behaviour. So seen from the Photo all seems fine to me.

**edit-2** Ah, I see there are two versions of the led module, one ties to VCC and the other to GND. Which one do you have?
Reply
#38
ok, I can confirm this is an issue when using "active high" relays.

@Dan, what is the excpected behaviour of the zone dict in this case?  The "Active-Low Relay" setting selected or not both give a dict of all stations 0.  I would expect an inverted dict but it is not. Do I need to check the active-low setting in the plugin?

--Gerard

**edit** looking at the plugin, it could also be a bug. I'm looking into it.

**edit-2** I think the answer is in gpio_pins-->set_output()
Reply
#39
If you are convenient is changing 1 line in the plugincode here is what to try.

On line 111 there is "if gv.srvals[sid]: "  please change this to:  "if gv.output_srvals[sid]: "

This should do the the trick for now. In the meantime I do some more testing and will update the repo asap.

See also: https://gitlab.com/seventer/pcf857x_plug...3d2fbc75db
Reply
#40
I'm learning a lot, the plugin works fine, but the relay modules that I have, are activated when they receive VCC, and then they all stay connected. (does not change in the options) the led strips are common GND. I tried an alternative way that worked, but I am not convinced with the cli control plugin and adding the command "i2cset -y 1 0x20 0x**", it works fine, but I could not use the plugin to put several at the same time. pcf7585, from ssh, with the command also works, with the plugin it doesn't. The difference, I don't know why is that the led strips have to be common vcc. I'll keep trying things, thanks

(2022 Jan 20, 05:32 PM)astrogerard Wrote: If you are convenient is changing 1 line in the plugincode here is what to try.

On line 111 there is "if gv.srvals[sid]: "  please change this to:  "if gv.output_srvals[sid]: "

This should do the the trick for now. In the meantime I do some more testing and will update the repo asap.

See also: https://gitlab.com/seventer/pcf857x_plug...3d2fbc75db
Sorry I didn't read the last post, I'll try it delighted and I'll tell you. thank you very much Gerard
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)