kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
3k stars 500 forks source link

Support Request: Custom Output 52pi EP-0099 4-Channel Relay Hat #1251

Open ttran0789 opened 1 year ago

ttran0789 commented 1 year ago

Is your feature request related to a problem? Please describe. Is there a way to modify the on_off_grove_multichannel_relay.py to allow for the 52pi EP-0099 to work? In line 324 of the python file mentioned: self.bus.write_byte_data(self.address, 0x10, new_state)

This board has address 0x10 for me, and relays are numbered 1/2/3/4 to be used for the registers. For example it would work if I do: self.bus.write_byte_data(0x10, 2, new_state) it could turn it on/off.

Describe the solution you'd like If you could help give some tips on how to approach this it would be greatly appreciated.

Describe alternatives you've considered I tried running the on/off script as a shell file and it still didn't work.

Additional context Add any other context or screenshots about the feature request here.

kizniche commented 1 year ago

I'm not familiar with the device you mentioned. Is there any literature on it? I would recommend reading the documentation, which would tell you how to communicate with it. You can copy and modify a current Output to work for a new one. This is how most new models are made: find the most similar Output and copy and modify it to work.