These sensors work in the UART mode, and you should connect sensors to UART pins (e.g., for CC2530 P0.2 – RX, CC2530 P0.3 – TX). Therefore, you cannot use the UART interface in the same configuration.
Senseair S8
This sensor type supports the write command.
write - starts calibration procedures. Topic: zigbee2mqtt/[friedly_name]/set/[channel] Payload: {"[channel]": value} Channel: l1, l2, l3 … l16 Value: 0 - start the zero calibration procedure. 1 - start the background calibration procedure.
MHZ 19
This sensor type supports the write command.
write - starts the zero calibration procedure. Topic: zigbee2mqtt/[friedly_name]/set/[channel] Payload: {"[channel]": value} Channel: l1, l2, l3 … l16 Value: 0 - start the zero calibration procedure.
Carlo Capocasa
Is it possible to connect multiple sensors to the single UART pins available on the CC2530 chip, or is a cc2652 chip required so each UART sensor can have its own set of configured pins?
Specifically, I want to combine a Senseair S8 CO2 sensor with a PMS5003 2.5 particle sensor, to make something like a Zigbee AirGradient.
If only one UART sensor were supported on a CC2530, a third option would be to use a different CO2 or particle sensor, but I’d like to confirm how many UART sensors this firmware on a CC2530 chip will support before going that route. Thank you!
Owner
UART: It is necessary to try. Some sensors can be connected and live together. Unfortunately, the PTVO firmware supports only one UART on all chips.
alain
hi.
a question about PZEM and reseting energy.
i use MQTTEXPLOER
i’ve try to publish in raw or json mode on the topic zigbee2mqtt/Frigo cuisine/set :
{“[l1]”: 0}
and
{“[energy_l1]”: 0}
no reset.
what is wrong ?
Owner
You should remove [ and ] from your JSON string.
alain
hi … just for sharing about PZEM on HOME ASSISTANT.
i’ve added these lines in config yaml
the “Frigo cuisine” is the name i’ve set in zigbee2mqtt
mqtt:
sensor:
# pour récup des stats PZEM N°1
– state_topic: “zigbee2mqtt/Frigo cuisine”
name: Frigo cuisine Tension
unit_of_measurement: “V”
value_template: “{{ value_json.voltage_l1 }}”
– state_topic: “zigbee2mqtt/Frigo cuisine”
name: “Frigo cuisine Intensité”
unit_of_measurement: “A”
value_template: “{{ value_json.current_l1 }}”
– state_topic: “zigbee2mqtt/Frigo cuisine”
name: “Frigo cuisine Energie”
unit_of_measurement: “Wh”
value_template: “{{ value_json.energy_l1 }}”
– state_topic: “zigbee2mqtt/Frigo cuisine”
name: “Frigo cuisine Puissance”
unit_of_measurement: “W”
value_template: “{{ value_json.power_l1 }}”
– state_topic: “zigbee2mqtt/Frigo cuisine”
name: “Frigo cuisine Fréquence”
unit_of_measurement: “Hz”
value_template: “{{ value_json.frequency_l1 }}”
WoKo design
Hi there…. First many thanks for your work on the firmware. It is an absolute joy to work with. I have the following setup: RF-Star RF-BM-2652P2 module and I want to connect a MHZ-19 to it to monitor CO2 levels in my house. However, ther is no P02 and P03 pin on this module. Am I overlooking something? It worked with a CC2530 module but since I want to use an external antenna, I have selected this module.
Many thanks in advance!
Owner
You can use any pins for UART on CC2652.
https://ptvo.info/zigbee-configurable-firmware-features/uart/
alainvtr
hi
just for sharing.
i use PZEM V3 connected to a E18-MS1PA2-IPX.
i have to connect Rx to P03 and Tx to P02.
i’ve noticed that on the PZEM board, you shoud have one Red LED allways on (the one between 5V/Rx) and the other Red LED should light on every periodic measure (if you have configured a LED on the zigbee board (send report), they shoul lighton together).
thx.
Owner
I cannot remember a role of these LEDs. Do you experience any problems with PZEM?
alainvtr
all problems resolved :
i have to connect Rx to P03 and Tx to P02 (reversed order you tell in top of article)
perhaps trouble with default address of PZEM (i’ve forced to 1 with the PC software of PZEM)
Kirill
Hi,
I made a test firmware for the sensor Senseair S8 (DIYRuZ AirSense),
but most likely something is not correct.
Сan you send me ini file for DIYRuZ AirSense (I soldered the device, but it is not clear how it works)?
I’m a beginner and I’m still learning how to make firmware using Zigbee Configurable Firmware.
Owner
I’m using the following settings for the following schematic:
https://modkam.ru/2020/09/28/datchik-co2-zigbee/
Firmware settings:
Board type: CC2530
Device type: End device without routing
Model ID: ptvo_airsense
Status LED: P01, Joining or errors
Set default reporting interval (s): 60
Output pins:
P02: Output 2, SenseAir S8 (Address (dec): 254)
P04: Output 3, GPIO, Pull-up
P05: Output 4, GPIO, Pull-up
Input pins:
P20: Input 1, External wake-up, Pull-up
Kirill
Thank’s, I use the same dyi hardware.
Why CC2530? In my hardware E18-MS1PA1-PCB with CC2592 (+ DS18B20 on P00 in Output 5)
and i have to use CC2530+CC2592.
But i don’t understand, why Output 1 is empty?
and why P03 not use?
And: device joined, i made converter from software (i use Domoticz with MQTT Auto discovery with homeassistant topic), but in mqtt i see: only
Sensor: quality_l2 (unit of measurement: ppm), val1_l2 (??), linkquality (lqi)
Switch (???): switch_l3 (payload NO/OF), switch_l4 (payload NO/OF)
Number: quality_l2 (unit of measurement: ppm)
Where CO2??
Unfortunately I can’t understand anything. 🙁
Please help me.
PS: I have a situation that I can no longer connect this sensor with firmware from https://modkam.ru/2020/09/28/datchik-co2-zigbee/, I have already tried all the methods that I found on their website.
I can’t figure out when it happened.
Owner
1. You can select any chip there.
2. Output1 is empty because Input 1 is defined as “External wakeup.”
3. quality_l2 will contain CO2.
Kirill
quality_l2 will contain CO2 – this is understandable, but how to see this value?
There is nothing in the log file and I posted the converter, it did not help to get the device with the value CO2.
How to get CO2 data and also temperature from the sensor DS?
How to get the correct converter for Domoticz? Can you send your sample?
Owner
1. If you’ve configured periodic reports in the firmware, a new value should appear automatically in this topic in Z2M.
2. DS18B20 – you can configure a new sensor on any free output and update a custom converter.
3. Unfortunately, I do not use Domoticz and do not have any examples for it.
Kirill
I decided to start simple, with a sensor DS18B.
Vake firmware with:
Board type: CC2530+CC2592
Device type: End device without routing
Model ID: DS18B
Status LED: P01, Joining or errors
Set default reporting interval (s): 60
Output pins:
P00: Output 2, DS18D20, Pull-up
Input pins:
P20: Input 1, External wake-up, Pull-up
Remove device from zigbee2mqtt (and from Domoticz).
But after join – in zigbee2mqtt Model ID: ptvo_airsense !!!!
Not the DS18B.
How can that be?
Owner
Please restart Z2M. It can remember the last device ID.
Kirill
ptvo_airsense – I called it that last time when I registered the SenseAir S8
Doublet
Just want to share how you can create a CO2 sensor in Home Assistant:
– platform: mqtt
name: “Carbondioxide”
state_topic: “zigbee2mqtt/0x00124b001d861b70”
unit_of_measurement: “ppm”
value_template: “{{ value_json.quality_l1 | round(0) }}”
availability_topic: “zigbee2mqtt/bridge/state”
payload_available: “online”
payload_not_available: “offline”
json_attributes_topic: “zigbee2mqtt/0x00124b001d861b70/attributes”
icon: mdi:molecule-co2
Owner
Thank you for sharing!
raymond
Hello PTVO. How to configure Pzem 004t with home assistant? I followed this guide but with no success: https://gio-dot.github.io/Z1-Mini/pzem-zigbee-meter
sensor:
– platform: mqtt
name: “PZEM Volt R”
state_topic: “zigbee2mqtt/0x00124b0022608e5a”
unit_of_measurement: “V”
value_template: “” (this attributes is empty).
Please help me. Thanks you very much
Owner
Sorry, but I do not use HA. I do not know how to add support of sensors there.
glcos
Which are UART pins RX and TX on an EBYTE E72-2G4M05S1F module with CC2652RB chip ?
I would like to use this module with PZEM-004T.
Thanks
Owner
The firmware uses pins P02 and P03 on CC2652 chips.
Jack
Hi there, I have an SPS30 air quality sensor connected. While I can configure the firmware to give regular sensor updates at every 10 seconds to the topic ‘zigbee2mqtt/sps30’, I couldn’t figure out how to poll for sensor values by publishing to ‘zigbee2mqtt/sps30/get’ with message {“l1”: “”}. Doe the firmware allow for polling for sensor values? Thanks.
Owner
Sorry, but the firmware cannot work with this sensor as you want.
Mário Arnaldo Mazon
Hi. As PZEM-004T uses UART, is there any way to connect three or more of them to one cc2530 and get 3 channels (three phase) readings, for example ? I understood I need to connect it to pins p0.2 and p0.3, but in which case I need to configure INPUT ? Or I only config the Output ? Thank you.
Owner
Hi. I didn’t try to connect 3 sensors.
1. You should change the sensor’s address using a utility from a manufacturer. Each sensor should have a unique address.
2. You should configure 3 outputs. All outputs should use pin P02.
3. You don’t need any inputs.
Please, let me know about your results.
gio
Just tested with 3 Pzem016 connected with an 485 to uart adapter (https://it.aliexpress.com/item/4000317625907.html?spm=a2g0o.productlist.0.0.3da17c14wKwRIi&algo_pvid=05535caa-d0ed-4fdf-9513-95d1527b5d9c&algo_expid=05535caa-d0ed-4fdf-9513-95d1527b5d9c-2&btsid=0b0a119a16118837127285076ea712&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_) to the cc2530. It works well.
Owner
Thank you for sharing your expirience!
gio
Hi, i noticed a really strange behaviour using PZEM004-t. I realized a schematic with this config:
Board type: CC2530
Device type: End device without routing
Update firmware’s timestamp : 2021-02-20
Status LED: P01, Periodic (every 5 seconds)
Default reporting interval (s): 20
Output pins:
P02: Output 1, PZEM-004T V3 (Address (dec): 1)
P10: Output 4, GPIO, External pull-up
P11: Output 5, GPIO, External pull-up
Input pins:
P20: Input 4, GPIO, External pull-up, Link to out 4
P17: Input 5, GPIO, External pull-up, Link to out 5
So far so good, all is working. I use SmartRF04EB as programmer. If i flash firmware and then let connect the board to zigbee2mqtt (without power cycle or reset the board), all is working flawlessy: inputs command linked out fast and even output switched from z2m works fast.
But if i reset or power cycle the board (Off then on after flash), command outputs from zigbee2mqtt becomes very very laggy (5-10 seconds). Command outputs from linked Inputs instead remain fast.
I’m sure there is a bug somewhere.
gio
Hi, i have found the reason of very laggy gpio commands outputs using PZEM: if router function is disabled command are very laggy (5-10 seconds). With router enabled commands are ever fast.
Frab
Hi, I cannot get the PZEM-004 V3 to work.
For me it’s not clear if I am configuring it wrong or there is a malfunction on the module.
Is it ok if I configure like this?
OUTPUT 1 – P02 – PZEM004 – ADDRESS 248 (where do I find this value, is it standard?)
INPUT 2 – P03 – PZEM004
Anyway thank you for your work!
Owner
Please, configure Output 1 only. The address is the default value from the documentation. Please, try to swap RX and TX wires. Did you connect GND and 3.3V to PZEM too?
The sensor does not work without a connected load.
Frab
Thank you. With:
OUTPUT 1 – P03 – PZEM004 and no INPUT it works! It was not really clear for me how to connect.
Now the only thing I notice: in Zigbee2Mqtt every value appears good, but Watts are without comma (example: 596 watts instead of 59,6 watts). Is this Zigbee2Mqtt bug?
Anyway, a coffee is coming 😉
Owner
Watts: Maybe, it is a bug. I’ll fix it in the next version.
Owner
Fixed.