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.

UART-based sensor
UART-based sensor.

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.

Comments
Harvey Specter
Posted at 14:02 December 20, 2023
Carlo Capocasa
Reply
Author

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!

    Harvey Specter
    Posted at 04:45 December 21, 2023
    Owner
    Reply
    Author

    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.

Harvey Specter
Posted at 17:16 December 24, 2022
alain
Reply
Author

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 ?

    Harvey Specter
    Posted at 03:59 December 26, 2022
    Owner
    Reply
    Author

    You should remove [ and ] from your JSON string.

Harvey Specter
Posted at 17:09 December 24, 2022
alain
Reply
Author

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 }}”

Harvey Specter
Posted at 10:45 December 7, 2022
WoKo design
Reply
Author

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!

Harvey Specter
Posted at 17:33 October 31, 2022
alainvtr
Reply
Author

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.

    Harvey Specter
    Posted at 03:47 November 1, 2022
    Owner
    Reply
    Author

    I cannot remember a role of these LEDs. Do you experience any problems with PZEM?

      Harvey Specter
      Posted at 16:08 November 1, 2022
      alainvtr
      Reply
      Author

      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)

Harvey Specter
Posted at 16:02 January 22, 2022
Kirill
Reply
Author

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.

    Harvey Specter
    Posted at 12:27 January 23, 2022
    Owner
    Reply
    Author

    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

      Harvey Specter
      Posted at 17:11 January 23, 2022
      Kirill
      Reply
      Author

      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.

        Harvey Specter
        Posted at 03:43 January 24, 2022
        Owner
        Reply
        Author

        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.

          Harvey Specter
          Posted at 06:02 January 24, 2022
          Kirill
          Author

          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?

          Harvey Specter
          Posted at 06:31 January 24, 2022
          Owner
          Author

          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.

          Harvey Specter
          Posted at 13:40 January 24, 2022
          Kirill
          Author

          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?

          Harvey Specter
          Posted at 13:50 January 24, 2022
          Owner
          Author

          Please restart Z2M. It can remember the last device ID.

          Harvey Specter
          Posted at 13:41 January 24, 2022
          Kirill
          Author

          ptvo_airsense – I called it that last time when I registered the SenseAir S8

Harvey Specter
Posted at 11:36 January 8, 2022
Doublet
Reply
Author

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

    Harvey Specter
    Posted at 03:46 January 10, 2022
    Owner
    Reply
    Author

    Thank you for sharing!

Harvey Specter
Posted at 08:01 October 15, 2021
raymond
Reply
Author

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

    Harvey Specter
    Posted at 08:02 October 16, 2021
    Owner
    Reply
    Author

    Sorry, but I do not use HA. I do not know how to add support of sensors there.

Harvey Specter
Posted at 21:17 October 13, 2021
glcos
Reply
Author

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

    Harvey Specter
    Posted at 12:28 October 14, 2021
    Owner
    Reply
    Author

    The firmware uses pins P02 and P03 on CC2652 chips.

Harvey Specter
Posted at 23:54 September 26, 2021
Jack
Reply
Author

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.

    Harvey Specter
    Posted at 04:53 September 27, 2021
    Owner
    Reply
    Author

    Sorry, but the firmware cannot work with this sensor as you want.

Harvey Specter
Posted at 02:59 January 22, 2021
Mário Arnaldo Mazon
Reply
Author

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.

    Harvey Specter
    Posted at 03:27 January 22, 2021
    Owner
    Reply
    Author

    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.

        Harvey Specter
        Posted at 04:59 January 29, 2021
        Owner
        Reply
        Author

        Thank you for sharing your expirience!

          Harvey Specter
          Posted at 19:10 February 21, 2021
          gio
          Author

          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.

          Harvey Specter
          Posted at 09:37 February 22, 2021
          gio
          Author

          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.

Harvey Specter
Posted at 17:26 December 2, 2020
Frab
Reply
Author

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!

    Harvey Specter
    Posted at 14:02 December 4, 2020
    Owner
    Reply
    Author

    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.

      Harvey Specter
      Posted at 21:49 December 5, 2020
      Frab
      Reply
      Author

      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 😉

        Harvey Specter
        Posted at 06:54 December 6, 2020
        Owner
        Reply
        Author

        Watts: Maybe, it is a bug. I’ll fix it in the next version.

        Harvey Specter
        Posted at 12:04 December 7, 2020
        Owner
        Reply
        Author

        Fixed.

Leave a Reply