mwraith / homebridge-somfi-blinds

A Homebridge plugin to control any device with the Somfy RTS technology with a Raspberry Pi connected to a simple 433 MHz transmitter. Adapted from wibberryd/homebridge-rpi-rts, but provides a stateful service.
MIT License
7 stars 3 forks source link

it is possible use pigpio-client insted of pigpio? #8

Closed bosu1787 closed 9 months ago

bosu1787 commented 1 year ago

hi im moving my hombridge to my ubuntu server so no gpio in my server what im trying to do is put an rpi 0 on usb and use the gpios from that but like that only pigpio-client is working. so i need your help.thanks

mwraith commented 1 year ago

Hi @bosu1787.

Everything related to sending of the signal is within the file src/RpiGpioRts.js so this is the file you'll need to rewrite to work with pigpio-client.

Looking at the documentation the command names are slightly different, but I think it's a very similar concept and possible. The commands to initialise and send the signal are slightly different in sendCommand. Also the structure of the waveform which is constructed in getWaveform looks to be different. With pigpio it's specified as JSON like { gpioOn: outPin, gpioOff: 0, usDelay: 1000 } but with pigpio-client it looks to be an array like [1, 0, 1000]. It does not look too different.

Let me know how you get on with it. If you hit any issues, share your code (maybe as a fork) and I'll try to help where I can.

Mark

bosu1787 commented 1 year ago

thank you @mwraith

im not very good at coding :) but i will try.

thank you.