DeerMaximum / Technische-Alternative-CoE

Custom Home Assistant integration to read data from a C.M.I. via CoE
MIT License
9 stars 1 forks source link

send input_boolean not working #31

Closed molelightn closed 9 months ago

molelightn commented 9 months ago

Hi,

i was testing the past days and got a good working result for analog entities, it is updating whenever they change - perfect .

For digital values I created "input_boolean.digital1" and it seems something is wrong with sending.

Switch is off: image

Coe Status show D1 at 1 with unit 2B image

debug from coe addon show me TRUE image

If i toogle off/on/off, debug log from coe addon show me TRUE all the time. image

On CoE status page from CMI i see the time immediatly jump to 0 when i trigger something in HA. So sent data from HA are definitily received but i do not get it why it is TRUE all the time.

I have tested this on my prod and dev system and in both i can reproduce the problem.

Do i miss something? Any else you need?

br & ty mole

DeerMaximum commented 9 months ago

Could you enable the debug logs on the integration and send me the logs.

logger:
  default: info
  logs:
    custom_components.ta_coe: debug
    ta_cmi: debug
molelightn commented 9 months ago

sure, a couple of times i switched on/off:

2023-09-17 13:40:31.260 DEBUG (MainThread) [ta_cmi] Update CoE data 2023-09-17 13:40:31.260 DEBUG (MainThread) [ta_cmi] Receive data from CoE server: http://a824d5a9-ta-coe:9000/receive 2023-09-17 13:40:31.265 DEBUG (MainThread) [ta_cmi] Received data from CoE server: {'digital': [], 'analog': [{'value': 0.0, 'unit': 11}, {'value': 9.0, 'unit': 19}, {'value': 0.0, 'unit': 0}, {'value': 0.0, 'unit': 0}], 'last_update_unix': 1694950777.293903, 'last_update': '2023-09-17T13:39:37.293903'} 2023-09-17 13:40:31.265 DEBUG (MainThread) [custom_components.ta_coe] Finished fetching ta_coe data in 0.005 seconds (success: True) 2023-09-17 13:40:40.038 DEBUG (MainThread) [custom_components.ta_coe] Handle new state input_boolean.digital1: on 2023-09-17 13:40:40.038 DEBUG (MainThread) [custom_components.ta_coe] Update digital value without update input_boolean.digital1: True 2023-09-17 13:40:40.038 DEBUG (MainThread) [custom_components.ta_coe] Send digital update to server: input_boolean.digital1 2023-09-17 13:40:40.038 DEBUG (MainThread) [ta_cmi] Send digital values to CoE server 2023-09-17 13:41:31.259 DEBUG (MainThread) [custom_components.ta_coe] Try to update CoE 2023-09-17 13:41:31.259 DEBUG (MainThread) [ta_cmi] Update CoE data 2023-09-17 13:41:31.259 DEBUG (MainThread) [ta_cmi] Receive data from CoE server: http://a824d5a9-ta-coe:9000/receive 2023-09-17 13:41:31.263 DEBUG (MainThread) [ta_cmi] Received data from CoE server: {'digital': [], 'analog': [{'value': 0.0, 'unit': 11}, {'value': 9.0, 'unit': 19}, {'value': 0.0, 'unit': 0}, {'value': 0.0, 'unit': 0}], 'last_update_unix': 1694950837.292821, 'last_update': '2023-09-17T13:40:37.292821'} 2023-09-17 13:41:31.263 DEBUG (MainThread) [custom_components.ta_coe] Finished fetching ta_coe data in 0.004 seconds (success: True) 2023-09-17 13:41:50.125 INFO (SyncWorker_3) [homeassistant.loader] Loaded intent from homeassistant.components.intent 2023-09-17 13:41:50.148 INFO (MainThread) [homeassistant.setup] Setting up intent 2023-09-17 13:41:50.167 INFO (MainThread) [homeassistant.setup] Setup of domain intent took 0.0 seconds 2023-09-17 13:42:27.377 DEBUG (MainThread) [custom_components.ta_coe] Handle new state input_boolean.digital1: off 2023-09-17 13:42:27.378 DEBUG (MainThread) [custom_components.ta_coe] Update digital value without update input_boolean.digital1: True 2023-09-17 13:42:27.378 DEBUG (MainThread) [custom_components.ta_coe] Send digital update to server: input_boolean.digital1 2023-09-17 13:42:27.378 DEBUG (MainThread) [ta_cmi] Send digital values to CoE server 2023-09-17 13:42:31.260 DEBUG (MainThread) [custom_components.ta_coe] Try to update CoE 2023-09-17 13:42:31.260 DEBUG (MainThread) [ta_cmi] Update CoE data 2023-09-17 13:42:31.260 DEBUG (MainThread) [ta_cmi] Receive data from CoE server: http://a824d5a9-ta-coe:9000/receive 2023-09-17 13:42:31.262 DEBUG (MainThread) [ta_cmi] Received data from CoE server: {'digital': [], 'analog': [{'value': 0.0, 'unit': 11}, {'value': 9.0, 'unit': 19}, {'value': 0.0, 'unit': 0}, {'value': 0.0, 'unit': 0}], 'last_update_unix': 1694950897.291748, 'last_update': '2023-09-17T13:41:37.291748'} 2023-09-17 13:42:31.262 DEBUG (MainThread) [custom_components.ta_coe] Finished fetching ta_coe data in 0.002 seconds (success: True) 2023-09-17 13:43:15.415 DEBUG (MainThread) [custom_components.ta_coe] Handle new state input_boolean.digital1: on 2023-09-17 13:43:15.416 DEBUG (MainThread) [custom_components.ta_coe] Update digital value without update input_boolean.digital1: True 2023-09-17 13:43:15.416 DEBUG (MainThread) [custom_components.ta_coe] Send digital update to server: input_boolean.digital1 2023-09-17 13:43:15.416 DEBUG (MainThread) [ta_cmi] Send digital values to CoE server 2023-09-17 13:43:31.260 DEBUG (MainThread) [custom_components.ta_coe] Try to update CoE 2023-09-17 13:43:31.260 DEBUG (MainThread) [ta_cmi] Update CoE data 2023-09-17 13:43:31.261 DEBUG (MainThread) [ta_cmi] Receive data from CoE server: http://a824d5a9-ta-coe:9000/receive 2023-09-17 13:43:31.265 DEBUG (MainThread) [ta_cmi] Received data from CoE server: {'digital': [], 'analog': [{'value': 0.0, 'unit': 11}, {'value': 9.0, 'unit': 19}, {'value': 0.0, 'unit': 0}, {'value': 0.0, 'unit': 0}], 'last_update_unix': 1694950957.290628, 'last_update': '2023-09-17T13:42:37.290628'} 2023-09-17 13:43:31.265 DEBUG (MainThread) [custom_components.ta_coe] Finished fetching ta_coe data in 0.005 seconds (success: True) 2023-09-17 13:43:54.856 DEBUG (MainThread) [custom_components.ta_coe] Handle new state input_boolean.digital1: off 2023-09-17 13:43:54.856 DEBUG (MainThread) [custom_components.ta_coe] Update digital value without update input_boolean.digital1: True 2023-09-17 13:43:54.856 DEBUG (MainThread) [custom_components.ta_coe] Send digital update to server: input_boolean.digital1 2023-09-17 13:43:54.856 DEBUG (MainThread) [ta_cmi] Send digital values to CoE server

DeerMaximum commented 9 months ago

Could you try the dev1.2.1-01 version and see if the error is fixed

molelightn commented 9 months ago

thank you very much, it is working now

br