rron
(Rron)
September 26, 2020, 7:11pm
1
Have an issue with OWEN Plc - the switch is often unavailable for a short period of time.
Log of changing state:
22:09:06 Turned on
22:08:33 Changed to unavailable
22:08:06 Turned on
22:07:33 Changed to unavailable
22:07:06 Turned on
22:06:33 Changed to unavailable
22:06:06 Turned on
22:05:33 Changed to unavailable
22:05:06 Turned on
22:04:33 Changed to unavailable
22:04:06 Turned on
22:03:33 Changed to unavailable
There was a one release of HA with no issue but I didnt remember when it was (may be more that half an year).
My test config is:
modbus:
type: tcp
host: 192.168.88.9
port: 502
name: OWEN
timeout: 3
delay: 1
switch:
platform: modbus
coils:
- name: OWEN_Switch1
hub: OWEN
slave: 1
coil: 5
Try different values for delay and timeout (from 0.01 to 3)
My be my config is wrong?
ploto22
(Paolo)
October 4, 2020, 9:28pm
2
Record pls the error log
Insert into configuration. yaml
logger:
logs:
homeassistant.components.modbus: debug
pymodbus.client: debug
Bye
Paolo
rron
(Rron)
October 6, 2020, 6:18pm
4
@ploto22 While I see in GUI record: 21:13:44 Changed to unavailable
The log records are:
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.transaction] Running transaction 27
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.transaction] SEND: 0x0 0x1b 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x5 0x0 0x1
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.client.sync] New Transaction state ‘SENDING’
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.transaction] Transaction failed. ([Errno 32] Broken pipe)
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.framer.socket_framer] Processing:
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.transaction] Getting transaction 27
2020-10-06 21:13:44 DEBUG (SyncWorker_7) [pymodbus.transaction] Changing transaction state from ‘PROCESSING REPLY’ to ‘TRANSACTION_COMPLETE’
2020-10-06 21:13:44 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.owen_switch1, old_state=<state switch.owen_switch1=off; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:15.140283+03:00>, new_state=<state switch.owen_switch1=unavailable; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:44.140879+03:00>>
2020-10-06 21:13:44 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state switch.owen_switch1=unavailable; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:44.140879+03:00>
2020-10-06 21:13:44 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140282863914288] Sending {‘id’: 2, ‘type’: ‘event’, ‘event’: <Event state_changed[L]: entity_id=switch.owen_switch1, old_state=<state switch.owen_switch1=off; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:15.140283+03:00>, new_state=<state switch.owen_switch1=unavailable; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:44.140879+03:00>>}
and while 21:14:15 Turned off :
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.transaction] Changing transaction state from ‘WAITING FOR REPLY’ to ‘PROCESSING REPLY’
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.transaction] RECV: 0x0 0x1c 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.framer.socket_framer] Processing: 0x0 0x1c 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.factory] Factory Response[ReadCoilsResponse: 1]
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.transaction] Adding transaction 28
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.transaction] Getting transaction 28
2020-10-06 21:14:15 DEBUG (SyncWorker_14) [pymodbus.transaction] Changing transaction state from ‘PROCESSING REPLY’ to ‘TRANSACTION_COMPLETE’
2020-10-06 21:14:15 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.owen_switch1, old_state=<state switch.owen_switch1=unavailable; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:44.140879+03:00>, new_state=<state switch.owen_switch1=off; friendly_name=OWEN_Switch1 @ 2020-10-06T21:14:15.140325+03:00>>
2020-10-06 21:14:15 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state switch.owen_switch1=off; friendly_name=OWEN_Switch1 @ 2020-10-06T21:14:15.140325+03:00>
2020-10-06 21:14:15 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140282863914288] Sending {‘id’: 2, ‘type’: ‘event’, ‘event’: <Event state_changed[L]: entity_id=switch.owen_switch1, old_state=<state switch.owen_switch1=unavailable; friendly_name=OWEN_Switch1 @ 2020-10-06T21:13:44.140879+03:00>, new_state=<state switch.owen_switch1=off; friendly_name=OWEN_Switch1 @ 2020-10-06T21:14:15.140325+03:00>>}
rron
(Rron)
March 24, 2021, 7:41pm
5
The problem is still actual, can you help with it?
ploto22
(Paolo)
April 3, 2021, 9:13pm
6
Sorry but it is no clear the fault . . .
Have you some error / warning in the HA log ?
Can you have test the data with Modbus tester ?
Bye
Paolo
ybcswz
(swz)
August 9, 2021, 7:57am
8
I have the same issue,and the switch state chages to truned off automatically ater a while
Hi
I have the same problem. Did you found a solution?
Thanks