WELLPRO Sensor data conversion

Hey there,
I am using digital input module
https://www.ebay.com/itm/Digital-input-module-switch-module-Isolated-16-DI-RS485-MODBUS-WP8026ADAM/272379730255?hash=item3f6b18d94f:g:BNAAAOSw6oBXE6n2

I can read the data from the sensor and i have few problems:

  1. if the input is switch for short time , HA may not identify the change
  2. the 16 inputs are represent as 2 complementary number , i would like to prepare custom sensor that will allow me to identify one bit in the data as a separate sensor.

I am using the following settings:

Original register number was not working …
image

  • platform: modbus
    scan_interval: 1
    registers:
    • name: DIO
      slave: 1
      register: 10
      register_type: input
      count: 1
      data_type: int

anyone managed to link this component properly?

Anyone ? Ideas?

Not yet interested in this as well as it’s one of the sensors I have currently running on my Openhab system and looking at migrating parts from OH to HASS but haven’t come to that yet. Won’t be in the coming weeks, still struggling with the basics of HASS

About fast changing input - I’m using similar module Adam-6017 and there you can config input channels to counter mode. Even very short pulse will increase counter value which you can detect with next poll.

well i was able to find register that includes all inputs then i am doing the analysis per channel based on the array.

i was unable to read each register of the IO

hi Poratnir,

i am new to home assistant. I also have the wellpro digital inputs and output . For now i use these with openhab . and work well. but i want to implement more stuff in my home automation and to be honest. openhab is to slow and to hard to implement the things i want . did you manage to get the wellpro’s working with HA.

Yes…
I was unable to get every register separately so i used the register which includes all GPIO’s and then i convert each bit as input

I use this code for the all GPIO data

  • platform: modbus
    scan_interval: 1
    registers:
    • name: DIO
      slave: 1
      register: 10
      register_type: input
      count: 1
      data_type: int

then used template bitwise sensor

  • platform: template
    scan_interval: 1
    sensors:
    din01:
    entity_id:
    sensor.dio
    value_template: “{{ states(‘sensor.dio’)|int|bitwise_and(1) }}”

    din02: 
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(2) }}"    
    
    din03:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(4) }}"        
    
    din04:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(8) }}"          
     
    din05:  
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(16) }}"    
    
    din06: 
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(32) }}"   
      
    din07: 
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(64) }}"          
      
    din08:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(128) }}"    
    
    din09:  
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(256) }}"
      
    din10:  
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(512) }}"
      
    din11:     
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(1024) }}"    
      
    din12:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(2048) }}"  
      
    din13:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(4096) }}"  
      
    din14:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(8192) }}" 
      
    din15:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(16384) }}" 
      
    din16:
      entity_id:
        sensor.dio
      value_template: "{{ states('sensor.dio')|int|bitwise_and(32768) }}"

Hi. I have been trying to integrate a WP8026 into my home assistant application & have tried to use the above code but it does not work.

I have two other WP devices, WP3066 (D18B20 temp sensors) and three power monitors, these all work fine.

I suspect that the issue may be to do with the new Modbus structure within HA & wonder if the earlier contributors to this thread have updated their code to the current structure?

The code I have used is:-

modbus:
 - type: serial
   name: hub1
   method: rtu
   port: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
   baudrate: 9600
   stopbits: 1
   bytesize: 8
   parity: N
   sensors:
      - name: DigitalIO
        slave: 4
        address: 0010
        input_type: input
        count: 1
        data_type: int
      - name: Current_id10
        scan_interval: 1
        slave: 10
        address: 0006
        input_type: input
        unit_of_measurement: A
        count: 2
        scale: 10
        offset: 0
        precision: 1
        data_type: float

The log message I received was

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:291
Integration: Modbus (documentation, issues)
First occurred: 18:20:38 (16 occurrences)
Last logged: 18:23:52

  • Pymodbus: hub1: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
  • Pymodbus: hub1: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

I can access the WP8026 directly using the Wellpro debugging software using message

04 02 00 00 00 10 79 C6

The received message is correct and changes with the input selections.

I am lost as to how to get this beast up & running & would appreciate any suggestions …

Hi. I have planin to implement WP3066ADAM in my Home Assistant to read temperature from my 16 pcs Dallas DS18b20. For 16pcs i must use 2pcs WP3066ADAM. Can you tell me step by step how change address and how implement this sensor and how identify which sensors is which in HA and on WP3066ADAM ? Also can you show me your code for dallas in Home Assistant ?

To change the address you need the Wellpro debugging software.

It is available here GitHub - microrobotics/wellpro: Wellpro Products and software

My HA configuration.yaml file is like this:

modbus:
 - type: serial
   name: hub1
   method: rtu
   port: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
   baudrate: 9600
   stopbits: 1
   bytesize: 8
   parity: N
   sensors:
      - name: Temp_1
        scan_interval: 5
        slave: 02
        address: 0000
        input_type: holding
        scale: 0.1
        unit_of_measurement: °C
        precision: 1
      - name: Temp_2
        scan_interval: 5
        slave: 02
        address: 0001
        input_type: holding
        scale: 0.1
        unit_of_measurement: °C
        precision: 1
      - name: Temp_3
        scan_interval: 5
        slave: 02
        address: 0002
        input_type: holding
        scale: 0.1
        unit_of_measurement: °C
        precision: 1

etc

Hope this helps

But if i want use 16 temp sensor i must use 2pcs Wellpro. And for seconda Wellpro i must change slave ex 3 and address sensors the same as first ?

And why use input_type as holding but no use as input?

Yes, each Wellpro needs to have a unique slave ID, but the sensor addressed 0000 to 0007 are the same for both Wellpro’s.

According to the Wellpro documentation the temperature data is stored in “holding” type registers.

Note you will need to substitute the line

port: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0

with the address of the USB/RS485 controller on your system

But how change address for slave?

You need to use the Wellpro debugging software as per my first reply. I suggest you download the software and 3066 manual using the github link I gave.

You will need a USB to RS485 interface. Something like:
Industrial Usb To Rs485 Converter Upgrade Protection Rs232 Converter Compatibility V2.0 Standard Rs-485 A Connector Board Module - Integrated Circuits - AliExpress

Ok thanks i try when i recived my order. Converter USB RS485 i have.

By this option i must change this address for module SLAVE ?

1 Like

I dont know what is a problem… i connected wellpro WP3066ADAM and 8 sensors dallas. On 4 sensors( 1, 6,7,8) show ok temperature but on 2,3,4,5 show me 1000,1 °C. Where is a problem ?