zigpy / zigpy-zigate

A library which communicates with ZiGate radios for zigpy
GNU General Public License v3.0
29 stars 18 forks source link

Pizigate on odroid #86

Open CinPoU opened 3 years ago

CinPoU commented 3 years ago

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

Hedda commented 3 years ago

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/

MattWestb commented 3 years ago

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.

Hedda commented 3 years ago

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

CinPoU commented 3 years ago

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 commented 3 years ago

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

Hedda commented 3 years ago

@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 commented 3 years ago

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?

doudz commented 3 years ago

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

doudz commented 3 years ago

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

doudz commented 3 years ago

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