peribeir / homeassistant-rademacher

This custom integration provides access to Rademacher Devices connected to a HomePilot (or Start2Smart) bridge.
GNU General Public License v3.0
56 stars 11 forks source link

Unexpected error fetching rademacher data: 'sun_brightness' #30

Closed Alex42195 closed 2 years ago

Alex42195 commented 2 years ago

Hi Pedro,

the integration does not start.

regards Alex


Logger: custom_components.rademacher Source: custom_components/rademacher/init.py:66 Integration: Rademacher HomePilot (documentation, issues) First occurred: 10:09:27 (24 occurrences) Last logged: 10:37:47

Unexpected error fetching rademacher data: 'sun_brightness' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data return await self.update_method() File "/config/custom_components/rademacher/init.py", line 66, in async_update_data return await manager.update_states() File "/usr/local/lib/python3.9/site-packages/homepilot/manager.py", line 72, in update_states device.update_state(states[did]) File "/usr/local/lib/python3.9/site-packages/homepilot/sensor.py", line 143, in update_state self.brightness_value = state["readings"]["sun_brightness"] KeyError: 'sun_brightness'

--

peribeir commented 2 years ago

Hi @Alex42195

Looks like you have a sensor which doesn't have all the capabilities I was expecting in the code.

Can you send me the result of doing the following call in your browser so I can check what are the properties available: http://[homepilot IP]/v4/devices?devtype=Sensor

Br, Pedro.

Alex42195 commented 2 years ago

Hallo Pedro, here is the result.

Alex — { "response": "get_meters", "meters": [ { "description": "Aktor schaltet Treppe", "deviceGroup": 3, "did": 1010059, "automations": [ 90 ], "readings": { "movement_detected": false }, "timestamp": 1645280619, "iconSetInverted": 0, "iconSet": { "k": "iconset23" }, "name": "Treppe oben", "statusValid": true, "deviceNumber": "32501772_S", "uid": "65195d_S_1", "visible": true }, { "description": "schaltet Treppe", "deviceGroup": 3, "did": 1010057, "automations": [ 90 ], "readings": { "movement_detected": false }, "timestamp": 1645280595, "iconSetInverted": 0, "iconSet": { "k": "iconset5" }, "name": "Haupteingang Licht", "statusValid": true, "deviceNumber": "32501772_S", "uid": "652087_S_1", "visible": true } ] } —

Am 18.02.2022 um 23:38 schrieb Pedro Ribeiro @.***>:

Hi @Alex42195 https://github.com/Alex42195 Looks like you have a sensor which doesn't have all the capabilities I was expecting in the code.

Can you send me the result of doing the following call in your browser so I can check what are the properties available: http://[homepilot IP]/v4/devices?devtype=Sensor

Br, Pedro.

— Reply to this email directly, view it on GitHub https://github.com/peribeir/homeassistant-rademacher/issues/30#issuecomment-1045287990, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBQZQWWSOGYQEXAW7E2BKDU33C5ZANCNFSM5OUOHCGA. You are receiving this because you were mentioned.

peribeir commented 2 years ago

Thanks Alex, Looks like those sensors are being incorrectly detected has having brightness sensor. I didn't yet add any support for motion sensors. So probably there's something reported that is not as I expected. Can you please also send the contents of the following: http://[bridge ip]/devices/1010059 http://[bridge ip]/devices/1010057

Alex42195 commented 2 years ago

Hi Pedro,

— 1010059

{ "error_description": "OK", "error_code": 0, "payload": { "device": { "capabilities": [ { "name": "VERSION_CFG", "value": "1.5-1", "read_only": false, "timestamp": 1645349745 }, { "name": "PROD_CODE_DEVICE_LOC", "value": "32501772_S", "read_only": false, "timestamp": -1 }, { "name": "REACHABILITY_EVT", "value": "true", "read_only": true, "timestamp": 1645349745 }, { "name": "ON_DURATION_CFG", "value": "23.3", "min_value": "0.0", "max_value": "3276.5", "step_size": "0.1", "read_only": false, "timestamp": 1645349745 }, { "name": "RESET_WO_PAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "BUTTON_MODE_CFG", "value": "true", "read_only": false, "timestamp": 1645349745 }, { "name": "NAME_DEVICE_LOC", "value": "Treppe oben", "read_only": false, "timestamp": -1 }, { "name": "PROT_ID_DEVICE_LOC", "value": "65195d_S_1", "read_only": false, "timestamp": -1 }, { "name": "MOVE_STOP_EVT_PUSH_TEXT", "value": "", "read_only": false, "timestamp": -1 }, { "name": "INTF_ID_DEVICE_LOC", "value": "3", "read_only": false, "timestamp": -1 }, { "name": "ICONSET_LOC", "value": "iconset23", "read_only": false, "timestamp": -1 }, { "name": "DEVICE_TYPE_LOC", "value": "3", "read_only": false, "timestamp": -1 }, { "name": "SENSOR_SENSITIVITY_CFG", "value": "2", "min_value": "1", "max_value": "7", "step_size": "1", "read_only": false, "timestamp": 1645349745 }, { "name": "ICONSET_INV_LOC", "value": "false", "read_only": false, "timestamp": -1 }, { "name": "RMT_STOP_PAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_START_EVT_PUSH_TEXT", "value": "", "read_only": false, "timestamp": -1 }, { "name": "REQ_STATUS_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_STOP_EVT", "read_only": true, "timestamp": 1645349742 }, { "name": "RESET_FULL_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_START_EVT", "read_only": true, "timestamp": 1645349695 }, { "name": "PAIRING_CONFIRMED_LOC", "value": "true", "read_only": false, "timestamp": -1 }, { "name": "LIGHT_VAL_LUX_MEA", "value": "17", "min_value": "0", "max_value": "150000", "read_only": false, "timestamp": 1645349745 }, { "name": "ID_DEVICE_LOC", "value": "1010059", "read_only": false, "timestamp": -1 }, { "name": "PROTOCOL_ID_CFG", "value": "65195d", "read_only": false, "timestamp": -1 }, { "name": "LED_BEHAV_MODE_CFG", "value": "true", "read_only": false, "timestamp": 1645349745 }, { "name": "RMT_START_PAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_STOP_EVT_PUSH_ENABLED", "value": "false", "read_only": false, "timestamp": -1 }, { "name": "DISCONNECT_SENSOR_2_ACTUATOR_CFG", "value": "false", "read_only": false, "timestamp": 1645349745 }, { "name": "SENSOR_AUTOMATION_CFG", "value": "true", "read_only": false, "timestamp": 1645349745 }, { "name": "VIS_DEVICE_LOC", "value": "true", "read_only": false, "timestamp": -1 }, { "name": "CURR_BRIGHTN_CFG", "value": "17", "min_value": "0", "max_value": "150000", "step_size": "1", "read_only": false, "timestamp": 1645349745 }, { "name": "MOVE_START_EVT_PUSH_ENABLED", "value": "false", "read_only": false, "timestamp": -1 }, { "name": "RMT_START_UNPAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOTION_DETECTION_MEA", "value": "false", "read_only": false, "timestamp": 1645349742 }, { "name": "DESCR_DEVICE_LOC", "value": "Aktor schaltet Treppe", "read_only": false, "timestamp": -1 } ], "scenes": [] } } }

— 1010057

{ "error_description": "OK", "error_code": 0, "payload": { "device": { "capabilities": [ { "name": "VERSION_CFG", "value": "1.5-1", "read_only": false, "timestamp": 1645316726 }, { "name": "PROD_CODE_DEVICE_LOC", "value": "32501772_S", "read_only": false, "timestamp": -1 }, { "name": "REACHABILITY_EVT", "value": "true", "read_only": true, "timestamp": 1645316726 }, { "name": "ON_DURATION_CFG", "value": "20.2", "min_value": "0.0", "max_value": "3276.5", "step_size": "0.1", "read_only": false, "timestamp": 1645316726 }, { "name": "RESET_WO_PAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "BUTTON_MODE_CFG", "value": "true", "read_only": false, "timestamp": 1645316726 }, { "name": "NAME_DEVICE_LOC", "value": "Haupteingang Licht", "read_only": false, "timestamp": -1 }, { "name": "PROT_ID_DEVICE_LOC", "value": "652087_S_1", "read_only": false, "timestamp": -1 }, { "name": "MOVE_STOP_EVT_PUSH_TEXT", "value": "", "read_only": false, "timestamp": -1 }, { "name": "INTF_ID_DEVICE_LOC", "value": "3", "read_only": false, "timestamp": -1 }, { "name": "ICONSET_LOC", "value": "iconset5", "read_only": false, "timestamp": -1 }, { "name": "DEVICE_TYPE_LOC", "value": "3", "read_only": false, "timestamp": -1 }, { "name": "SENSOR_SENSITIVITY_CFG", "value": "7", "min_value": "1", "max_value": "7", "step_size": "1", "read_only": false, "timestamp": 1645316726 }, { "name": "ICONSET_INV_LOC", "value": "false", "read_only": false, "timestamp": -1 }, { "name": "RMT_STOP_PAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_START_EVT_PUSH_TEXT", "value": "", "read_only": false, "timestamp": -1 }, { "name": "REQ_STATUS_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_STOP_EVT", "read_only": true, "timestamp": 1645316723 }, { "name": "RESET_FULL_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_START_EVT", "read_only": true, "timestamp": 1645316701 }, { "name": "PAIRING_CONFIRMED_LOC", "value": "true", "read_only": false, "timestamp": -1 }, { "name": "LIGHT_VAL_LUX_MEA", "value": "4", "min_value": "0", "max_value": "150000", "read_only": false, "timestamp": 1645316726 }, { "name": "ID_DEVICE_LOC", "value": "1010057", "read_only": false, "timestamp": -1 }, { "name": "PROTOCOL_ID_CFG", "value": "652087", "read_only": false, "timestamp": -1 }, { "name": "LED_BEHAV_MODE_CFG", "value": "true", "read_only": false, "timestamp": 1645316726 }, { "name": "RMT_START_PAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOVE_STOP_EVT_PUSH_ENABLED", "value": "false", "read_only": false, "timestamp": -1 }, { "name": "DISCONNECT_SENSOR_2_ACTUATOR_CFG", "value": "true", "read_only": false, "timestamp": 1645316726 }, { "name": "SENSOR_AUTOMATION_CFG", "value": "true", "read_only": false, "timestamp": 1645316726 }, { "name": "VIS_DEVICE_LOC", "value": "true", "read_only": false, "timestamp": 1645096502 }, { "name": "CURR_BRIGHTN_CFG", "value": "4", "min_value": "0", "max_value": "150000", "step_size": "1", "read_only": false, "timestamp": 1645316726 }, { "name": "MOVE_START_EVT_PUSH_ENABLED", "value": "false", "read_only": false, "timestamp": -1 }, { "name": "RMT_START_UNPAIR_CMD", "read_only": false, "timestamp": -1 }, { "name": "MOTION_DETECTION_MEA", "value": "false", "read_only": false, "timestamp": 1645316723 }, { "name": "DESCR_DEVICE_LOC", "value": "schaltet Treppe", "read_only": false, "timestamp": -1 } ], "scenes": [] } } }

Thanks Alex

Am 19.02.2022 um 23:49 schrieb Pedro Ribeiro @.***>:

Thanks Alex, Looks like those sensors are being incorrectly detected has having brightness sensor. I didn't yet add any support for motion sensors. So probably there's something reported that is not as I expected. Can you please also send the contents of the following: http://[bridge ip]/devices/1010059 http://[bridge ip]/devices/1010057

— Reply to this email directly, view it on GitHub https://github.com/peribeir/homeassistant-rademacher/issues/30#issuecomment-1046118712, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBQZQW6JOZZ4ZQWGMM3HETU4ANABANCNFSM5OUOHCGA. You are receiving this because you were mentioned.

peribeir commented 2 years ago

Ok, like I thought, Motion Sensors also report brightness, do you confirm that? The problem is that the brightness doesn't seem to be reported on both APIs (it is reported on /devices but not on /v4/devices), or at least not reported has I expected. For now (v1.5.2), I'll just fix the error. These sensors won't yet be supported, but it is in my todo list.

Just one more favor I ask you, can you also send response of: http://[homepilot ip]/v4/devices?devtype=Sensor It will help me soon in order to add the motion sensors to the integration. Thanks.

Alex42195 commented 2 years ago

Yes, i think it's this sensor.

https://www.rademacher.de/shop/licht-heizung/lichtsteuerung/duofern-bewegungsmelder-9484

I am helping my friend with his Homeassistant installation.

Thanks.

Am 20.02.2022 um 12:26 schrieb Pedro Ribeiro @.***>:

Ok, like I thought, Motion Sensors also report brightness, do you confirm that? The problem is that the brightness doesn't seem to be reported on both APIs (it is reported on /devices but not on /v4/devices), or at least not reported has I expected. For now (v1.5.2), I'll just fix the error. These sensors won't yet be supported, but it is in my todo list.

Just one more favor I ask you, can you also send response of: http://[homepilot ip]/v4/devices?devtype=Sensor It will help me soon in order to add the motion sensors to the integration. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/peribeir/homeassistant-rademacher/issues/30#issuecomment-1046216177, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBQZQUKGWYK25YI4XSJ2WLU4DFUVANCNFSM5OUOHCGA. You are receiving this because you were mentioned.

peribeir commented 2 years ago

I've released v1.5.2. Your issue should be fixed now. Like I said, the motion sensors won't yet be visible, but I expect to have them integrated soon.

And again, if possible I'd like to ask you to send me the result of the call to: http://[homepilot ip]/v4/devices?devtype=Sensor

Thanks Br, Pedro

Alex42195 commented 2 years ago

Hallo Pedro, works perfectly.

Many thanks!

Alex

Am 20.02.2022 um 15:56 schrieb Pedro Ribeiro @.***>:

I've released v1.5.2. Your issue should be fixed now. Like I said, the motion sensors won't yet be visible, but I expect to have them integrated soon.

And again, if possible I'd like to ask you to send me the result of the call to: http://[homepilot ip]/v4/devices?devtype=Sensor

Thanks Br, Pedro

— Reply to this email directly, view it on GitHub https://github.com/peribeir/homeassistant-rademacher/issues/30#issuecomment-1046255496, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBQZQTUJG63OTG2IVHTQS3U4D6IXANCNFSM5OUOHCGA. You are receiving this because you were mentioned.