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


RE: Zigbee gateway integration - MLa - 28.02.2023

(28.02.2023, 15:16)Daniel Wrote: We always need device information for each device.
Are you sure that TRADFRI is not working? We implemented all of them.
Yes I have tried with several different TRADFRI devices, none of them update the status.
They respond when i press Read in the Zigbee app but does not update group adresess.
Might there be som other issue?

Magnus


RE: Zigbee gateway integration - tigi - 28.02.2023

Hi,

I'm trying to add the Tuya ZMS01 PIR Detector but for some reason it's not working.
I am able to add the device, a profile is connected to it (260) and the log shows a change when movement is detected (ZoneStatus goes from 0 to 1).

However I see nothing happen in the monitor nor do I see the attached group address change when movement is detected.
I'm wondering if a new profile needs to be created for this appliance or if I'm doing something wrong?
Also attached is the logging when joining.

   


RE: Zigbee gateway integration - tigi - 02.03.2023

(28.02.2023, 22:45)tigi Wrote: Hi,

I'm trying to add the Tuya ZMS01 PIR Detector but for some reason it's not working.
I am able to add the device, a profile is connected to it (260) and the log shows a change when movement is detected (ZoneStatus goes from 0 to 1).

However I see nothing happen in the monitor nor do I see the attached group address change when movement is detected.
I'm wondering if a new profile needs to be created for this appliance or if I'm doing something wrong?
Also attached is the logging when joining.

I was able to fetch som more data, however I'm not able to see it all because of 'nesting too deep'.
Is there a way to see all data transmitted?
Code:
* table:
["cluster"]
  * number: 0
["linkquality"]
  * number: 78
["group"]
  * number: 0
["direction"]
  * string: RX
["from"]
  * string: a4c1388ff0df6591
["srcep"]
  * number: 1
["data"]
  * table:
   ["FrameControl"]
    * table:
     [1]
      * string: FrameTypeGlobal
     [2]
      * string: DirectionFromServer
     [3]
      * string: DisableDefaultResponse
   ["TransactionSequenceNumber"]
    * number: 1
   ["GeneralCommandFrame"]
    * table:
     ["CommandIdentifier"]
      * string: ReadAttributesResponse
     ["ReadAttributesResponse"]
      * table:
       ["ReadAttributeStatusRecords"]
        * table:
         [1]
          * table:
           ["AttributeIdentifier"]
            * number: 3
           ["Status"]
            * string: SUCCESS
           ["Attribute"]
            * table:
             nesting too deep
         [2]
          * table:
           ["AttributeIdentifier"]
            * number: 4
           ["Status"]
            * string: SUCCESS
           ["Attribute"]
            * table:
             nesting too deep
         [3]
          * table:
           ["AttributeIdentifier"]
            * number: 5
           ["Status"]
            * string: SUCCESS
           ["Attribute"]
            * table:
             nesting too deep



RE: Zigbee gateway integration - admin - 02.03.2023

Log the inner structure like this:
Code:
log(frame.data.GeneralCommandFrame.ReadAttributesResponse.ReadAttributeStatusRecords)



RE: Zigbee gateway integration - MLa - 02.03.2023

I Reinstalled the zigbee app and changed network configuration, added the devices again. Now the IKEA devices are working? 

What information do you need in order to make profiles for Elko and philips hue?

I read last year that you are planning to add the ability to create custom profiles. Is that still the plan?

Magnus


(28.02.2023, 15:16)Daniel Wrote: We always need device information for each device.
Are you sure that TRADFRI is not working? We implemented all of them.
Yes I have tried with several different TRADFRI devices, none of them update the status.
They respond when i press Read in the Zigbee app but does not update group adresess.
Might there be som other issue?

Magnus


RE: Zigbee gateway integration - tigi - 02.03.2023

(02.03.2023, 11:47)admin Wrote: Log the inner structure like this:
Code:
log(frame.data.GeneralCommandFrame.ReadAttributesResponse.ReadAttributeStatusRecords)

Thx! Didn't know the limit starts from where you start to log.


RE: Zigbee gateway integration - tigi - 05.03.2023

For the last 3 zigbee devices I bought and the trouble I had/have I'm begining to realise it's no easy job to find the right device.
From what I've read, I think it has a lot to do with the zigbee version (Zigbee Stack) on the coördinator, zigbee products not following standards and the speed of evolution.

I bought 2 zigbee Bosch Smart plugs and wasn't able to pair them, figuring out hours later that they only work with a Bosch zigbee coördinator...or so Bosch says.
I bought 2 knockoff Tuya PIR sensors, thinking such a device would be easy to pair in LM with a 'standard' profile, which it didn't.
I bought a Philips Hue motion sensor and figured out this one paired but that was it, tried it numerous times but always the same result, no data coming through.

The only devices I haven't had any trouble with were the Aqara smart plugs and sensors.

I was still using the zigbee usb stick but had the rs232 version laying around and so I replaced the usb with rs232 version thinking that would change anything, but that didn't solve any of the above pairing problems.

I opted for another route and figured out I could use the recovered zigbee usb stick as 'test coördinator' in a Proxmox Zigbee2MQTT Virtual Machine and see what happens there.
After setting that up I tried pairing the knockoff Tuya PIR sensors which was...successfully.
I then tried pairing the Philips Hue Motion sensor and that also was successfully.

For the Bosch Smart Plugs that's another story, apparently I had to do some extra steps such as adding an external convertor file in zigbee2mqtt, scan the QR-code on the Bosch Smart Plug and enter that string somewhere into zigbee2mqtt as 'install code'.
When trying that zigbee2mqtt showed a message 'Install code is not supported for ZStack 1.2 adapter'
So when I buy another zigbee coördinator (zigstar) I guess I'll be able to use those Bosch plugs eventually.

I'm guessing that the zigbee usb stick from openrb I had used in the LM has ZStack 1.2 on it.
Which Zstack version is the rs232 zigbee device using?
Does this also gets updated on a regulary basis with the LM updates or how is this done?
Are there plans to incorporate the use of install codes such as it is with the Bosch Plug?

Thanks!


RE: Zigbee gateway integration - Daniel - 06.03.2023

All what you wrote here is a sad true about Zigbee standard, it exists by just by a name. Unfortunately a rarely any manufacture is fallowing it and they implement a lot of custom stuff. Due to this nearly any device has to be implemented individually.
This is our list of supported devices https://openrb.com/docs/zigbee-devices.htm and it will keep growing. You can make a request here and ask for a integration. Majority of devices are quite easy to add but there are some which are very complex and we can't guarantee that everything is possible.
Rs232 is using different chip which support 50 devices vs 15 the usb.
The Bosch devices are the complex one which we will probably skip.


RE: Zigbee gateway integration - admin - 06.03.2023

RS232 version uses ZigBee 3.0 stack.
Motion sensors and similar security devices require a profile. There's no "standard" profile. While ZigBee if one of the better wireless technologies it's still a mess in some places. Security devices can report status in either bit 0 or bit 1 so it's impossible to know where the status comes from without a profile. Most manufacturers don't care about interoperability, just so their own devices work with their own gateway.


RE: Zigbee gateway integration - tigi - 06.03.2023

Thanks for your answers Daniel and Admin.

I'm happy to hear I'm not the only one that has the same thoughts about zigbee and standards.
I thought the zigbee alliance would have the same 'sort of' standardisation as knx, where devices from numerous manufacturers, as far as my experience goes, just work.

It's a pity to see such an opportunity evolving to the same wild-west secenarios of many technologies.

Whereas you should be able to make a choice for a sensor based on features, reliability,etc ..., the main concern is if matches the zigbee configuration you personally have and even then you have to make compromises because you're probably stuck with the firmware it left the factory...only those dedicated same branded zigbee coördinators know how to do ota updates for their own devices. Seeing other 'standards' emerge such as matter an thread I'm wondering how this will evolve...

I'm happy to hear the rs232 version has zstack3! Is there a roadmap for upgrading this to future standards or versions?
Thanks for the device list, I'll save that in my bookmarks and also thanks for the effort and support in adding new profiles for the LM!

I understand that you don't want to put effort in the Bosch smart plugs, it's a niche product also a closed system.
Maybe someone with time on it's hands, the necessary knowledge and in possession of such Bosch Smart plugs can make a script to pair such complex devices. Apparently it's possible as the folks at zigbee2mqtt did it. But I'm not able to realize that.


RE: Zigbee gateway integration - jeeone - 11.04.2023

Hello, could you please add the TRAFDI SHORTCUT Button ?
(https://www.ikea.lv/lv/products/elektropreces/savienojamiba-un-vadiba/savienojamiba-un-vadiba/tradfri-iscela-poga-balta-krasa-art-40467765)

Manufacturer: IKEA of Sweden
Model: TRADFRI SHORTCUT Button

Device type: End device
Power source: Battery
Receive when idle: No

Endpoint 1
Profile: 260
Input clusters
- Basic (0)
- PowerCfg (1)
- Identify (3)
- Alarms (9)
- PollCtrl (32)
- LightLink (4096)
Output clusters
- Identify (3)
- Groups (4)
- OnOff (6)
- LevelCtrl (8)
- Ota (25)
- ClosuresWindowCovering (258)
- LightLink (4096)


RE: Zigbee gateway integration - admin - 11.04.2023

Go to Menu > Monitor, then press "Start monitor". What kind of message do you get when pressing the shortcut button?


RE: Zigbee gateway integration - jeeone - 11.04.2023

(11.04.2023, 07:32)admin Wrote: Go to Menu > Monitor, then press "Start monitor". What kind of message do you get when pressing the shortcut button?

The button was added yesterday, then when I push the button nothing happens


RE: Zigbee gateway integration - jeeone - 11.04.2023

(11.04.2023, 07:32)admin Wrote: Go to Menu > Monitor, then press "Start monitor". What kind of message do you get when pressing the shortcut button?

Try to add device:
#
Time
Type
Address
Cluster
Action
 Stop monitor  Export CSV  Clear
Data5
17:55:25.685
RX 34%
540f57fffef58edf
Identify
IdentifyQuery
-
4
17:55:19.147
RX
-
-
reload
-
3
17:55:19.134
RX 33%
540f57fffef58edf
Basic
ReadAttributesResponse
ReadAttributeStatusRecords = [ { Attribute = { Type = uint8, Value = 1 }, AttributeIdentifier = 3, Status = SUCCESS }, { Attribute = { Type = string, Value = IKEA of Sweden }, AttributeIdentifier = 4, Status = SUCCESS }, { Attribute = { Type = string, Value = TRADFRI SHORTCUT Button }, AttributeIdentifier = 5, Status = SUCCESS } ]
2
17:55:17.874
RX
-
-
announce
ieeeaddr = 540f57fffef58edf, nwkaddr = 16480

When push button:
the log is empty


RE: Zigbee gateway integration - Zen - 13.04.2023

Is it possible to add this?
The device is an MHCOZY 4-channel ZigBee Relay - it identifies itself like a 1-channel switch but, as you can check in the profile, the channels are 4.
--------------------------------------

Manufacturer: _TZ3000_u3oupgdy
Model: TS0004

Device type: Router
Power source: Mains
Receive when idle: Yes

Endpoint 1
Profile: 260
Input clusters
- Identify (3)
- Groups (4)
- Scenes (5)
- OnOff (6)
- 57344
- 57345
- Basic (0)
Output clusters
- Ota (25)
- Time (10)

Endpoint 2
Profile: 260
Input clusters
- Groups (4)
- Scenes (5)
- OnOff (6)
- 57345

Endpoint 3
Profile: 260
Input clusters
- Groups (4)
- Scenes (5)
- OnOff (6)
- 57345

Endpoint 4
Profile: 260
Input clusters
- Groups (4)
- Scenes (5)
- OnOff (6)
- 57345

Endpoint 242
Profile: 41440
Output clusters
- GreenPower (33)

Reported attributes
- onoff: false


RE: Zigbee gateway integration - admin - 25.04.2023

New app version has been published. For devices that didn't have profiles before you need to reset and pair again.


RE: Zigbee gateway integration - CarlS - 25.04.2023

(25.04.2023, 11:01)admin Wrote: New app version has been published. For devices that didn't have profiles before you need to reset and pair again.

Hello,

I'm not able to add new Zigbee devices after installing the updated Zigbee app

Firmware  on LM5 is 20230307
I use USB stick. FW 20201127 ?

any suggestions?
Quote:2023-04-25 18:23:09
CC: initialized (FW 20201127)
2023-04-25 18:23:09
CC: device state changed to 9
2023-04-25 18:23:08
CC: subscribed to MT_DEBUG events
2023-04-25 18:23:08
CC: subscribed to MT_SYS events
2023-04-25 18:23:08
CC: subscribed to MT_ZDO events
2023-04-25 18:23:08
CC: subscribed to MT_UTIL events
2023-04-25 18:23:08
CC: subscribed to MT_AF events
2023-04-25 18:23:08
CC: firmware supports all needed features
2023-04-25 18:23:08
CC: reset successful (0)
2023-04-25 18:23:07
ZB: attribute report from 9035eafffeb811fa:
{ currentsummdelivered = 17098164 }
2023-04-25 18:23:07
ZB: sending ZCL message to 9035eafffeb811fa, cluster 0702:
{ FrameControl = [ "FrameTypeGlobal", "DirectionFromServer", "DisableDefaultResponse" ], TransactionSequenceNumber = 97, GeneralCommandFrame = { CommandIdentifier = "DefaultResponse", DefaultResponse = { Status = "SUCCESS", CommandIdentifier = 10 } } }
2023-04-25 18:23:07
ZB: packet from 9035eafffeb811fa:
{ FrameControl = [ "FrameTypeGlobal", "DirectionFromServer" ], TransactionSequenceNumber = 97, GeneralCommandFrame = { CommandIdentifier = "ReportAttributes", ReportAttributes = { AttributeReports = [ { AttributeIdentifier = 0, Attribute = { Type = "uint48", Value = 17098164 } } ] } } }
2023-04-25 18:23:07
CC: incoming message from 393D, cluster 0702, dst EP 1
2023-04-25 18:23:07
ZB: attribute report from 9035eafffeb811fa:
{ rmsvoltage = 701 }
2023-04-25 18:23:07
ZB: sending ZCL message to 9035eafffeb811fa, cluster 0B04:
{ FrameControl = [ "FrameTypeGlobal", "DirectionFromServer", "DisableDefaultResponse" ], TransactionSequenceNumber = 96, GeneralCommandFrame = { CommandIdentifier = "DefaultResponse", DefaultResponse = { Status = "SUCCESS", CommandIdentifier = 10 } } }
2023-04-25 18:23:07
ZB: packet from 9035eafffeb811fa:
{ FrameControl = [ "FrameTypeGlobal", "DirectionFromServer" ], TransactionSequenceNumber = 96, GeneralCommandFrame = { CommandIdentifier = "ReportAttributes", ReportAttributes = { AttributeReports = [ { AttributeIdentifier = 1285, Attribute = { Type = "uint16", Value = 701 } } ] } } }
2023-04-25 18:23:07
CC: incoming message from 393D, cluster 0B04, dst EP 1
2023-04-25 18:23:07
CC: resetting device
2023-04-25 18:22:35
TASK cc_dongle_incoming_message aborted: stack traceback:
[C]: in function 'error'
/tmp/tmp.EXsohjwg5v/files/store/daemon/zigbee/lib/ctx.lua:191: in function 'task_resume'
/tmp/tmp.EXsohjwg5v/files/store/daemon/zigbee/lib/ctx.lua:209: in function 'callback'
/tmp/tmp.EXsohjwg5v/files/store/daemon/zigbee/lib/ctx.lua:70: in function 'fire'
...Xsohjwg5v/files/store/daemon/zigbee/zigbee/cc-dongle.lua:269: in function 'incoming_msg'
...Xsohjwg5v/files/store/daemon/zigbee/zigbee/cc-dongle.lua:284: in function <...Xsohjwg5v/files/store/daemon/zigbee/zigbee/cc-dongle.lua:280>

2023-04-25 18:22:35
TASK zb_rx_handler aborted: stack traceback:
[C]: in function 'error'
/tmp/tmp.EXsohjwg5v/files/store/daemon/zigbee/lib/ctx.lua:191: in function 'task_resume'
/tmp/tmp.EXsohjwg5v/files/store/daemon/zigbee/lib/ctx.lua:209: in function 'callback'
/tmp/tmp.EXsohjwg5v/files/store/daemon/zigbee/lib/ctx.lua:70: in function 'fire'
...tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/core.lua:855: in function 'rx_handler'
...tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/core.lua:944: in function <...tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/core.lua:940>
2023-04-25 18:22:35
TASK zigbee_provisioning aborted: stack traceback:
.../tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/zcl.lua: in function 'getnamedattributes'
...tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/core.lua:243: in function 'readfwreversion'
...tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/core.lua:606: in function <...tmp.EXsohjwg5v/files/store/daemon/zigbee/zigbee/core.lua:585>
2023-04-25 18:22:35
ZB: hardware report of 04cd15fffeb166ef: Micro Matic Norge AS / SZ1000
2023-04-25 18:22:35
ZB: packet from 04cd15fffeb166ef:
{ FrameControl = [ "FrameTypeGlobal", "DirectionFromServer", "DisableDefaultResponse" ], TransactionSequenceNumber = 1, GeneralCommandFrame = { CommandIdentifier = "ReadAttributesResponse", ReadAttributesResponse = { ReadAttributeStatusRecords = [ { AttributeIdentifier = 3, Status = "SUCCESS", Attribute = { Type = "uint8", Value = 1 } }, { AttributeIdentifier = 4, Status = "SUCCESS", Attribute = { Type = "string", Value = "Micro Matic Norge AS" } }, { AttributeIdentifier = 5, Status = "SUCCESS", Attribute = { Type = "string", Value = "SZ1000" } } ] } } }
2023-04-25 18:22:35
CC: incoming message from 0FDE, cluster 0000, dst EP 1
2023-04-25 18:22:35
ZB: sending ZCL message to 04cd15fffeb166ef, cluster 0000:
{ FrameControl = [ "FrameTypeGlobal", "DirectionToServer" ], TransactionSequenceNumber = 1, GeneralCommandFrame = { CommandIdentifier = "ReadAttributes", ReadAttributes = { AttributeIdentifiers = [ 3, 4, 5 ] } } }
2023-04-25 18:22:35
CC: querying simple descriptor for EP 242 of device 0FDE
2023-04-25 18:22:35
CC: querying simple descriptor for EP 1 of device 0FDE
2023-04-25 18:22:35
CC: enumerate endpoints for device 0FDE
2023-04-25 18:22:35
CC: querying node descriptor for device 0FDE
2023-04-25 18:22:35
ZB: new device 04cd15fffeb166ef, starting provisioning
2023-04-25 18:22:35
ZB: unknown device with NWK addr 0FDE
2023-04-25 18:22:35
CC: end device announce received, device is 04cd15fffeb166ef (short: 0FDE)



RE: Zigbee gateway integration - admin - 25.04.2023

Update the app to 20230425 and see if it helps.


RE: Zigbee gateway integration - CarlS - 25.04.2023

(25.04.2023, 16:48)admin Wrote: Update the app to 20230425 and see if it helps.

Everything seems to be ok now

Thanks a lot Smile

Carl


RE: Zigbee gateway integration - CarlS - 26.04.2023

(25.04.2023, 17:50)CarlS Wrote:
(25.04.2023, 16:48)admin Wrote: Update the app to 20230425 and see if it helps.

Everything seems to be ok now

Thanks a lot Smile

Carl

It seems that there is a couple of problems with the device with profile name TuYa - 16A Relay / Smart Plug
(Manufacturer: _TZ3000_eyzb8yg3
Model: TS0121)

1. It does not report RmsCurrent, RmsVoltage and CurrentSummDelivered automatically, so I run this script every minute.
    I don't know if it should report automatically. However, the script works, and the group addresses are updated

Code:
zb = require('applibs.zigbee')

--Manual reading--

--Create table
local zbtable = {
    'CurrentSummDelivered'
}
zb.cmd('getnamedattributes', '943469fffe715fae',1794, zbtable,1)

--Create table
local zbtable2 = {
    'RmsVoltage',
    'RmsCurrent'
}

zb.cmd('getnamedattributes', '943469fffe715fae',2820, zbtable2,2)

2. When I write to the On/off group address the relay is turned on and off, but I get no response to the status group address.
Nothing is shown in the monitor.
Only this line in the log:
Code:
2023-04-26 17:07:32    ZB: sending ZCL message to 943469fffe715fae, cluster 0006:
{ FrameControl = [ "FrameTypeLocal", "DirectionToServer", "DisableDefaultResponse" ], TransactionSequenceNumber = 100, OnOffClusterFrame = { CommandIdentifier = "On" } }