zigpy-zigate icon indicating copy to clipboard operation
zigpy-zigate copied to clipboard

Pizigate on odroid

Open CinPoU opened this issue 3 years ago • 10 comments

Could you please add the odroid as a compatible hardware for the pizigate?

CinPoU avatar Apr 30 '21 07:04 CinPoU

FYI, ZiGate compatible with different computers is not decided at the zigpy-zigate level at all. ZiGate models compatible with different computers depends on ZiGate hardware and not the zigpy-zigate project. To make this fact a little more clear suggest change readme as per https://github.com/zigpy/zigpy-zigate/pull/94

@CinPoU As such you might want to try contacting ZiGate and get them to also clarify compatibility on their webpage for PiZiGate:

https://zigate.fr/produit/pizigatev2/

Hedda avatar Jun 10 '21 07:06 Hedda

It can being problem then the Pi is using 5 V and normal TTL is using 3.3 V but very likely the HAT cant handle both OK.

MattWestb avatar Jun 10 '21 07:06 MattWestb

Obviously comment "Raspberry Pi compatible GPIO header" also means that it must also offer the same voltage as Raspberry Pi.

Hedda avatar Jun 10 '21 08:06 Hedda

Hi!

The pizigate is compatible with odroid, i used it with raspbian and jeedom.

But the zigpy-zigate's code check the model of the motherboard, and if it's not a raspberry, there's an error. So, could you add the odroid motherboard as a compatible device please?

Best regards

CinPoU avatar Jun 10 '21 09:06 CinPoU

in setup.py

try: with open('/proc/cpuinfo', 'r') as cpuinfo: found = False for line in cpuinfo: if line.startswith('Hardware'): found = True label, value = line.strip().split(':', 1) value = value.strip() if value not in ( 'BCM2708', 'BCM2709', 'BCM2835', 'BCM2836' ): if raise_on_errors: raise ValueError( 'This system does not appear to be a Raspberry Pi.' ) else: return False

CinPoU avatar Jun 10 '21 09:06 CinPoU

@doudz did you intend that zigpy-zigate should only work with Raspberry Pi?

Does zigpy-zigate really need to check CPU and hardware at all?

If so then should not either work with OpenLumi ("Open Lumi Gateway" DIY ZiGate WiFi bridge hacked from Xiaomi Lumi Gateway ZHWG11LM or DGNWG02LM with modded OpenWRT firmware for the OS and ZiGate firmware on its NXP module for Zigbee), or?

https://openlumi.github.io

https://github.com/openlumi

https://github.com/zigpy/zigpy-zigate/issues/59

Hedda avatar Jun 10 '21 09:06 Hedda

in setup.py

try: with open('/proc/cpuinfo', 'r') as cpuinfo: found = False for line in cpuinfo: if line.startswith('Hardware'): found = True label, value = line.strip().split(':', 1) value = value.strip() if value not in ( 'BCM2708', 'BCM2709', 'BCM2835', 'BCM2836' ): if raise_on_errors: raise ValueError( 'This system does not appear to be a Raspberry Pi.' ) else: return False

@doudz This should maybe not be closed as CinPoU points out that zigpy-zigate setup is currently requiring Raspberry Pi to run?

Hedda avatar Jun 11 '21 07:06 Hedda

The Rpi detection is used to add rpi.gpio requirement dynamically during setup. Pizigate need it , not other zigate boards.

doudz avatar Jun 11 '21 10:06 doudz

Is there a way to check if we are on odroid board ?

doudz avatar Jun 11 '21 10:06 doudz

Maybe on odroid we need to install Odroid.GPIO instead of Rpi.GPIO ?

doudz avatar Jun 11 '21 10:06 doudz