plaksnor / HASS-JablotronSystem

Jablotron component for Home Assistant
20 stars 11 forks source link

Code with a star #10

Open PatrikTheDev opened 4 years ago

PatrikTheDev commented 4 years ago

Hey! I connected the main unit to my raspi, looked up the address (/dev/hidraw1) and installed the plugin. My password is X*XXXX so I added it to the config and I'm getting this error: File "/home/homeassistant/.homeassistant/custom_components/jablotron_system/alarm_control_panel.py", line 24, in async_setup_platform async_add_entities([JablotronAlarm(hass, config)]) TypeError: Can't instantiate abstract class JablotronAlarm with abstract methods supported_features

What can I do to solve it?

Shamshala commented 4 years ago

Have you tried to use the password without the star? πŸ™‚

PatrikTheDev commented 4 years ago

I had to leave so I haven’t had time to do so yet. I’ll try again tonight.

On Wed 1. 7. 2020 at 15:53 Shamshala notifications@github.com wrote:

Have you tried to use the password without the star? πŸ™‚

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plaksnor/HASS-JablotronSystem/issues/10#issuecomment-652432128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFPJ3LBSEUNQDBQJE5WHGDRZM5VLANCNFSM4ONMOFDA .

PatrikTheDev commented 4 years ago

Just tried, didn't help

Shamshala commented 4 years ago

Do you use just the @plaksnor's code without any modifications or did you edit few lines which are necessary for usage in newer HA versions? (as mentioned in several issues here πŸ™‚ )

Try my fork.

johro897 commented 4 years ago

Agree with @Shamshala find a fork that suits you. This repo is no longer updated.

PatrikTheDev commented 4 years ago

@Shamshala okay, tried your fork but I'm getting this error now: Unable to prepare setup for platform jablotron_system.binary_sensor: Platform not found (cannot import name 'BinarySensorEntity' from 'homeassistant.components.binary_sensor' (/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/binary_sensor/__init__.py)).

I just git cloned your repo in place of the old one

Shamshala commented 4 years ago

Just to make sure, what HA version do you use?

PatrikTheDev commented 4 years ago

Sorry, I was using an outdated install. Now I'm getting a different error:

custom_components.jablotron_system.binary_sensor Source: custom_components/jablotron_system/binary_sensor.py:90 Integration: jablotron_system First occurred: 12:40:10 AM (1 occurrences) Last logged: 12:40:10 AM

Unexpected error 1: can't concat NoneType to bytes

Shamshala commented 4 years ago

Ok, this time i need a bit more info because i don't know. πŸ˜†

You are still trying to use the star in your password, don't you? πŸ˜‰

PatrikTheDev commented 4 years ago

Without a star, it doesn’t work, with a star it still doesn’t. I’ll send you the error without a star, one sec.

On Fri 3. 7. 2020 at 11:21 Shamshala notifications@github.com wrote:

Ok, this time i need a bit more info because i don't know. πŸ˜†

You are still trying to use the star in your password, don't you? πŸ˜‰

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plaksnor/HASS-JablotronSystem/issues/10#issuecomment-653446282, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFPJ3LDSP257VI2QO7LPALRZWPINANCNFSM4ONMOFDA .

Shamshala commented 4 years ago

I was able to simulate the error by inserting a star in my code, that's why i've asked. :slightly_smiling_face:

Anyway, i thought i saw a post from someone else claiming the star is not passed to Jablotron system (unfortunately i don't know for certain because i don't have codes with prefixes). Try to use the password/code without quotation marks in your config, if you used them.

PatrikTheDev commented 4 years ago

Without a star (and a prefix) I’m getting this error:

Unexpected error: [Errno 13] Permission denied: '/dev/hidraw1'

On Fri 3. 7. 2020 at 11:33 Shamshala notifications@github.com wrote:

I was able to simulate the error by inserting a star in my code, that's why i've asked. πŸ™‚

Anyway, i thought i saw a post from someone else claiming the star is not passed to Jablotron system (unfortunately i don't know for certain because i don't have codes with prefixes). Try to use the password/code without quotation marks in your config, if you used them.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plaksnor/HASS-JablotronSystem/issues/10#issuecomment-653451662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFPJ3PZZHL4XPBKVBZEHGLRZWQW5ANCNFSM4ONMOFDA .

Shamshala commented 4 years ago

You shouldn't have used your code without a prefix. Just use the code without a star - means 1*2345 change to 12345 :slightly_smiling_face:

And you can try to use the password/code without quotation marks in your config, if you're using them.

PatrikTheDev commented 4 years ago

Still getting this error: DeviceScanner._read_loop(): Unexpected error: [Errno 13] Permission denied: '/dev/hidraw1' The same happens if I use hidraw0 (started appearing as hidraw0 after a system reboot)

This is the result of dmesg:

$ dmesg | grep hid [ 0.842205] hidraw: raw HID events driver (C) Jiri Kosina [ 0.844983] usbcore: registered new interface driver usbhid [ 0.847643] usbhid: USB HID core driver [ 2.301554] hid-generic 0003:16D6:0008.0001: hiddev96,hidraw0: USB HID v1.11 Device [Jablotron ltd JA-100 Flexi] on usb-3f980000.usb-1.3/input0 [ 2.667145] hid-generic 0003:8086:0808.0002: input,hidraw1: USB HID v1.00 Device [C-Media Electronics Inc. USB PnP Sound Device] on usb-3f980000.usb-1.5/input2 [ 43.392328] usbhid 1-1.3:1.0: can't add hid device: -32 [ 43.392388] usbhid: probe of 1-1.3:1.0 failed with error -32 [ 59.483937] hid-generic 0003:16D6:0008.0003: hiddev96,hidraw0: USB HID v1.11 Device [Jablotron ltd JA-100 Flexi] on usb-3f980000.usb-1.3/input0 [ 122.048110] hid-generic 0003:16D6:0008.0004: hiddev96,hidraw0: USB HID v1.11 Device [Jablotron ltd JA-100 Flexi] on usb-3f980000.usb-1.3/input0

On Fri 3. 7. 2020 at 11:48 Shamshala notifications@github.com wrote:

You shouldn't have used your code without prefix. Just use the code without a star - means 1*2345 change to 12345 πŸ™‚

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plaksnor/HASS-JablotronSystem/issues/10#issuecomment-653457772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFPJ3JHC44PRVOI5XJ4F3LRZWSNHANCNFSM4ONMOFDA .

Shamshala commented 4 years ago

Another question to make sure, is the used code for admins or is it just a user's code? In other words, are you able to use F-Link? (i don't mean J-Link which is free to use/download from the Jablotron's webpage)

If it is Admin's code, still doesn't work and you are not concerned much about "leaking" code to another person, we can try to sniff (OMG so much sniffing in this git page :rofl: ) the actuall sequence from the F-Link's communication - to be able to define a "corrected" version which should be accepted. :slightly_smiling_face:

PatrikTheDev commented 4 years ago

Is F-Link the tool the installers use? If yes, I don’t have access to it. The code I’m using is my personal one, not admin.

On Fri 3. 7. 2020 at 12:08 Shamshala notifications@github.com wrote:

Another question to make sure, is the used code for admins or is it just a user's code? In other words, are you able to use F-Link? (i don't mean J-Link which is free to use/download from the Jablotron's webpage)

If it is Admin's code, still doesn't work and you are not concerned much about "leaking" code to another person, we can try to sniff (OMG so much sniffing in this git page 🀣 ) the actuall sequence from the F-Link's communication - to be able to define a "corrected" version which should be accepted. πŸ™‚

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/plaksnor/HASS-JablotronSystem/issues/10#issuecomment-653466791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFPJ3NIMWTCR4GVLZ3LPT3RZWUY7ANCNFSM4ONMOFDA .

Shamshala commented 4 years ago

Yes it is but it's not about whether or not you have the software. There are "users", "admins" and "installers" codes and you should have an admin's code in order to be able to, let say, disable some sensors due to failure or because of pets, or to be able to rename your sensors, etc. (everything configurable via keypad)

Then you need to ask your installer to provide an admin code. I'm not sure about usage of this integration in combination with a user's password (at least for alarm panel) but it basically emulates F-Link.

johro897 commented 4 years ago

@Patrik-svobodik You should use hidraw1 according to your print out

what did dmesg | grep usb show?

Shamshala commented 4 years ago

Apparently he tried both hidraw1 and hidraw0.

@Patrik-svobodik Btw: AlarmPanel works even with only a user code. It's been a long time since these little attempts to test something so i forgot. πŸ˜†