This instance runs on the ESP8266-01 wifi-enabled SoC device to provide remote REST access and control of a set of (typically) 8 device-attached relays or potentially more complex devices to control power to attached devices. The device reports system health to the central MQTT service and supports OTA updates.
The device implements simple client (STATION) WiFi, including setting the hostname in DNS and requires use of local DHCP services to provide a device IPv4 address, naming and network resolution services, and NTP time services.
The unit uses a PCF8574 I2C bus expander to control the eight bits of attached devices. Newer devices than the 8574 can support 16 bits and the device itself supports high and low addressing for multiple devices on one bus, to allow control of up to 32 attached pins. Use of the larger ESP8266-12 SoC will also allow PWM and ADC devices to be managed by mapping outputs to specific pins and functions. You'd have to edit the code further for that.... but its ready.
- Ascom 6.5 with ASCOM Remote or 6.5 sp1 with built-in choose support for Alpaca. https://ascom-standards.org/Developer/Alpaca.htm
- Arduino 1.86 IDE, https://www.arduino.cc/en/software/
- ESP8266 libraries V2.4+ http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Arduino MQTT client (https://pubsubclient.knolleary.net/api.html)
- Arduino JSON library (pre v6) https://arduinojson.org/v5/api/
- PCF8574 arduino i2c library https://github.com/RobTillaart/PCF8574.git
- EepromAnything - note I added support for c_strings to mine. https://github.com/semiotproject/Arduino-libraries/blob/master/EEPROMAnything
- RemoteDebugger https://github.com/JoaoLopesF/RemoteDebug
To setup the pin names, use the pin name field - e.g. '12v relay', focuser etc. To setup the pin types, use the pin descriptions field - accepted settings are PWM, Relay_NO, Relay_NC, DAC. Use the custom setup Urls:
- http://"hostname"/api/v1/switch/0/setup - web page to manually configure settings ASCOM ALPACA doesn't provide for unless you have a windows driver setup page.
- http://"hostname"/api/v1/switch/0/status - json listing of all attached pin control blocks