Fibaro Smart Implant analog voltage sensor not working?

Hello fellow members!
Another problem I do face with Fibaro Smart Implant… but first few words of explanation. The idea is to use SHARP GP2Y0A02 IR distance sensor to detect car presence in the garage. Sensor is powered by 5v and as output provides voltage (0.4~2.05V) corresponding to measured surface distance from sensor (1.5~0.2m). Now, measuring output voltage using to Fibaro Smart Implant analog input I could determine if car is or is not in the garage.
To the problem; SHARP sensor works perfectly fine, I can observe in real time how output voltage changes when distance from sensor to surface changes. It is not reflected, however, in Fibaro Smart Implant sensor though… All I have are some random changes in input voltage every few minutes (or frozen completely) not related to actual values. I verified that Smart Implant is set to analog input, no internal pullup (prameters 20, 21 set to 4), minimal input voltage change to be reprted is set to 0.1V (parameter 63 set to 1) and even forced reporting of sensor value is set to 60 sec (parameter 64 set to 60, to enforce value reporting even if change is not recerded). Whatever I do values that sensor reports do not reflect real voltage I can measure. I tried to restart node, heal it, restar home assistant and server… same result. Any idea?

hello

did you have any luck with getting it working?
i am also trying to get the same setup working.

Nope, it doesn’t work… I found an workaround though. I force sensor value refresh using automation that runs every 10 seconds:

# Set Z-Wave Network  flag to active
# This helps to avoid calling refresh node service before the node is ready
  - id: 'set_zwave_flag'
    alias: Set ZWave Flag
    initial_state: true
    trigger:
      platform: event
      event_type: zwave.network_ready
    action:
      - service: input_boolean.turn_on
        data_template:
          entity_id: input_boolean.zwave_active 

# Refreshing car presence sensor
  - id: 'refreshing_car_sensor'
    alias: Refreshing Car Presence Sensor
    initial_state: True
    trigger:
      - platform: time_pattern
        seconds: '/10'
    condition:
      - condition: state
        entity_id: input_boolean.zwave_active
        state: 'on'
    action:
      - service: zwave.refresh_node_value
        data_template:
          node_id: 32
          value_id: "72057594579796210"

Please note there are 2 automation there; one that sets the flag when the Zwave network is ready (this way I avoid calling zwave.refresh_node_value service until nodes are ready to be queried) and second one, that actually refreshes value of node entities.

Thanks, I used the automation for my Lux sensor as I have the exact same problem with my smart implant setup for analog 0-10V inputs. I assume you also have a 3rd automation then that will turn the zwave_active boolean back to false in case the network is not ready? Otherwise what is the sense of having this boolean?

No need to. It is off just after HA (re)start on its own. This is done using initial state:

input_boolean:
  zwave_active:
    name: Z-Wave Network Active
    initial: off
    icon: mdi:z-wave

Well this way I only check if it ready after restart, not if it failed during normal operation, obviously, but luckily it is happening very, very rarely.

Aaah ok. I had obviously configured the same helper input_boolean / toggle but through the UI and then it seems you can’t set the “initial: off” attribute. Or I may not know how to do it through the UI.
Guess I will have to put in yaml.
Finally, I realize you were using ZWave and I am using ZWave JS which is running in its own container. So apart from the fact there is no zwave_js event for network_ready, it is also less relevant. I believe I will do without. Thanks!

Hm… this is interesting! I moved from legacy Zwave to Zvawe JS and did not changed this in meantime… The initial driver for implementation of this input_boolean was that I was getting lots of errors in log, as autyomation was trying to pull info from smart implant before zwave network started. If there is no zwave.network_ready event now, it means that s omething else changed and this logic is not required any more, as there is no relevant errors in the log file. I’ll try to investigate.

HA! Indeed something changed significantly. There is no zwave.network_ready event any more (strange, no traces of it happening for months, but it is shown as listener in development tools :open_mouth: ), so in reality automation is not tigerred either (last time it was September last year!) Yet sensor is showing voltage changes. It seems to refresh every ~60 seconds if voltage is stable (integration pools value on its own?). When I’ll have some spare time, I’ll check how it works when voltage rapidly change, but I have a feeling that it works pretty instantly (as far as I recall, but no proof).

Mirek, I can highly recommend ESPhome devices for this sort of application. They are slightly harder to configure, but you can get much more control over how frequently they update and the like. (You can even have them convert directly from voltage to distance for you.) -David

This is next natural step for me, 'I’m afraid ’ :slight_smile: So far I tried to avoid soldering and use devices that can be easily customized just by setting some operational parameters. But there is more and more exciting project around here in Forum, that are not to be replicated without ESP or alike. So probably time to say hallo again to my soldering iron!

I actually just used a breadboard and some wires with pins on them. Works great for my applications, but if someone were to pull on it, the pins would come out.