1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.51k stars 776 forks source link

Simple Input Detection #247

Closed QuagmireMan closed 5 years ago

QuagmireMan commented 5 years ago

I see there is an actuator script for output, but I don't see a script to read inputs. Unless I overlooked something.

It seems it would be very easy to modify the HCSR501 script for this purpose.

Any thoughts?

1technophile commented 5 years ago

You have an analog read input : https://github.com/1technophile/OpenMQTTGateway/blob/master/ZsensorADC.ino

If you want a basic read input you can base it from this sensor. If you do the dev don't hesitate to submit a pull request

QuagmireMan commented 5 years ago

Ok. I have never tried to do one before, but I can give it a go :)

1technophile commented 5 years ago

@QuagmireMan are you planning to implement your request (so as to know if I integrate it in the next release)?

QuagmireMan commented 5 years ago

It still needs some work and I am learning the ins and outs of github at the same time, but I have started it, it just isn't as complete as I would like it. How soon is your next release?

QuagmireMan commented 5 years ago

I have only tested it on an ESP8266 so far. And I am still very unsure how to merge my code with yours.

1technophile commented 5 years ago

I'm closing the issue as now we have a pull request to discuss