Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberrypi no Serial radings (and also no lLAN connection) #21

Open
alws34 opened this issue Nov 25, 2022 · 4 comments
Open

Raspberrypi no Serial radings (and also no lLAN connection) #21

alws34 opened this issue Nov 25, 2022 · 4 comments

Comments

@alws34
Copy link

alws34 commented Nov 25, 2022

Hi!
i want to use this script inside a telegram bot that im developing (call it a HA replacement....) but i cannot figure this one out...

i have tried connecting the alarm directly to a rpi (3b+) using the diagram in the readme, but with 0 luck.
i also trying to acess it with the net4pro (this)
but nothing works... im able to achive connection but i dont read\write anything....

what ive done
set up and connect as the diagram in the readme describes.
set the pi's gpio baud to 2400 to no avail.
connect with the net4pro but also that didnt work..
i also tried crossing the Tx and Rx ........

no matter what i do (both methods)

while not data:
      data = self._channel.read(1)

just returns '' (empty)
and the loop goes infinite... (i added a retry counter for 3 times but it doesnt matter w\wo....)
no data is being transferred between the devices.

no matter what i do (both methods)

while not data:
      data = self._channel.read(1)

just returns '' (empty)
and the loop goes infinite... (i added a retry counter for 3 times but it doesnt matter w\wo....)

configurations:

configurations:
server:
--port 1492
ssl + ssl cert
--key "a"... just for testing....
--zones 32
--log_level "DEBUG"

for serial
--serialport "/dev/ttyS0"

for ethernert:
--pima_host : net4pro ip (static)
--pima_port 80
--login master code

for ethernet
the net4pro is configured as follows:

static ip address
serial frame length 64
serial framing timeout 2000
remote server the pi's
server port 1492

would appreciate the help !

@maorcc
Copy link
Contributor

maorcc commented Nov 25, 2022

Hey @alws34, did you enable the alarm serial port connection using the alarm keypad?
https://github.com/deiger/Alarm#enabling-the-alarm-serial-port-or-network-connection

@alws34
Copy link
Author

alws34 commented Nov 26, 2022

hi maor, thank you for the quick reply

yes, i did enebaled the serial connection to the alarm.

@alws34

This comment was marked as outdated.

@alws34
Copy link
Author

alws34 commented Dec 10, 2022

Hey @alws34, did you enable the alarm serial port connection using the alarm keypad? https://github.com/deiger/Alarm#enabling-the-alarm-serial-port-or-network-connection

Hi!
i have managed to connect with the alarm and get output
but the code breaks while trying to get status (get_status) method
i tries to debug this for several hours now with no luck...
attaching the output log:

*what i think is the problem is the ")\x0c" at the beginning... the 0c does not being parsed....

would appreciate any suggestion haha

maybe i need to change the _Message and _Cahnnel values? ....

i have changed the logging mechanism.....:
Port: /dev/ttyS0

Recieved Raw data: b')\x0c 00000062837900001010706002001\xea\xe5'

Recieved Raw data length: 41

Recieved Data hex:29 0c 20 2a 30 30 30 30 30 30 36 32 38 33 2a 37 39 30 2a 30 30 30 2a 31 2a 30 31 2a 30 37 30 36 30 30 2a 32 2a 30 30 2a 31 2a ea e5

Sent message <<<: 04 0c 05 00 00 91 e2

Recieved Raw data: b')\x0c 00000062837900001010706002001\xea\xe5'

Recieved Raw data length: 41

Recieved Data hex:29 0c 20 2a 30 30 30 30 30 30 36 32 38 33 2a 37 39 30 2a 30 30 30 2a 31 2a 30 31 2a 30 37 30 36 30 30 2a 32 2a 30 30 2a 31 2a ea e5

Sent message <<<: 04 0c 05 00 00 91 e2

Invalid message b' '.

Failed to create alarm object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants