Merge branch 'mega' into feature/taskvalueset_by_name
@@ -0,0 +1,235 @@
|
||||
Config page
|
||||
***********
|
||||
|
||||
Main Settings
|
||||
=============
|
||||
|
||||
Unit Name
|
||||
---------
|
||||
|
||||
The name of this node.
|
||||
This is mainly used when connecting to a MQTT broker or in p2p communications.
|
||||
It is also used to generate a hostname in the local network, for example when using mDNS.
|
||||
|
||||
|
||||
Unit Number
|
||||
-----------
|
||||
|
||||
The number of this node.
|
||||
It can be appended to the hostname.
|
||||
|
||||
The main use of the unit number is in ESPEasy p2p communications.
|
||||
When used in p2p communications, make sure not to use unit number ``0`` or ``255`` as those are reserved.
|
||||
|
||||
Range: 0 ... 255
|
||||
|
||||
Append Unit Number to hostname
|
||||
------------------------------
|
||||
|
||||
A flag to indicate how the hostname must be generated from *Unit Name* and *Unit Number*.
|
||||
|
||||
N.B. currently it is used in all occurences where a hostname is needed, but this appeared to be not working well for some MQTT brokers.
|
||||
So expect it to be changed later to split this flag for every occasion where a hostname is needed.
|
||||
|
||||
|
||||
Admin Password
|
||||
--------------
|
||||
|
||||
A password to prevent altering settings in the web interface.
|
||||
|
||||
Default password is empty.
|
||||
|
||||
N.B. when asked for a login prompt, the user name is ``admin``
|
||||
|
||||
WiFi Settings
|
||||
=============
|
||||
|
||||
A WiFi capable device can operate in two modes:
|
||||
|
||||
* Station mode (STA), device needs to connect to an access point.
|
||||
* Access Point mode (AP), other STA devices can connect to this device.
|
||||
|
||||
An AP will broadcast an identifier string, called the SSID.
|
||||
|
||||
For an STA device to connect to an AP, two parameters are needed:
|
||||
|
||||
* SSID - The identifier string of an AP.
|
||||
* WPA key - The password or pass phrase to make a connection.
|
||||
|
||||
N.B. when using the mentioned commands to set SSID/key, don't forget to call the ``save`` command.
|
||||
|
||||
|
||||
SSID
|
||||
----
|
||||
|
||||
The AP identifier string to connect to.
|
||||
This is needed when running in STA mode.
|
||||
|
||||
Can also be set via the command ``wifissid``.
|
||||
|
||||
|
||||
WPA Key
|
||||
-------
|
||||
|
||||
The password or pass phrase to connect to the AP with given SSID.
|
||||
|
||||
Can also be set via the command ``wifikey``.
|
||||
|
||||
|
||||
Fallback SSID / WPA Key
|
||||
-----------------------
|
||||
|
||||
This is an alternate to the first configured SSID/key.
|
||||
|
||||
There are various use cases to have multiple AP configurations stored on a node.
|
||||
For example to be able to move to anothe location where only another AP can be reached.
|
||||
Or as a backup, for example to let the node connect to a local hotspot on your phone.
|
||||
|
||||
Can also be set via the commands:
|
||||
|
||||
* ``wifissid2``
|
||||
* ``wifikey2``
|
||||
|
||||
|
||||
WPA AP Mode Key
|
||||
---------------
|
||||
|
||||
It is possible a node cannot connect to an AP:
|
||||
|
||||
* When there is no SSID configured
|
||||
* The configured AP's are not in reach
|
||||
* The configured AP's do not allow the node to connect
|
||||
|
||||
In these situations the ESP node will start its own local AP.
|
||||
|
||||
As SSID the Unit Name will be used, which is by default ``ESP_Easy_0``
|
||||
|
||||
The default WPA key to connect to this AP is ``configesp``, but can be changed here.
|
||||
|
||||
This is often used to perform the initial configuration like connecting to the local network.
|
||||
|
||||
Can also be set via the command ``WiFiAPKey``.
|
||||
|
||||
|
||||
Client IP filtering
|
||||
===================
|
||||
|
||||
Sometimes it can be useful to only allow access to the web interface of a node from a specific range of IP-addresses.
|
||||
|
||||
For example if a node should only be configured from the local subnet.
|
||||
|
||||
|
||||
|
||||
Client IP block level
|
||||
---------------------
|
||||
|
||||
* **Allow All** - No filtering applied, the web interface can be accessed from any IP able to reach the node. (default)
|
||||
* **Allow Local Subnet** - Only allow access to the web interface from the local subnet.
|
||||
* **Allow IP range** - Only allow access to the web interface from a specific IP range.
|
||||
|
||||
Access IP lower range
|
||||
---------------------
|
||||
|
||||
When *Allow IP range* is set, this field defines the lower bound of the range.
|
||||
|
||||
|
||||
Access IP upper range
|
||||
---------------------
|
||||
|
||||
When *Allow IP range* is set, this field defines the upper bound of the range.
|
||||
|
||||
|
||||
|
||||
WiFi/Ethernet IP Settings
|
||||
=========================
|
||||
|
||||
For both WiFi and Ethernet a node can be configured to receive an IP automatically via DHCP, or use a static IP.
|
||||
|
||||
If all fields for IP, GW, subnet mask and DNS are left empty, the configuration offered via DHCP will be used.
|
||||
|
||||
* **IP** The static IPv4 address to use for this node
|
||||
* **Gateway** IPv4 address of the gateway to reach hosts outside this subnet. (typically the IP of the router)
|
||||
* **Subnetmask** Mask applied to define the local subnet. (typically: ``255.255.255.0`` )
|
||||
* **DNS** IPv4 address of a DNS server to use. (typically the IP of the router or some assigned by the ISP)
|
||||
|
||||
Sleep Mode
|
||||
==========
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The ESP can be put into deep sleep for a set amount of time.
|
||||
|
||||
On an ESP8266, GPIO-16 must be connected to the RST pin to be able to wake up again.
|
||||
|
||||
As long as the node is in deep sleep mode, you can't connect to the web interface.
|
||||
In fact, the ESP is turned off and only a dedicated timer circuit is still powered to wake up the main ESP core.
|
||||
|
||||
There are three ways to get out of sleep mode:
|
||||
|
||||
Cold boot
|
||||
^^^^^^^^^
|
||||
|
||||
Power off the ESP and reconnect power.
|
||||
You will have 30 seconds to connect to the Web interface and disable the Sleep Mode function.
|
||||
(You will get feedback in the serial interface)
|
||||
|
||||
|
||||
Temporary disable Deep Sleep via jumper setting
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If 30 seconds is too short for you, you can use this method.
|
||||
|
||||
* Disconnect GPIO-16 from RST and connect it to GND. Restart your ESP if neccesary.
|
||||
* Now deep sleep will be disabled and your ESP will function normally, until you connect GPIO-16 to RST again.
|
||||
|
||||
This requires ESPEasy v2.0.0-dev6 or newer.
|
||||
|
||||
Factory reset
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
If all else fails, just do a factory reset. **You will lose all your settings!**
|
||||
|
||||
* Connect the RX and TX pin together while you restart your ESP. (will clear all stored settings)
|
||||
* Power off the device.
|
||||
* Remove the connector across the RX and TX pins.
|
||||
* Restart and then configure the ESPEasy firmware again. (at restart factory default settings will be loaded)
|
||||
|
||||
If this doesn't work:
|
||||
|
||||
* Try loading the blank image to match the size of the memory installed on the device.
|
||||
* Reboot and wait 5 minutes.
|
||||
* Then load on the firmware you are wanting to use.
|
||||
* Reboot and wait 5 minutes.
|
||||
|
||||
|
||||
Sleep awake time
|
||||
----------------
|
||||
|
||||
This setting defines the minimum time in seconds a node should be awake from deep sleep.
|
||||
|
||||
If set to 0, the node will not go into deep sleep automatically.
|
||||
|
||||
At boot from deep sleep, a timer is started based on this setting.
|
||||
If this timer expires, the node will enter deep sleep again.
|
||||
|
||||
As soon as the node has a successful WiFi connection, the timer will be restarted to allow to send out sensor data.
|
||||
|
||||
|
||||
N.B. It is possible to put a node into deepsleep via the command ``deepsleep``, regardless this setting.
|
||||
|
||||
|
||||
|
||||
Sleep time
|
||||
----------
|
||||
|
||||
The duration in seconds for a node to go into deep sleep.
|
||||
|
||||
Typical max. duration is 4294 seconds (Roughly 71 minutes)
|
||||
|
||||
N.B. the maximum possible duration depends on the used core library version and is mentioned at the configuration page.
|
||||
|
||||
|
||||
Sleep on connection failure
|
||||
---------------------------
|
||||
|
||||
@@ -155,6 +155,90 @@ Other SPI pins to be used are device specific, and need to be configured from th
|
||||
|
||||
NB: When using the VSPI interface and also the I2C interface is used, another pin has to be selected for I2C GPIO -> SCL, as its configuration is fixed for the VSPI setting.
|
||||
|
||||
--------
|
||||
Ethernet
|
||||
--------
|
||||
|
||||
On builds including ``_eth`` in their build name, it is also possible to use ethernet instead of WiFi.
|
||||
Currently this is only present for ESP32 builds and no plans currently exist to support it for ESP82xx.
|
||||
|
||||
N.B. This is still in testing phase, so not all kinds of network communications work right now.
|
||||
|
||||
Preferred network medium
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Allows to switch between:
|
||||
|
||||
* WiFi (default)
|
||||
* Ethernet
|
||||
|
||||
To activate a new configuration, a reboot is needed.
|
||||
|
||||
Ethernet PHY type
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Select the used PHY controller type:
|
||||
|
||||
* LAN8710 (LAN8720 is also supported, but none of the newer features are supported)
|
||||
* TLK110
|
||||
|
||||
Ethernet PHY Address
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The PHY address depends on the hardware and the PHY configuration.
|
||||
|
||||
* Espressif's Ethernet board with TLK110 PHY use PHY address 31.
|
||||
* Common Waveshare LAN8720 PHY breakout use PHY address 1.
|
||||
* Olimex ESP32 EVB REV B IoT LAN8710 PHY Board with CAN use PHY address 0.
|
||||
* Other LAN8720 breakouts often use PHY address 0.
|
||||
|
||||
If the PHY address is incorrect then the EMAC will initialise but all attempts to read/write configuration registers on the PHY will fail.
|
||||
|
||||
GPIO pins
|
||||
^^^^^^^^^
|
||||
|
||||
RMII PHY SMI Wiring
|
||||
"""""""""""""""""""
|
||||
|
||||
Most PHY boards have documented their *RMII PHY SMI Wiring* pins:
|
||||
|
||||
* **MDC** Output to PHY, usually pin 23
|
||||
* **MDIO** Bidirectional, usually pin 18
|
||||
|
||||
Clock sync
|
||||
""""""""""
|
||||
|
||||
The PHY and the ESP need to keep a clock in sync.
|
||||
This can either be done via an external crystal, which is connected to a GPIO pin.
|
||||
Another option is to let the ESP provide the clock to the PHY.
|
||||
|
||||
* External crystal oscillator
|
||||
* 50MHz APLL Output on GPIO0
|
||||
* 50MHz APLL Output on GPIO16
|
||||
* 50MHz APLL Inverted Output on GPIO17
|
||||
|
||||
Power pin
|
||||
"""""""""
|
||||
|
||||
On almost all PHY boards, or ESP boards equiped with an ethernet PHY, it is possible to turn the PHY on or off.
|
||||
Either to save energy, or to make sure the external clock is not affecting the ESP boot mode when it restarts.
|
||||
|
||||
For example the Olimex ESP32-EVB does have the *external crystal oscillator* connected to GPIO-0, which could boot the ESP32 randomly into UART flash mode.
|
||||
Most boards use a specific GPIO pin to control the power to the PHY.
|
||||
The Olimex ESP32-EVB does have a specific delay circuit to only allow power to the PHY after boot and therefore does not need to control the PHY power.
|
||||
|
||||
For other boards, the default is often GPIO-17, but this may change per board.
|
||||
|
||||
RMII PHY Wiring
|
||||
"""""""""""""""
|
||||
|
||||
Apart from these GPIO pins, there is a number of other pins reserved on the ESP32 for RMII PHY Wiring.
|
||||
|
||||
Since these GPIO pin assignments cannot be changed, it is also not needed to configure them.
|
||||
However, they also cannot be used when *RMII PHY* is used.
|
||||
|
||||
.. include:: ../Reference/Ethernet_PHY_ESP32.rst
|
||||
|
||||
|
||||
-------------------
|
||||
GPIO boot states
|
||||
|
||||
@@ -21,11 +21,19 @@ Maintainer: |P092_maintainer|
|
||||
|
||||
Used libraries: |P092_usedlibraries|
|
||||
|
||||
.. include:: P092_DLbus.rst
|
||||
|
||||
Supported hardware
|
||||
------------------
|
||||
|
||||
|P092_usedby|
|
||||
|
||||
* :ref:`P092_ESR21_page` Simple Solar Control.
|
||||
* :ref:`P092_UVR31_page` single-circuit universal control system.
|
||||
* :ref:`P092_UVR61-3_page` three-circuit universal control system.
|
||||
* :ref:`P092_UVR1611_page` freely programmable universal control system.
|
||||
|
||||
|
||||
Change log
|
||||
----------
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
@@ -1,25 +1,20 @@
|
||||
.. include:: ../Plugin/_plugin_substitutions_p09x.repl
|
||||
.. _P092_DLbus_page:
|
||||
|
||||
DL bus
|
||||
======
|
||||
|
||||
|P092_typename|
|
||||
|P092_status|
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
The DL-Bus is used in control units e.g. sold by `Technische Alternative <http://www.ta.co.at/>`_.
|
||||
|
||||
The DL-Bus serves as a bus line for various external sensors and modules.
|
||||
|
||||
The DL-Bus is a bidirectional data line and only compatible with products of Technische Alternative.
|
||||
|
||||
The data transmission looks as follows:
|
||||
* In an infinite loop, a logging data frame is created by the control one after the others on the data line.
|
||||
|
||||
* In an infinite loop, a logging data frame is created by the control one after the others on the data line.
|
||||
|
||||
Up to 4 sensor measured value queries (master/slave) can be made between the individual logging data frames on the DL bus.
|
||||
* So that the beginning of a data frame can be detected, a SYNC of 16 high bits is sent before the first data byte.
|
||||
* The data transmission is carried out as Manchester code (EXOR linked) with a display clock of 50 or 488Hz (depending on control type).
|
||||
|
||||
* So that the beginning of a data frame can be detected, a SYNC of 16 high bits is sent before the first data byte.
|
||||
* The data transmission is carried out as Manchester code (EXOR linked) with a display clock of 50 or 488Hz (depending on control type).
|
||||
|
||||
This is necessary to ensure the supply voltage of the logger and DL sensors from the data signal.
|
||||
If the receiver is synchronized to the display clock, the correct bit value appears always during the second half period of the data bit (inverted in the first half period).
|
||||
@@ -27,24 +22,36 @@ If the receiver is synchronized to the display clock, the correct bit value appe
|
||||
Wiring
|
||||
------
|
||||
|
||||
The DL-Bus consists of 2 wires: DL and GND (sensor ground).
|
||||
The DL-Bus consists of 2 wires:
|
||||
|
||||
* DL
|
||||
* GND (sensor ground).
|
||||
|
||||
The power supply for the DL-Bus sensors is supplied via the DL-Bus itself.
|
||||
|
||||
Some DL-Bus devices can/must be powered via a 12V source, e.g. that of the CAN bus (this is explicitly noted in the operating manual of that sensor).
|
||||
|
||||
The cable routing can be star-shaped or serial (from one device to the next).
|
||||
|
||||
Any cable with a cross-section of 0.75 mm2 up to a maximum length of 30 m can be used as a data cable.
|
||||
|
||||
Over 30 m, the use of shielded cables is recommended, which increases the permissible length of the cable to 100 m.
|
||||
|
||||
Protocol
|
||||
--------
|
||||
|
||||
Transmission of a data byte
|
||||
|
||||
.. image:: P092_DL_bus_databyte.png
|
||||
|
||||
Transmission of a data frame
|
||||
|
||||
.. image:: P092_DL_bus_dataframe.png
|
||||
|
||||
Data frame on the DL bus
|
||||
|
||||
.. image:: P092_DL_bus_dataframelog.png
|
||||
|
||||
Display clock
|
||||
|
||||
.. image:: P092_DL_bus_displayclock.png
|
||||
|
||||
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
@@ -11,11 +11,13 @@ Introduction
|
||||
------------
|
||||
|
||||
The ESR21 unit is a simple solar control.
|
||||
|
||||
The ESR21 unit is a differential control that can be used in many ways
|
||||
|
||||
The DL bus runs at 12 volts.
|
||||
The data frame consist of 30 bytes (excluding sync and CRC).
|
||||
The data are transmitted @ 488Hz, therefore the transmission of one data set takes about 0.67 seconds.
|
||||
* The DL bus runs at 12 volts.
|
||||
* The data frame consist of 30 bytes (excluding sync and CRC).
|
||||
* The data are transmitted @ 488Hz, therefore the transmission of one data set takes about 0.67 seconds.
|
||||
|
||||
.. image:: P092_ESR21.png
|
||||
|
||||
Wiring
|
||||
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@@ -11,11 +11,13 @@ Introduction
|
||||
------------
|
||||
|
||||
The UVR1611 unit is a freely programmable universal control system.
|
||||
|
||||
The UVR1611 universal controller can be freely programmed using function modules to match any system configuration for heating room management.
|
||||
|
||||
The DL bus runs at 12 volts.
|
||||
The data frame consist of 63 bytes (excluding sync and CRC).
|
||||
The data are transmitted @ 488Hz, therefore the transmission of one data set takes about 1.4 seconds.
|
||||
* The DL bus runs at 12 volts.
|
||||
* The data frame consist of 63 bytes (excluding sync and CRC).
|
||||
* The data are transmitted @ 488Hz, therefore the transmission of one data set takes about 1.4 seconds.
|
||||
|
||||
.. image:: P092_UVR1611.png
|
||||
|
||||
Wiring
|
||||
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -13,9 +13,10 @@ Introduction
|
||||
The UVR31 unit is a single-circuit universal control system.
|
||||
The UVR31 unit is designed for simple solar installations and heating systems (storage charging, domestic hot water preparation)
|
||||
|
||||
The DL bus runs at 24 volts.
|
||||
The data frame consist of 8 bytes (excluding sync).
|
||||
The data are transmitted @ 50Hz, therefore the transmission of one data set takes about 1.92 seconds.
|
||||
* The DL bus runs at 24 volts.
|
||||
* The data frame consist of 8 bytes (excluding sync).
|
||||
* The data are transmitted @ 50Hz, therefore the transmission of one data set takes about 1.92 seconds.
|
||||
|
||||
.. image:: P092_UVR31.png
|
||||
|
||||
Wiring
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -11,12 +11,15 @@ Introduction
|
||||
------------
|
||||
|
||||
The UVR61-3 unit is a three-circuit universal control system.
|
||||
|
||||
The UVR61-3 unit is designed for an energy-saving and cost-effective drying of cellars and other parts of buildings by means of fan control.
|
||||
|
||||
The UVR61-3 three-circuit controllers has various thermostat, differential temperature and speed control functions for use in solar and heating systems, too.
|
||||
|
||||
The DL bus runs at 12 volts.
|
||||
The data frame consist of 34 bytes (excluding sync and CRC).
|
||||
The data are transmitted @ 488Hz, therefore the transmission of one data set takes about 0.8 seconds.
|
||||
* The DL bus runs at 12 volts.
|
||||
* The data frame consist of 34 bytes (excluding sync and CRC).
|
||||
* The data are transmitted @ 488Hz, therefore the transmission of one data set takes about 0.8 seconds.
|
||||
|
||||
.. image:: P092_UVR61-3.png
|
||||
|
||||
Wiring
|
||||
@@ -73,4 +76,4 @@ Data acquisition
|
||||
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
|
||||
* **Interval**: How often should the task publish its value (10..60 seconds is normal).
|
||||
|
||||
.. note:: Intervall not less than **10 seconds**! The reading of the DL bus happens twice per intervall.
|
||||
.. note:: Interval not less than **10 seconds**! The reading of the DL bus happens twice per intervall.
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
|
||||
The following PHY connections are required for RMII PHY data connections:
|
||||
|
||||
.. list-table:: RMII PHY Wiring
|
||||
:widths: 10 25 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - GPIO
|
||||
- RMII Signal
|
||||
- ESP32 EMAC Function
|
||||
- Notes
|
||||
* - 0
|
||||
- REF_CLK
|
||||
- EMAC_TX_CLK
|
||||
- See desciption about the clock
|
||||
* - 21
|
||||
- TX_EN
|
||||
- EMAC_TX_EN
|
||||
-
|
||||
* - 19
|
||||
- TX0
|
||||
- EMAC_TXD0
|
||||
-
|
||||
* - 22
|
||||
- TX1
|
||||
- EMAC_TXD1
|
||||
-
|
||||
* - 25
|
||||
- RX0
|
||||
- EMAC_RXD0
|
||||
-
|
||||
* - 26
|
||||
- RX1
|
||||
- EMAC_RXD1
|
||||
-
|
||||
* - 27
|
||||
- CRS_DV
|
||||
- EMAC_RX_DRV
|
||||
-
|
||||
|
||||
See `ESP32 datasheet <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_
|
||||
@@ -243,3 +243,9 @@ It is best not to use any of the GPIO pins 6 - 11.
|
||||
|
||||
GPIO 6, 7 & 8 may output some PWM signals at boot.
|
||||
GPIO 9, 10 & 11 output high at boot and may fail to boot of pulled either high or low.
|
||||
|
||||
|
||||
Pins used for RMII Ethernet PHY
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: ../Reference/Ethernet_PHY_ESP32.rst
|
||||
@@ -287,7 +287,7 @@ todo_include_todos = True
|
||||
|
||||
# This def is used to add ESP Easy related formatation (color etc).
|
||||
def setup(app):
|
||||
app.add_stylesheet('css/custom.css')
|
||||
app.add_css_file('css/custom.css')
|
||||
|
||||
# To replace chunks of text globally +
|
||||
# ESP Easy colors (set in cutom.css)
|
||||
|
||||
@@ -12,6 +12,7 @@ Welcome to ESP Easy's documentation!
|
||||
|
||||
ESPEasy/AboutUs.rst
|
||||
ESPEasy/FunctionBlocks.rst
|
||||
Config/Config.rst
|
||||
Controller/_Controller.rst
|
||||
Hardware/Hardware.rst
|
||||
Plugin/_Plugin.rst
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
DLBus KEYWORD1
|
||||
attachDLBusInterrupt KEYWORD2
|
||||
StartReceiving KEYWORD2
|
||||
CheckTimings KEYWORD2
|
||||
Processing KEYWORD2
|
||||
CheckCRC KEYWORD2
|
||||
@@ -403,14 +403,34 @@ struct GpioFactorySettingsStruct {
|
||||
i2c_scl = -1; // GPIO5 conflicts with SW input
|
||||
break;
|
||||
case DeviceMode_Olimex_ESP32_PoE:
|
||||
button[0] = 34; // DUT1 Button
|
||||
button[0] = 34; // BUT1 Button
|
||||
relais[0] = -1; // No LED's or relays on board
|
||||
status_led = -1;
|
||||
i2c_sda = 4;
|
||||
i2c_scl = 5;
|
||||
i2c_sda = 13;
|
||||
i2c_scl = 16;
|
||||
eth_phyaddr = 0;
|
||||
eth_phytype = 0; // LAN8710
|
||||
eth_mdc = 23;
|
||||
eth_mdio = 18;
|
||||
eth_power = 12;
|
||||
eth_clock_mode = 3;
|
||||
eth_wifi_mode = 1;
|
||||
eth_clock_mode = 3; // 50MHz APLL Inverted Output on GPIO17
|
||||
eth_wifi_mode = 1; // default to ethernet
|
||||
break;
|
||||
case DeviceMode_Olimex_ESP32_EVB:
|
||||
button[0] = 34; // BUT1 Button
|
||||
relais[0] = 32; // LED1 + Relay1 (0 = Off, 1 = On)
|
||||
relais[1] = 33; // LED2 + Relay2 (0 = Off, 1 = On)
|
||||
|
||||
status_led = -1;
|
||||
i2c_sda = 13;
|
||||
i2c_scl = 16;
|
||||
eth_phyaddr = 0;
|
||||
eth_phytype = 0; // LAN8710
|
||||
eth_mdc = 23;
|
||||
eth_mdio = 18;
|
||||
eth_power = -1; // No Ethernet power pin
|
||||
eth_clock_mode = 0; // External crystal oscillator
|
||||
eth_wifi_mode = 1; // default to ethernet
|
||||
break;
|
||||
|
||||
// case DeviceModel_default: break;
|
||||
|
||||
@@ -77,8 +77,8 @@ String ethGetDebugClockModeStr() {
|
||||
String ethGetDebugEthWifiModeStr() {
|
||||
switch (eth_wifi_mode)
|
||||
{
|
||||
case 0: return F("WIFI");
|
||||
case 1: return F("ETHERNET");
|
||||
case 0: return F("WiFi");
|
||||
case 1: return F("Ethernet");
|
||||
default: return F("ETH_WIFI_ERR");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ void handle_config() {
|
||||
addFormSubHeader(F("WiFi IP Settings"));
|
||||
|
||||
addFormIPBox(F("ESP WiFi IP"), F("espip"), Settings.IP);
|
||||
addFormIPBox(F("ESP WiFi GW"), F("espgateway"), Settings.Gateway);
|
||||
addFormIPBox(F("ESP WiFi Gateway"), F("espgateway"), Settings.Gateway);
|
||||
addFormIPBox(F("ESP WiFi Subnetmask"), F("espsubnet"), Settings.Subnet);
|
||||
addFormIPBox(F("ESP WiFi DNS"), F("espdns"), Settings.DNS);
|
||||
addFormNote(F("Leave empty for DHCP"));
|
||||
@@ -163,7 +163,7 @@ void handle_config() {
|
||||
addFormSubHeader(F("Ethernet IP Settings"));
|
||||
|
||||
addFormIPBox(F("ESP Ethernet IP"), F("espethip"), Settings.ETH_IP);
|
||||
addFormIPBox(F("ESP Ethernet GW"), F("espethgateway"), Settings.ETH_Gateway);
|
||||
addFormIPBox(F("ESP Ethernet Gateway"), F("espethgateway"), Settings.ETH_Gateway);
|
||||
addFormIPBox(F("ESP Ethernet Subnetmask"), F("espethsubnet"), Settings.ETH_Subnet);
|
||||
addFormIPBox(F("ESP Ethernet DNS"), F("espethdns"), Settings.ETH_DNS);
|
||||
addFormNote(F("Leave empty for DHCP"));
|
||||
|
||||
@@ -152,10 +152,10 @@ void handle_hardware() {
|
||||
|
||||
#ifdef HAS_ETHERNET
|
||||
addFormSubHeader(F("Ethernet"));
|
||||
addRowLabel_tr_id(F("Ethernet or WIFI?"), "ethwifi");
|
||||
String ethWifiOptions[2] = { F("WIFI"), F("ETHERNET") };
|
||||
addRowLabel_tr_id(F("Preferred network medium"), "ethwifi");
|
||||
String ethWifiOptions[2] = { F("WiFi"), F("Ethernet") };
|
||||
addSelector("ethwifi", 2, ethWifiOptions, NULL, NULL, Settings.ETH_Wifi_Mode, false, true);
|
||||
addFormNote(F("Change Switch between WIFI and ETHERNET requires reboot to activate"));
|
||||
addFormNote(F("Change Switch between WiFi and Ethernet requires reboot to activate"));
|
||||
addRowLabel_tr_id(F("Ethernet PHY type"), "ethtype");
|
||||
String ethPhyTypes[2] = { F("LAN8710"), F("TLK110") };
|
||||
addSelector("ethtype", 2, ethPhyTypes, NULL, NULL, Settings.ETH_Phy_Type, false, true);
|
||||
|
||||
@@ -193,6 +193,7 @@ void handle_json()
|
||||
stream_next_json_object_value(LabelType::ETH_SPEED);
|
||||
stream_next_json_object_value(LabelType::ETH_STATE);
|
||||
stream_last_json_object_value(LabelType::ETH_SPEED_STATE);
|
||||
addHtml(F(",\n"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -122,14 +122,12 @@ bool CPlugin_002(CPlugin::Function function, struct EventStruct *event, String&
|
||||
|
||||
switch ((int)nvalue)
|
||||
{
|
||||
case 0:
|
||||
case 0: // Off
|
||||
pwmValue = 0;
|
||||
UserVar[baseVar] = pwmValue;
|
||||
break;
|
||||
case 1:
|
||||
pwmValue = UserVar[baseVar];
|
||||
break;
|
||||
case 2:
|
||||
case 1: // On
|
||||
case 2: // Update dimmer value
|
||||
pwmValue = 10 * atol(svalue1);
|
||||
UserVar[baseVar] = pwmValue;
|
||||
break;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
\**************************************************/
|
||||
|
||||
#include <DLBus.h>
|
||||
#include "src/PluginStructs/P092_data_struct.h"
|
||||
|
||||
#define PLUGIN_092
|
||||
#define PLUGIN_ID_092 92
|
||||
|
||||
@@ -20,6 +20,7 @@ enum DeviceModel {
|
||||
DeviceModel_Shelly1,
|
||||
DeviceModel_ShellyPLUG_S,
|
||||
DeviceMode_Olimex_ESP32_PoE,
|
||||
DeviceMode_Olimex_ESP32_EVB,
|
||||
|
||||
DeviceModel_MAX
|
||||
};
|
||||
|
||||
@@ -362,7 +362,8 @@ String getDeviceModelBrandString(DeviceModel model) {
|
||||
case DeviceModel_Sonoff_POWr2: return F("Sonoff");
|
||||
case DeviceModel_Shelly1:
|
||||
case DeviceModel_ShellyPLUG_S: return F("Shelly");
|
||||
case DeviceMode_Olimex_ESP32_PoE: return F("Olimex");
|
||||
case DeviceMode_Olimex_ESP32_PoE:
|
||||
case DeviceMode_Olimex_ESP32_EVB: return F("Olimex");
|
||||
|
||||
// case DeviceModel_default:
|
||||
default: return "";
|
||||
@@ -388,6 +389,7 @@ String getDeviceModelString(DeviceModel model) {
|
||||
case DeviceModel_Shelly1: result += '1'; break;
|
||||
case DeviceModel_ShellyPLUG_S: result += F(" PLUG S"); break;
|
||||
case DeviceMode_Olimex_ESP32_PoE: result += F(" ESP32-PoE"); break;
|
||||
case DeviceMode_Olimex_ESP32_EVB: result += F(" ESP32-EVB"); break;
|
||||
|
||||
// case DeviceModel_default:
|
||||
default: result += F("default");
|
||||
@@ -411,7 +413,8 @@ bool modelMatchingFlashSize(DeviceModel model) {
|
||||
case DeviceModel_Sonoff_POWr2: return size_MB == 4;
|
||||
case DeviceModel_Shelly1:
|
||||
case DeviceModel_ShellyPLUG_S: return size_MB == 2;
|
||||
case DeviceMode_Olimex_ESP32_PoE:return size_MB == 4;
|
||||
case DeviceMode_Olimex_ESP32_PoE:
|
||||
case DeviceMode_Olimex_ESP32_EVB:return size_MB == 4;
|
||||
|
||||
// case DeviceModel_default:
|
||||
default: return true;
|
||||
@@ -528,6 +531,27 @@ bool getGpioInfo(int gpio, int& pinnr, bool& input, bool& output, bool& warning)
|
||||
// Has an internal pull-up, so unconnected = High = normal output.
|
||||
warning = true;
|
||||
}
|
||||
|
||||
#ifdef HAS_ETHERNET
|
||||
|
||||
// Check pins used for RMII Ethernet PHY
|
||||
if (ETHERNET == Settings.ETH_Wifi_Mode) {
|
||||
switch (gpio) {
|
||||
case 0:
|
||||
case 21:
|
||||
case 19:
|
||||
case 22:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
warning = true;
|
||||
break;
|
||||
}
|
||||
// FIXME TD-er: Must we also check for pins used for MDC/MDIO and Eth PHY power?
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -196,6 +196,7 @@ bool P044_Task::validP1char(char ch) {
|
||||
case '-':
|
||||
case '*':
|
||||
case ':':
|
||||
case '_':
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DLBus.h"
|
||||
#include "P092_data_struct.h"
|
||||
//
|
||||
// DLBus reads and decodes the DL-Bus.
|
||||
// The DL-Bus is used in heating control units e.g. sold by Technische Alternative (www.ta.co.at).
|
||||
@@ -15,19 +15,6 @@
|
||||
#define DLbus_FlagLongerThanTwiceDoubleWidth 0x80
|
||||
#define DLbus_FlagsWrongTiming (DLbus_FlagLongerThanTwiceDoubleWidth | DLbus_FlagLongerThanDoubleWidth | DLbus_FlagBetweenDoubleSingleWidth | DLbus_FlagShorterThanSingleWidth)
|
||||
|
||||
extern long usecPassedSince(unsigned long timestamp) ICACHE_RAM_ATTR;
|
||||
extern void addToLog(byte loglevel, const String& string);
|
||||
|
||||
//#define LOG_LEVEL_ERROR 1
|
||||
#define LOG_LEVEL_INFO 2
|
||||
#ifndef F
|
||||
// Create a no-op F() macro so the code base still compiles outside of the
|
||||
// Arduino framework. Thus we can safely use the Arduino 'F()' macro through-out
|
||||
// the code base. That macro stores constants in Flash (PROGMEM) memory.
|
||||
// See: https://github.com/crankyoldgit/IRremoteESP8266/issues/667
|
||||
#define F(x) x
|
||||
#endif // F
|
||||
|
||||
// Helper for ISR call
|
||||
DLBus* DLBus::__instance = nullptr;
|
||||
volatile static uint8_t* ISR_PtrChangeBitStream = nullptr; // pointer to received bit change stream
|
||||
@@ -2,6 +2,7 @@
|
||||
#define DLBus_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "../../_Plugin_Helper.h"
|
||||
|
||||
/*********************************************************************************************\
|
||||
DLBus subs to get values from the receiving bitstream
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#ifdef USES_P094
|
||||
|
||||
#include "../Helpers/StringConverter.h"
|
||||
|
||||
P094_data_struct::P094_data_struct() : easySerial(nullptr) {}
|
||||
|
||||
|
||||