Sennevds / system_sensors

Logging of system sensor specific for the RPI and sending them to a MQTT broker
MIT License
367 stars 113 forks source link

Sensors unkown in Home Assistant #43

Closed eldudemeister closed 4 years ago

eldudemeister commented 4 years ago

I have installed system_sensors on 4 pi's, two of them are working fine and report sensor stats in HA but two of them do not. If I view listen to the topic in the mqtt explorer in HA I can see the stats coming in but the actual sensors do not update and stay as unkown. I've tried deleting the integration for that pi and re-adding it but it still shows unknown. Any help would be great. Thanks

Sennevds commented 4 years ago

Could you send me the json sensor values for the 2 pi's that aren't working?

eldudemeister commented 4 years ago

This is the extract when I listen to the topic

Message 42 received on homeassistant/sensor/wireguardpi/wireguardpiDiskUseDrive1/config at 2:08 PM:
{
    "name": "wireguardpi DiskUse Drive1",
    "state_topic": "system-sensors/sensor/wireguardpi/state",
    "unit_of_measurement": "%",
    "value_template": "{{value_json.disk_use_drive1}}",
    "unique_id": "wireguardpi_sensor_disk_use_drive1",
    "availability_topic": "system-sensors/sensor/wireguardpi/availability",
    "device": {
        "identifiers": [
            "wireguardpi_sensor"
        ],
        "name": "wireguardpi Sensors",
        "model": "RPI wireguardpi",
        "manufacturer": "RPI"
    },
    "icon": "mdi:harddisk"
}

This is the entity id in HA...sensor.wireguardpi_diskuse_drive1. Hope that's what you need but let me know if I've misunderstood.

Sennevds commented 4 years ago

could you send the value in following topic system-sensors/sensor/wireguardpi/state

eldudemeister commented 4 years ago

Thanks, is this what you mean? {"temperature": 40.6, "disk_use": 12.8, "memory_use": 20.8, "cpu_usage": 3.4, "swap_usage": 0.0, "power_status": "Everything is working as intended", "last_boot": "2020-06-06T11:16:00+01:00", "last_message": "Wed Jul 15 15:16:11 2020", "updates": 0, "wifi_strength": , "disk_use_drive1": 20.2}

Sennevds commented 4 years ago

Yes already see the problem: Could disable wifi strength in the settings.yaml for the 2 devices where you have the problem?

eldudemeister commented 4 years ago

Amazing, all sorted, thank you!

eldudemeister commented 4 years ago

Sorry to reopen this, I am having this issue again although it only seems to be an issue since I upgraded to 0.116.2. Fairly sure it was working prior to that and when I listen to the mqtt messages, I can see them coming in. Also on a mixture of wired and wireless pi's and have removed the wifi strength settings

Sennevds commented 4 years ago

Could you send me the state so I could check if everything is alright

eldudemeister commented 4 years ago

Complete user error on my part, sorry for troubling you!