This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:tech:zigbeesensor [2024/05/17 13:48] – [Programming] bullar | en:tech:zigbeesensor [2024/05/18 04:35] (current) – [Software] bullar | ||
---|---|---|---|
Line 11: | Line 11: | ||
There are 3 types of ZigBee Devices: | There are 3 types of ZigBee Devices: | ||
- | - **Zigbee | + | - **ZigBee |
- | - **Zigbee | + | - **ZigBee |
- | - **Zigbee | + | - **ZigBee |
- | In order to setup ZIGBEE you need at least one **ZIGBEE | + | In order to setup ZIGBEE you need at least one **ZigBee |
- | === Modules === | + | ==== Modules |
In order to build a DIY Zigbee device (End Device or Router) we need a programmable Zigbee module. Several modules can be found in the market but I stick to [[https:// | In order to build a DIY Zigbee device (End Device or Router) we need a programmable Zigbee module. Several modules can be found in the market but I stick to [[https:// | ||
It's based on CC2530 from Texas Instruments a bit outdated but cheap and easy to get. | It's based on CC2530 from Texas Instruments a bit outdated but cheap and easy to get. | ||
- | {{ : | + | {{ : |
- | === Quirks & Co. === | + | ==== Quirks & Co. ==== |
For DIY devices you may have to teach the coordinator software how to deal with your Zigbee data. In Home Assistant [[https:// | For DIY devices you may have to teach the coordinator software how to deal with your Zigbee data. In Home Assistant [[https:// | ||
A similar approach is given for Zigbee2MQTT by embedding a javascript based [[https:// | A similar approach is given for Zigbee2MQTT by embedding a javascript based [[https:// | ||
- | More information you will find in Software area. | ||
===== Hardware ===== | ===== Hardware ===== | ||
Line 44: | Line 43: | ||
</ | </ | ||
- | The final PCB is quite compact with a size of 44.5 x 24mm. On top you see the programming interface (J1) and a button (SW1). The yellow LED (LED1) is used an indicator. A 5V power supply can be connected via 2-pin JST connector (J7) or Micro-USB. | + | The final PCB is quite compact with a size of 44.5 x 24mm. On top you see the programming interface (J1) and a button (SW1). The yellow LED (LED1) is used as an indicator. A 5V power supply can be connected via 2-pin JST connector (J7) or Micro-USB. |
{{ : | {{ : | ||
===== Software ===== | ===== Software ===== | ||
+ | For long I hesitated to step to ZIGBEE as the firmware development could become a challenge. There are a lot of step-by-step descriptions public but it's look like not to be an out-of-the box task. But I could find a couple of projects utilising the [[https:// | ||
+ | |||
+ | After some tests I was impressed and convinced how easy it is to setup a ZIGBEE device. This tools not only outputs the binary file (.hex) that can be directly programmed to the ZIGBEE module, it also generates the custom files for your coordinator of choice (e.g. quirks for Home Assistant). No need to program a single line of code. | ||
+ | |||
+ | An 1st application setup is described [[en: | ||
===== Programming ===== | ===== Programming ===== | ||
Line 75: | Line 79: | ||
The setup of PTVO firmware is very easy. Just define P21 as counter and set the interval to 60 sec. Every pulse longer than 1ms at P21 will be counted. | The setup of PTVO firmware is very easy. Just define P21 as counter and set the interval to 60 sec. Every pulse longer than 1ms at P21 will be counted. | ||
- | {{ : | + | {{ : |
After pairing the PTVO firmware will send the counter value to the coordinator. In my case the sensor gives 360 pulses per litre. This calculation as well as the daily consumption can be easily done in Home Assistant. The following examples show the results: | After pairing the PTVO firmware will send the counter value to the coordinator. In my case the sensor gives 360 pulses per litre. This calculation as well as the daily consumption can be easily done in Home Assistant. The following examples show the results: | ||
Line 82: | Line 86: | ||
{{: | {{: | ||
- | This sensor is now installed since more than 2 month without any issues. Many thanks to [[https:// | + | This sensor is now installed since more than 2 month without any issues. Many thanks to [[https:// |
===== Downloads ===== | ===== Downloads ===== | ||