Logic Machine Forum
Zigbee gateway integration - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Zigbee gateway integration (/showthread.php?tid=3320)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


RE: Zigbee gateway integration - hocine - 24.06.2025

Hello 

Anyone have an idea?

thx

(18.06.2025, 12:44)hocine Wrote: Hello,
On one installation I had 16 Zigbee products and they were all working well. After adding 6 more products I no longer have automatic status updates for all the products.
I have to read the status manually.
Do you know what could be causing this problem?
Thx



RE: Zigbee gateway integration - Daniel - 24.06.2025

Are the new devices the same as the other or different? Which interface do you use?


RE: Zigbee gateway integration - hocine - 02.07.2025

(24.06.2025, 09:24)Daniel Wrote: Are the new devices the same as the other or different? Which interface do you use?

there is a product that is not in the same version. is it possible to add a script so that the zigbee module continues to retrieve states despite certain products returning an error?

I made a scipt to read the states. it works well but as soon as it encounters a problem with products it doesn't move on to the next product.


RE: Zigbee gateway integration - Daniel - 02.07.2025

Share device information from both versions.


RE: Zigbee gateway integration - hocine - 02.07.2025

(02.07.2025, 08:51)Daniel Wrote: Share device information from both versions.
Here are the product profiles with the 2 different versions and here is also a copy of my script

local zb = require('applibs.zigbee')

-- Liste des thermostats Zigbee
local thermostats = {
  { name = "TH Atelier – TEST", addr = "7cc6b6fffe0ad6c5" },
    { name = "TH Atelier N°1", addr = "70ac08fffe06bdfb" },
    { name = "TH Atelier N°2", addr = "dc8e95fffe0f8e74" },
    { name = "TH Atelier N°3", addr = "70ac08fffe06aaa5" },
    { name = "TH Accueil Volvo", addr = "7cc6b6fffe0ad8ce" },
    { name = "TH Bureau chef d'atelier", addr = "7cc6b6fffe0acac" },
    { name = "TH Stock pneus", addr = "70ac08fffe06ad6c" },
    { name = "TH5 Thermostat Réfectoire atelier", addr = "048727fffe35b3df" }
}

-- Cluster Thermostat
local cluster = 0x0201
local attrs = { 0x0000, 0x0011, 0x0012, 0x001C }

-- Lecture des attributs pour un thermostat
local function read_thermostat(th)
    print("\n--- Lecture pour : " .. th.name .. " ---")

    local success, res_or_err = pcall(function()
        return zb.cmdsync('getattributes', th.addr, cluster, attrs)
    end)

    if success then
        local res, err = res_or_err, nil
        if res then
            print("Attributs récupérés :")
            for attr_id, value in pairs(res) do
                if attr_id == 0x0000 or attr_id == 0x0011 or attr_id == 0x0012 then
                    print(string.format("  Attribut ID 0x%04X : %.2f °C", attr_id, value / 100))
                elseif attr_id == 0x001C then
                    print(string.format("  Attribut ID 0x%04X : Mode système = %d", attr_id, value))
                else
                    print(string.format("  Attribut ID 0x%04X : %s", attr_id, tostring(value)))
                end
            end
        else
            print("  [!] Aucun attribut reçu – passage au thermostat suivant.")
        end
    else
        print("  [!] Erreur lors de la requête : " .. tostring(res_or_err))
    end
end

-- Boucle principale
for _, th in ipairs(thermostats) do
    read_thermostat(th)
end


Manufacturer: Schneider Electric
Model: S520619
Firmware version: 001.000.053
Device type: Router
Power source: Mains
Receive when idle: Yes
Endpoint 1
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- Groups (4)
- HvacThermostat (513)
- HvacUserInterfaceCfg (516)
- HaDiagnostic (2821)
- ManuSpecificWiserEvent (65027)
- ManuSpecificCycleTime (65302)
- ManuSpecificHeatingCooling (65315)
Output clusters
- Identify (3)
- Time (10)
- Ota (25)
- MsTemperatureMeasurement (1026)
- MsOccupancySensing (1030)
Endpoint 2
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- MsTemperatureMeasurement (1026)
Output clusters
- Identify (3)
Endpoint 4
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- MsOccupancySensing (1030)
Output clusters
- Identify (3)
Endpoint 5
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- Groups (4)
- SeMetering (1794)
Endpoint 242
Profile: 41440
Output clusters
- GreenPower (33)
Reported attributes
- currentsummdelivered: 0
- heatingstatus: true
- localtemperature: 25.64
- occupiedcoolingsetpoint: 20.00
- occupiedheatingsetpoint: 18.00
- picoolingdemand: 0
- piheatingdemand: 0
- seopenwindowstatus: false
- sepowerdivisor: 1000
- sepowermultiplier: 1
- systemmode: 4


Manufacturer: Schneider Electric
Model: S520619
Firmware version: 001.000.071
Device type: Router
Power source: Mains
Receive when idle: Yes
Endpoint 1
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- Groups (4)
- HvacThermostat (513)
- HvacUserInterfaceCfg (516)
- HaDiagnostic (2821)
- ManuSpecificWiserEvent (65027)
- ManuSpecificCycleTime (65302)
- ManuSpecificHeatingCooling (65315)
Output clusters
- Identify (3)
- Time (10)
- Ota (25)
- MsTemperatureMeasurement (1026)
- MsOccupancySensing (1030)
Endpoint 2
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- MsTemperatureMeasurement (1026)
Output clusters
- Identify (3)
Endpoint 4
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- MsOccupancySensing (1030)
Output clusters
- Identify (3)
Endpoint 5
Profile: 260
Input clusters
- Basic (0)
- Identify (3)
- Groups (4)
- SeMetering (1794)
Endpoint 242
Profile: 41440
Output clusters
- GreenPower (33)
Reported attributes
- currentsummdelivered: 0
- heatingstatus: false
- localtemperature: 27.96
- occupiedheatingsetpoint: 19.00
- picoolingdemand: 0
- piheatingdemand: 0
- seopenwindowstatus: false
- sepowerdivisor: 1000
- sepowermultiplier: 1
- systemmode: 0


RE: Zigbee gateway integration - RomansP - 02.07.2025

Hi, hocine

Please give the output of your script.
I think that it is possible that you receive some nil value and try to
prepare some actions with nil, which causes the error


RE: Zigbee gateway integration - hocine - 02.07.2025

(02.07.2025, 10:58)RomansP Wrote: Hi, hocine

Please give the output of your script.
I think that it is possible that you receive some nil value and try to
prepare some actions with nil, which causes the error
I have to go back to the site because in the backup I made I no longer have the zigbee logs.

But is it possible to modify the zigbee software so that it doesn't get stuck when it receives nil information?


RE: Zigbee gateway integration - RomansP - 02.07.2025

I think that the easiest is to just slightly modify your script, to check every value is not a nil
And to check that you are doing everything correctly


RE: Zigbee gateway integration - ole - 18.08.2025

Hi all,

Does anyone know if this USB dongle will work with LM5?

Sonoff Gateway ZigBee 3.0 USB Dongle Plus


RE: Zigbee gateway integration - admin - 19.08.2025

Only old dongle based on CC2531 chip will work. It is not recommended due to lower performance and network device count compared to our RS232 gateway. RS232 is more robust compared to USB solutions.