I don't think I understand logging - trying to get all Z-Wave Messages into log

I have put logger: in my config file, and I was expecting to see all messages from Z-Wave and everything else in the logbook. But do I have to look another place for them? I know about OZW_Log.txt, but I was hoping for something through the GUI.

if you want to see everything, you’d need to set your logger to debug for zwave.

Thanks for the insanely quick answer! :grin: So like this?

logger:
  homeassistant.components.zwave: debug

No, no that easy it seems. I still only see the startup messages from the ZWave network.

I don’t have zwave so not 100% sure but it would look more like this:

logger:
  default: error
  logs:
    homeassistant.components.zwave: debug

Thanks again, but no, I still only see the startup messages in the Logbook. :frowning: Also I find it weird that when I set this code:

# MQTT State stream
mqtt_statestream:
  base_topic: eg
  include:
    domains:
      - zwave

That does not include all messages from the open Z-Wave system. I see a lot more of the messages in the OpenZwave log, they include device number and more.

the logbook and the logs are different things.
To access the logs:

Brilliant, thanks! :slight_smile: Got it now!

1 Like

Or maybe not. I get debug info, and I can get regular info by setting that in the config file, but it doesn’t seem like it can show me events from the ZWave network, like switch on and off, temperature from thermostats and so on. Any idea if that is possible?

The Zwave network messages are logged separately because they are open_zwave , not homeassistant. In the same way as any other external hub. So the homeassistant logs will show what they request of open_zwave and what they get from open_zwave, but what actually happens in the meantime is logged by open_zwave itself.

From your homeassistant dashboard click configuration in the sidebar, then Zwave. Scroll to the bottom and click the ‘refresh’ button in the OZW log box.

Aha, thank you! That was more of what I was looking for! There I see messages like this:

2018-04-25 14:32:48.454 Info, Node003, Received SensorMultiLevel report from node 3, instance 1, Temperature: value=23.5C

But in the MQTT stream I see this:

14:32:54 MQTT.eg/sensor/thermofloor_as_heatit_thermostat_tf_021_temperature/state u"23.5"

Do you (or anybody else) know how I can change that, so I can see what device it is? I only have one of those thermostats here at my cabin, but in my house (where I’m running the main system, while testing at the cabin) I have 6 or 7 of them. So I really need to see the device number.

Not sure tbh, because the statestream is from the homeassistant side of things. :thinking:

I think I may be close! :slight_smile: I found the option plublish_attributes, and that gave me a lot more:

14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/friendly_name u"“ThermoFloor AS Heatit Thermostat TF 021"”
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/receivedUnsolicited u"2"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/receivedCnt u"10"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/node_id u"3"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/node_name u"“ThermoFloor AS Heatit Thermostat TF 021"”
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/is_info_received u"true"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/lastResponseRTT u"39"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/manufacturer_name u"“ThermoFloor AS”"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/sentCnt u"12"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/averageResponseRTT u"1381"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/is_awake u"true"
14:45:57 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/sentTS u"“2018-04-25 14:43:46:074 “”
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/lastRequestRTT u"24”
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/query_stage u"“Complete”"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/capabilities u"[“beaming”, “routing”, “listening”]"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/averageRequestRTT u"24"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/is_zwave_plus u"true"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/neighbors u"[1, 2, 4]"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/product_name u"“Heatit Thermostat TF 021"”
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/max_baud_rate u"40000"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/is_ready u"true"
14:45:58 MQTT.eg/zwave/thermofloor_as_heatit_thermostat_tf_021/receivedTS u"“2018-04-25 14:45:52:091 “”
14:45:58 MQTT.eg/sensor/thermofloor_as_heatit_thermostat_tf_021_temperature/state u"23.5”

Actually a bit too much, but I’ll see if that can 't be filtered! :smile:

2 Likes

Well, the filtering wasn’t easy either. Here is the code I have tried:

    mqtt_statestream:
  base_topic: eg
  publish_attributes: true
  include:
    domains:
      - lock
      - binary_sensor
      - switch
      - sensor
    entities:
      - sensor.thermofloor_as_heatit_thermostat_tf_021_temperature.node_id
      - sensor.thermofloor_as_heatit_thermostat_tf_021_temperature.state

Only that doesn’t give me anything at all through MQTT. If I remove the entities, I will get stuff like this from the sensors through MQTT:

eg/sensor/thermofloor_as_heatit_thermostat_tf_021_temperature/state u"23.0"
eg/sensor/thermofloor_as_heatit_thermostat_tf_021_temperature/node_id u"3"

Where eg is the topic. And I thought by using entity include I could get it to show the state and node_id. But it won’t play ball. Any idea why? I thought replacing the slashes before state and node_id with dots was correct, and keeping the slashes doesn’t change anything either.

Edit: Never mind the wrong spacing at the beginning of the code lines, that’s me not being used to the system at the board. It’s correct in the file.