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

KeyError: 'entrance' #2

Closed
robinhur opened this issue May 15, 2021 · 2 comments
Closed

KeyError: 'entrance' #2

robinhur opened this issue May 15, 2021 · 2 comments

Comments

@robinhur
Copy link

robinhur commented May 15, 2021

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3452, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1779, in loop_forever
    rc = self.loop(timeout, max_packets)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1181, in loop
    rc = self.loop_read(max_packets)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1572, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2310, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2936, in _packet_handle
    return self._handle_publish()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3216, in _handle_publish
    self._handle_on_message(message)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3444, in _handle_on_message
    self.on_message(self, self._userdata, message)
  File "/srv/sds_wallpad.py", line 731, in mqtt_on_message
    mqtt_virtual(topics, payload)
  File "/srv/sds_wallpad.py", line 637, in mqtt_virtual
    virtual_trigger[device][(trigger, payload)] = time.time()
KeyError: 'entrance'```

ew11로 socket 모드를 활용하고 있습니다만
이상하게 gas는 이것저것 옵션을 활용해보아도 되질 않네요

```serial_mode: socket
entrance_mode: 'off'
wallpad_mode: 'on'
intercom_mode: 'on'```

소켓 모드에서 엘베호출/현관열기가 안된다는 사실이 안타깝습니다만
가스가 안된다는 부분은 보질 못한 것 같아서요

확인 부탁드립니다
필요하신 추가정보가 있으시면 말씀주시기 바랍니다

늘 감사합니다
@n-andflash
Copy link
Owner

안녕하세요,

가스밸브 관련, 현재의 switch.sds_gas_cutoff 는 현관스위치 에뮬레이션을 통해 지원하므로 entrance_mode를 사용할때만 동작합니다. entrance_mode 를 사용하지 못하는 분들을 위해 sds_gas_value_1 을 sensor가 아닌 switch로 만들어서 차단 기능을 지원했어야 했는데 생각이 짧았네요. 기회가 될때 수정해 두겠습니다.

여담이지만 사용하시는 설정 중 intercom_mode 도 socket에서는 정상 동작하지 않을 것이므로 off 로 설정해주시면 좋을거 같습니다.

추가사항 있으시면 댓글 주세요.
감사합니다.

@n-andflash
Copy link
Owner

version 10에서 sds_gas_value_1을 switch로 변경했습니다.

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