epenet / hassResolVbus

Resol Vbus sensor for home assistant
MIT License
13 stars 2 forks source link

Compatibility with DL2 V2 #1

Open G8YTZ opened 5 years ago

G8YTZ commented 5 years ago

Hi, I have a DL2 running v2 software and using vbus.net to create a web page and right now I'm embedding that in an iframe to display within HASS, however I would like to move away from this and capture the sensor values into HASS.

It looks like you've done some great work, but is there a simple way of adapting your code to pull the data directly from the DL-2 via the LAN interface?

I note work has been done with Node-Red, I am also running Node-Red, so this could be an approach too I guess.

I made one other modification, changed the folder name to resolvbus and the file to sensor.py as pert he error log instruction reflecting recent changes to add-on folders (I'm running 0.91.4) - see below picture.

https://www.npmjs.com/package/resol-vbus

Any ideas/suggestions would be welcome.

Here is my configuration, My unit is a BS 2009, the sensors show, but do not update. I have a DL/2 on V2.2.2 s/w (latest)

sensor:
  - platform: resolvbus
    name: MyResol
    #ttyPort: /dev/ttyUSB0
    host: '192.168.0.248'
    password: 'password'
    channel: 1
    filterSource: 0x427B
    filterDestination: 0x0010
    filterCommand: 0x0100
    attributes:
      - name: temperature_sensor_1
        offset: 0
        size: 2
        factor: 0.1
        type: temperature
      - name: temperature_sensor_2
        offset: 2
        size: 2
        factor: 0.1
        type: temperature
      - name: temperature_sensor_3
        offset: 4
        size: 2
        factor: 0.1
        type: temperature
      - name: temperature_sensor_4
        offset: 6
        size: 2
        factor: 0.1
        type: temperature
      - name: system_time
        offset: 22
        size: 2
        type: time
      - name: pump_speed_relay_1
        offset: 8
        size: 1
  - platform: template
    sensors:
      myresol_temperature1:
        value_template: '{{ state_attr("sensor.myresol" , "temperature_sensor_1") }}'
        friendly_name: "Temperature 1"
        unit_of_measurement: '°C'
  - platform: template
    sensors:
      myresol_temperature2:
        value_template: '{{ state_attr("sensor.myresol" , "temperature_sensor_2") }}'
        friendly_name: "Temperature 2"
        unit_of_measurement: '°C'
  - platform: template
    sensors:
      myresol_temperature3:
        value_template: '{{ state_attr("sensor.myresol" , "temperature_sensor_3") }}'
        friendly_name: "Temperature 3"
        unit_of_measurement: '°C'
  - platform: template
    sensors:
      myresol_temperature4:
        value_template: '{{ state_attr("sensor.myresol" , "temperature_sensor_4") }}'
        friendly_name: "Temperature 4"
        unit_of_measurement: '°C'
  - platform: template
    sensors:
      myresol1_pump1:
        value_template: '{{ state_attr("sensor.myresol" , "pump_speed_relay_1") }}'
        friendly_name: "Pump 1"
        unit_of_measurement: '%'
  - platform: template
    sensors:
      myresol1_time:
        value_template: '{{ state_attr("sensor.myresol" , "system_time") }}'
        friendly_name: "Time"
<img width="1020" alt="Screenshot 2019-04-23 at 01 01 58" src="https://user-images.githubusercontent.com/35895759/56541377-74f6a680-6563-11e9-92dc-fe4416b69a0c.png">

best regards,

Justin.

epenet commented 5 years ago

Hi @G8YTZ, I'm sorry but I don't have a DL2 data logger and I'm not sure how to adapt the code from the serial bus to the LAN connection of the DL2.

Maybe it would be easier to use the REST component directly with the DL2 web link?

Boosmoo commented 4 years ago

Hi @epenet How would I do this with the rest component and the dl2?

epenet commented 4 years ago

Hi @Boosmoo I don't have a DL2 so I cannot make any recommendations.

Boosmoo commented 4 years ago

@G8YTZ Did you get it working?

wettermann32 commented 4 years ago

Hi all,

i would also like to use this modul with a VBUS-Lan Adapter. An easy way could be to use Telnet and pipe the collected data into a file or virtual comport. This script reads the data from lan and pipes it via telnet into a file. Would this help? I could also provide the data in the file if needed for testing.

`

!/bin/sh

host=192.168.100.43 port=7053 ( echo open ${host} ${port} sleep 1 echo "PASS vbus" sleep 1 echo "DATA" sleep 100 ) | telnet > /home/pi/out.txt `

wettermann32 commented 4 years ago

Just found. Here is python Code to read the data from Lan instead of seriel port:

https://github.com/rellit/resol-vbus-python

How do we get this together?

Boosmoo commented 3 years ago

@G8YTZ Did you get it to work? Or found another solution?