Giter VIP home page Giter VIP logo

flexit_bacnet's People

Contributors

joostlek avatar lellky avatar piotrbulinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flexit_bacnet's Issues

Using wrong device id will return integer 0 instead of string from serial_number and device_name attributes

If you run this code

import asyncio
from flexit_bacnet import FlexitBACnet

async def main():
    device = FlexitBACnet('192.168.1.11', 3) # device id = 3
    await device.update()

    print('Device Name:', device.device_name) # will return 0
    print('Serial Number:', device.serial_number) # will return 0

if __name__ == "__main__":
    asyncio.run(main())

According to function type hints these should only return str. How this should be fixed? I could also take a stab at this if needed.

missing sensors for Flexit Vent.aggregat Nordic S3 REL

Model: Vent.aggregat Nordic S3 REL
Serial Number: 800121-xxxxxx

Extract air temperature (device.extract_air_temperature) is always at 0.0, while on the display unit it is showing values other than 0C.
Also Humidity is shown on display unit but none of the device.room_x_humidity reports any other value then 0

reported values using flexit_bacnet python module:

Device Name: HvacFnct21y_A
Serial Number: 800121-0xxxxx
Outside air temp.: -15.4 °C
Supply air temp.: 19.0 °C
Extract air temp.: 0.0 °C
Exhaust air temp.: -7.1 °C
Room air temp.: 0.0 °C
Room 1 humidity: 0.0%
Room 2 humidity: 0.0%
Room 3 humidity: 0.0%
Comfort button state: True
Operation mode: 3
Ventilation mode: 3
Air temp. setpoint Away: 18.0 °C
Air temp. setpoint Home: 20.0 °C
Fireplace duration remaining: 10 minutes
Rapid ventilation duration remaining: 10 minutes
Supply air fan control signal: 50%
Supply air fan RPM: 2106
Exhaust air fan control signal: 50%
Exhaust air fan RPM: 2092
Electric heater enabled: True
Electric heater nominal power: 0.800000011920929 kW
Electric heater power consumption: 0.7065201997756958 kW
Fan setpoint - supply air Home: 50%
Fan setpoint - supply air Away: 33%
Fan setpoint - supply air High: 100%
Fan setpoint - supply air Cooker: 90%
Fan setpoint - supply air Fireplace: 90%
Fan setpoint - extract air Home: 50%
Fan setpoint - extract air Away: 33%
Fan setpoint - extract air High: 100%
Fan setpoint - extract air Cooker: 50%
Fan setpoint - extract air Fireplace: 50%
Air filter operating time: 1008.0 hours
Air filter exchange interval: 4380.0 days
Air filter polluted: False
Heat-exchanger efficiency: 77%
Heat-exchanger speed: 100%

Process finished with exit code 0

flexit_bacnet.bacnet.DecodingError: unsupported response type: 7

Trying to implement sensors in the home assistant integration flexit_bacnet craches after a while (probably when polling sensor values). It seems to work the first time.

Here is the added code in core: lellky/core@3cfb6b9

This is the error output:

2024-01-12 08:35:25.561 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.hvacfnct21y_a_exhaust_air_fan_control_signal fails
Traceback (most recent call last):
  File "/Users/lellky/Projects/core/venv/lib/python3.11/site-packages/flexit_bacnet/bacnet.py", line 490, in read_multiple
    return _parse_read_property_multiple_response(response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lellky/Projects/core/venv/lib/python3.11/site-packages/flexit_bacnet/bacnet.py", line 212, in _parse_read_property_multiple_response
    raise DecodingError(f"unsupported response type: {apdu_type}")
flexit_bacnet.bacnet.DecodingError: unsupported response type: 7

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/lellky/Projects/core/homeassistant/helpers/entity.py", line 943, in async_update_ha_state
    await self.async_device_update()
  File "/Users/lellky/Projects/core/homeassistant/helpers/entity.py", line 1261, in async_device_update
    await self.async_update()
  File "/Users/lellky/Projects/core/homeassistant/components/flexit_bacnet/sensor.py", line 326, in async_update
    await self._device.update()
  File "/Users/lellky/Projects/core/venv/lib/python3.11/site-packages/flexit_bacnet/device.py", line 30, in update
    self._state = await self.bacnet.read_multiple(device_properties)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lellky/Projects/core/venv/lib/python3.11/site-packages/flexit_bacnet/bacnet.py", line 492, in read_multiple
    raise DecodingError(
flexit_bacnet.bacnet.DecodingError: response decoding failed: unsupported response type: 7
810a00090100710109

Auto discovery support

Could this feature to be possible to add? I'd be willing to help on this one if needed. I opened this issue here so we can collaborate publicly and share information which others can also see.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.