Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for Wire.h #5

Closed
johanvh83 opened this issue Feb 26, 2022 · 3 comments · Fixed by #7
Closed

Looking for Wire.h #5

johanvh83 opened this issue Feb 26, 2022 · 3 comments · Fixed by #7

Comments

@johanvh83
Copy link

johanvh83 commented Feb 26, 2022

During compiling the yaml for ESPHome get below error:

`Compiling /data/esphome-test/.pioenvs/esphome-test/lib259/SparkFun GridEYE AMG88 Library/SparkFun_GridEYE_Arduino_Library.cpp.o
In file included from /data/esphome-test/.piolibdeps/esphome-test/SparkFun GridEYE AMG88 Library/src/SparkFun_GridEYE_Arduino_Library.cpp:30:0:
/data/esphome-test/.piolibdeps/esphome-test/SparkFun GridEYE AMG88 Library/src/SparkFun_GridEYE_Arduino_Library.h:38:18: fatal error: Wire.h: No such file or directory



#include <Wire.h>
^
compilation terminated.
`
Any recommendation how to proceed?

This is my yaml configuration:

`esphome:
name: esphome-test
platform: ESP8266
board: esp01_1m
includes:
- amg8833.h
- amg8833_camera.h
- amg8833_person_detected.h
libraries:
- "SparkFun GridEYE AMG88 Library"

wifi:
ssid: "XXXXXX"
password: "XXXXXX"
fast_connect: true

manual_ip:
static_ip: 192.168.100.17
gateway: 192.168.100.1
subnet: 255.255.255.0

Enable logging

logger:

Enable Home Assistant API

api:

ota:

time:

  • platform: homeassistant
    id: homeassistant_time

text_sensor:

  • platform: template
    name: Uptime human readable
    id: uptime_human
    icon: mdi:clock-start

  • platform: version
    name: esphome-test ESPHome Version

  • platform: custom
    lambda: |-
    auto amg8833 = new AMG8833CameraComponent();
    App.register_component(amg8833);
    return {amg8833};

    text_sensors:

    • name: "Sensor Pixels"

substitutions:
devicename: esphome-test
friendly_name: "ESPHome test"

binary_sensor:

  • platform: custom
    lambda: |-
    auto amg8833 = new AMG8833PersonDetectedComponent();
    App.register_component(amg8833);
    return {amg8833};
    binary_sensors:
    name: "Person Detected"
    device_class: occupancy

sensor:

Uptime sensor.

  • platform: uptime
    id: uptime_sensor
    update_interval: 60s
    on_raw_value:
    then:
    - text_sensor.template.publish:
    id: uptime_human
    state: !lambda |-
    int seconds = round(id(uptime_sensor).raw_state);
    int days = seconds / (24 * 3600);
    seconds = seconds % (24 * 3600);
    int hours = seconds / 3600;
    seconds = seconds % 3600;
    int minutes = seconds / 60;
    seconds = seconds % 60;
    return (
    (days ? String(days) + "d " : "") +
    (hours ? String(hours) + "h " : "") +
    (minutes ? String(minutes) + "m " : "") +
    (String(seconds) + "s")
    ).c_str();

WiFi Signal sensor.

  • platform: wifi_signal
    name: esphome-test WiFi Signal
    update_interval: 60s

  • platform: custom
    lambda: |-
    auto amg8833 = new AMG8833Component();
    App.register_component(amg8833);
    return {amg8833->sensor_temperature, amg8833->max_temperature, amg8833->min_temperature, amg8833->avg_temperature, amg8833->min_index, amg8833->max_index};

    sensors:

    • name: "Thermal Sensor Temperature"
      unit_of_measurement: °C
      device_class: temperature
      accuracy_decimals: 2

    • name: "Thermal Sensor Max"
      unit_of_measurement: °C
      device_class: temperature
      accuracy_decimals: 2

    • name: "Thermal Sensor Min"
      unit_of_measurement: °C
      device_class: temperature
      accuracy_decimals: 2

    • name: "Thermal Sensor Avg"
      unit_of_measurement: °C
      device_class: temperature
      accuracy_decimals: 2

    • name: "Thermal Sensor Min Index"
      accuracy_decimals: 0

    • name: "Thermal Sensor Max Index"
      accuracy_decimals: 0`

@johanvh83 johanvh83 changed the title wire.h Looking for Wire.h Feb 26, 2022
@TheRealWaldo
Copy link
Owner

wire.h is native to the Arduino library. It handles all I2C processing. Recent changes in ESPHome may require you to drop it into the includes in your YAML.

@johanvh83
Copy link
Author

I've added wire.h to my ESPHome library and the integration works fine, except below observation in the log:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:583
First occurred: 7:33:03 PM (1 occurrences)
Last logged: 7:33:03 PM

Entity camera.prototype_thermal_camera (<class 'custom_components.thermal_vision.camera.ThermalVisionCamera'>) implements device_state_attributes. Please report it to the custom component author.

@TheRealWaldo
Copy link
Owner

Already been reported for the integration, but it does not impact the functionality.

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants