Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Radio Loge authored and Radio Loge committed Oct 17, 2023
2 parents 88a4796 + 3ee9bfa commit a2ddeb3
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ jobs:
python-version: 3.x
- run: pip install wheel
- run: pip install -r requirements.txt
- run: mkdocs gh-deploy --force --strict
# - run: mkdocs gh-deploy --force --strict
- run: mkdocs gh-deploy --force
23 changes: 15 additions & 8 deletions docs/PZEM-0XX.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@
!!! note "PZEM is a dedicated separate energy monitor, device calibration in Tasmota is not supported."

## PZEM-004

![](https://user-images.githubusercontent.com/5904370/67893137-58f94080-fb56-11e9-877e-9675149c0fd6.png)

<img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-done.jpg?raw=true" width="250" align="right" />

The PZEM-004T together with a Sonoff Basic provide a good clamp on energy monitor.

### Parts needed

- Sonoff Basic
- PZEM-004T
- Resistor 1k
- [Enclosure](https://www.itead.cc/smart-home/sonoff-ip66.html)
- Power cable

### Preparation

Install Tasmota on the Sonoff Basic and confirm it is functional before connecting the PZEM-004T to its serial interface.

### Hardware connections

As the PZEM-004T RX optocoupler series resistor (1K ohm, R15 for v.1 .0 and R8 for v.3.0 ) is designed for 5V, that resistor value had to be reduced in order to achieve the current for driving the RX optocoupler diode.
This can be accomplished by soldering a 1k resistor between the joints shown below (modification works for version v.1.0 and v.3.0).
The resistor has to be connected between VDD (5V/3.3V) terminal and the RX opto terminal 1.
Expand All @@ -28,6 +33,7 @@ PZEM-004T v.1.0

PZEM-004T v.3.0
<img src="https://user-images.githubusercontent.com/17679049/95775726-999c8c00-0ccb-11eb-8e0d-36af1220de36.jpg" height="600" />

It can be used a SMD resistor 102 or 1001 (1K) soldered near/parallel with R8 or a normal resistor (THT) similar to that used on the image of v.1.0
The resistor is placed in different place on v.3.0 because the optocouplers RX and TX are reversed compared to v.1.0

Expand All @@ -50,6 +56,7 @@ Cut the power cable in two and connect the input wires to both Sonoff Basic and
As most parts are connected to high voltage AC it is recommended to fit the hardware in a solid enclosure.

### Software configuration

Configure the GPIO's for hardware serial connection as shown below.

**IMPORTANT: If using the connections as following, the communication works in all cores due to TASMOTA using hardware serial. If the user wants to use other GPIOs for communication, TASMOTA will emulate a serial interface using software serial. This feature does not work using core 2.3.0 due to insufficient RAM. To use the software serial feature, you must use a core version of 2.4.2 or greater.**
Expand All @@ -69,6 +76,7 @@ Configure the GPIO's for hardware serial connection as shown below.
The PZEM-004T together with a HW-655 Relay provide a good clamp-on energy monitor for a 240V clothes dryer.

### Parts needed

* [Circuit Box](https://www.lowes.com/pd/CARLON-1-Gang-Blue-Plastic-Interior-New-Work-Standard-Switch-Outlet-Wall-Electrical-Box/3286106)
* [3-prong Dryer Electrical Cord](https://smile.amazon.com/gp/product/B002RL9JB6) (Note - some households use a 4-prong plug)
* [3-prong Dryer Receptacle](https://smile.amazon.com/gp/product/B000BQSU8C) (Note - some households use a 4-prong plug)
Expand All @@ -79,9 +87,11 @@ The PZEM-004T together with a HW-655 Relay provide a good clamp-on energy monito
* DuPont Connectors & 22 AWG wire

### Preparation

Install Tasmota on the ESP-01 and confirm it is functional before connecting the PZEM-004T to its serial interface. Use of pins other that the default hardware serial GPIO (01 & 03) in order for TASMOTA to emulate a serial interface using software serial.

### Hardware connections

<img src="https://user-images.githubusercontent.com/34340210/51444410-2536e380-1cc5-11e9-8989-b181c2851863.png" height="400" /><br>

Connect the serial interface of the HW-655 with the serial interface of the PZEM-004T.
Expand Down Expand Up @@ -112,6 +122,7 @@ Use the module template to configure the GPIO's for hardware serial connection.
# Connected Power Meter using PZEM-004T, Wemos D1 Mini and a 1602 I<sup>2</sup>C display

### Parts needed

- Wemos D1 Mini
- PZEM-004T
- 1kOhm Resistor (optional - see alternate wiring)
Expand All @@ -122,27 +133,23 @@ Use the module template to configure the GPIO's for hardware serial connection.
- Mammuth Clamps

### Preparation

**You need to compile your own Tasmota firmware as none of the pre-compiled binaries have support for _display and PZEM_ module.**

**Set up your preferred IDE as described in [wiki](/docs/Compile-your-build)**
**Set up your preferred IDE as described in [wiki](Compile-your-build.md)**

#### Enable IDE to Use Custom Settings

Create _**user_config_override.h**_ in the `tasmota` folder and paste the contents of this [sample configuration file](https://pastebin.com/WkfyKYnh).

#### PlatformIO

- Rename [platformio_override_sample.ini](https://github.com/arendst/Tasmota/blob/development/platformio_override_sample.ini). to platformio_override.ini
- Enter `platformio run -e <variant-name>`
Examples:
- `platformio run -e tasmota-sensors`
- `platformio run -e tasmota-DE`

#### Arduino IDE
- Edit [_**my_user_config.h**_](https://github.com/arendst/Tasmota/blob/development/tasmota/my_user_config.h). Uncomment the statement by removing the "//" in front of the line:
`#define USE_CONFIG_OVERRIDE`
- Click compile

[Flash](Getting-Started#flashing) the binary on the Wemos D1 Mini and confirm it is functional before connecting the PZEM-004T to its serial interface.

### Tasmota Parameter Configuration

[Device Template](Templates)<BR>
Expand Down
6 changes: 3 additions & 3 deletions docs/Supported-Peripherals.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Name|Description|Connection
[**Buzzer**](Buzzer) | Audio signalling device | gpio
[**CC2530**](CC2530) | TI CC2530 Zigbee adapter| serial
**CCS811** | Gas and air quality sensor| I^2^C
[**Chirp! Soil Moisture sensor**](Moisture-sensor-and-Chirp!-sensor) | Moisture sensor| I^2^C
[**Chirp! Soil Moisture sensor**](Moisture-Sensor-and-Chirp!-Sensor.md) | Moisture sensor| I^2^C
[**DFR0299**](DFR0299) | DFRobot DFPlayer mini MP3 player| serial
[**DHT11**](DHT11) | Temperature and humidity sensor | gpio
**DHT12** | Temperature and humidity sensor | gpio
Expand Down Expand Up @@ -89,7 +89,7 @@ DS3502 | Digital potentiometer| I^2^C
[**OpenTherm**](OpenTherm) | OpenTherm adapter| serial
[**P1 Smart Meter**](P1-Smart-Meter) | Energy meter | serial
[**PAJ7620**](PAJ7620) | Gesture & proximity detection sensor
[**PIR**](PIR-Motion-sensors#am312) | Passive infrared sensor| gpio
[**PIR**](PIR-Motion-Sensors.md) | Passive infrared sensor| gpio
[**PCA9557**](PCA9557) | I/O expander | I^2^C
[**PCA9685**](PCA9685) | 16-channel, 12-bit PWM LED controller| I^2^C
[**PCA9632**](https://github.com/arendst/Tasmota/blob/development/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino) | 4-channel, 8-bit PWM LED controller| I^2^C
Expand Down Expand Up @@ -148,7 +148,7 @@ DS3502 | Digital potentiometer| I^2^C

[Google Sheet list of supported peripherals](https://docs.google.com/spreadsheets/d/1VaZrCUjNosUQGYBX0pTVoY_rkSzEIcTP8K3052smOB4/edit?usp=sharing)

[sensor API Documentation](sensor-API)
[sensor API Documentation](Sensor-API.md)

## Expanding Specific Devices

Expand Down
6 changes: 5 additions & 1 deletion docs/TuyaMCU-Devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ Bought from [ebay](https://www.ebay.co.uk/itm/Smart-Wifi-Dimmer-Switch-Support-T

## Ketotek KTEM06

The KTEM06 is a single phase energy meter with a relay for switching for DIN rail mounting.
The KTEM06 is a single phase energy meter with a relay for switching for DIN rail mounting. This device is identical in construction with the TYWE3S-based version of HIKING DDS238-2.

![KTEM06 open](./_media/devices/Ketotek-KTEM06-01x.jpg)

### Flashing

Open the case to see the board with the display and the TYWE3S module on the backside. Remove the board and flip it around.
Expand Down Expand Up @@ -244,6 +245,9 @@ Different than described elsewhere it was not helpful to connect EN to 3.3V.

RST needed to be disconnected from GND to start flashing.

Some users report that flashing does not work because the serial programmer does not supply enough power. Using serial programmers based on CH340 seem to work. A workaround is to use an additional power supply.

### Product Links

[KETOTEK Smart 1 Phasen Stromzähler](https://www.amazon.de/KETOTEK-Stromz%C3%A4hler-Digitalenergiez%C3%A4hler-Fernbedienung-Energiez%C3%A4hler/dp/B09XXG4L2C)
[HIKING DDS238-2](https://de.aliexpress.com/item/4000571797301.html?gatewayAdapt=glo2deu)
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ markdown_extensions:
toc_depth: 3
- pymdownx.tabbed:
alternate_style: true
# - pymdownx.emoji:
# emoji_index: !!python/name:materialx.emoji.twemoji
# emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.betterem
- pymdownx.caret
- pymdownx.details
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tzdata>=2021.5
mkdocs~=1.5,>=1.5.3
mkdocs-material>=7.1.7
mkdocs-material>=9.4.0
mkdocs-material-extensions~=1.3
Pygments>=2.4
markdown>=3.2
Expand Down

0 comments on commit a2ddeb3

Please sign in to comment.