No, CoAP is not used. But not having the Bluetooth binding installed at least created a problem on my side. Might be other problems though, please provided some logs if you see something else.
BRG
No, CoAP is not used. But not having the Bluetooth binding installed at least created a problem on my side. Might be other problems though, please provided some logs if you see something else.
BRG
I just made my first ESPHome 8266
Iāve written my own ESP framework for years reverse engineering the HA MQTT style to have them automatically detected with channels. But it starts to get cumbersome to keep up.
With this new addon I felt it was time to give ESPHome a try. But however I configured the ESP it just wouldnāt show up in OpenHabā¦ until I saw this brand new post about BlueTooth!
BAM! Once I installed BTHome and Bluetooth binding it popped up with the one PIR-sensor channel I had. Wonderful!
BTW, what does the āREMOVEMEWHENADDING
ā mean in the UID? Why is it there in the first place, and does it matter if it is left (except it may look a bit bad)?
Good question. Because I did remove it, which makes the same ESP32 devices pop up again and again in my inbox.
See mDNS discovery result overwrites existing thing configuration/property Ā· Issue #3753 Ā· openhab/openhab-core Ā· GitHub
TLDR: An OH feature overwrites the thing configuration if the thing is managed.
Hi,
i got a lot of
ping responses lacking. Waited 6 times 10s, total of 60s. Last pong received at 2024-12-29T21:53:15.236709452Z. Assuming connection lost and disconnecting
.
Do you know how to solve it?
What version of the binding are you running? Check openhab-cli
Brg
i use version 4.1.0.202412221615 and openhab 4.3.
after reboot and reinstall the add-on it looks more stable
The reason Iām asking is that you are not the first person reporting this, and a potential solution was added about 2 weeks ago. Did you run an older version of the binding than that before reinstalling?
Brg
@seime, is the binding in the add-on store (4.3.1) the most recent version? There hasnāt been a new jar since the release of 4.3.1, but Iām not 100 % sure I understand how binding development works. (Or the development of the ESPHome binding in particular.)
It is the same filename/version number (4.1-0-SNAPSHOT), but the file is updated every now and then. Commit log: https://github.com/seime/openhab-esphome/commits/master/
openhab-cli shows the full version number/build timestamp.
Uninstall and reinstall to get the latest build.
Wanted to stop by and thank you for a wonderful binding. It couldnāt have been any easier to install.
I built a rat-gdo and added the ESPHome firmware and hooked it up to my MyQGarage Door Opener.
I installed the plugin and it was already auto discovered!
It gets the updates fast and shows the progress of the door opening and closing.
My only question is that Openhab doesnāt save any states of the items. I hit analyze any of them and its blank. They donāt even show up in the events.log as changes. So im assuming i cant have any rules trigger from them? Running OH 4.3.0 on Windows 10.
Hi @palazzja, thanks!
Items and rules have are fully separate from the binding. You can of course have rules acting upon items that are linked to esphome channels - I have plenty
At first glance it sounds like there is some sort of issue with your persistence setup, but this confuses me:
How do you see the changes to the items? They show in the UI, but not in events.log?
There have been some changes in the latest OH regarding log viewing (Fronttail replaced by an OH internal log viewer). Did you check events.log on your file system?
Does persisting and seeing changes for other items (not linked to esphome) work and visible in events.log?
Any ERROR or WARN in the logs when starting OH?
BRG
Arne
Hmm ya know whatā¦ The light and motion have history when i click analyze.
I wonder if roller shutter doesnāt have history in general for openhab.
No warning or errors on the log side of things. Iāll keep digging.
I am able to use rules to trigger the garage light zwave switch when the motion is detected. So now when i walk in the gdo lights and the main lights turn on and off automatically.
EDIT: I may have only needed a rebootā¦ now everything seems to be working.
2025-01-08 13:09:20.902 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 39.54248400 to 42.8431400
2025-01-08 13:09:21.345 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 42.8431400 to 46.15032700
2025-01-08 13:09:21.884 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 46.15032700 to 49.45098200
2025-01-08 13:09:22.365 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 49.45098200 to 52.75163700
2025-01-08 13:09:22.859 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 52.75163700 to 56.05228500
2025-01-08 13:09:23.367 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 56.05228500 to 59.3529400
2025-01-08 13:09:23.877 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 59.3529400 to 62.65359500
2025-01-08 13:09:24.388 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 62.65359500 to 65.9542500
2025-01-08 13:09:24.887 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 65.9542500 to 69.254900
2025-01-08 13:09:25.385 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ESPHome_device_ratgdov2821454_ratgdov2821454local_Door_Position' changed from 69.254900 to 72.5424800
I really like this binding but I have a question on how I can go about implementing tilt blind using servos and stepper motors. Iām using the configuration from How I Automated My Blinds to Tilt With The Push of a Button ā Milner Automations but no channels are displayed. In the page Servo Component ā ESPHome, I see a note that says
This component will not show up in the Home Assistant front-end automatically because Home Assistant doesnāt have support for servos. Please see Home Assistant Configuration.
Does this apply for this binding or is the servo and stepper component not supported in the binding.
Thanks,
This applies for the API that both this binding and HA connects to.
Just think of it as there is no specific āservoā type of entity (an thus API message) available, so you need to use some other entity such as a text, number, switch, cover etc.
Here is an example where I use a switch
to trigger an output motor/servo for 4 seconds and then turning it off:
globals:
- id: vibrator_active
type: "bool"
restore_value: no
initial_value: "false"
switch:
- platform: template
name: "Vibrator"
icon: mdi:vibration
id: vibrator
lambda: |-
return id(vibrator_active);
turn_on_action:
- lambda: |-
id(vibrator_active) = true;
- output.set_level:
id: vibrator_pwm
level: 50%
- delay: 4s
- lambda: |-
id(vibrator).turn_off();
turn_off_action:
- lambda: |-
id(vibrator_active) = false;
- output.set_level:
id: vibrator_pwm
level: 0%
output:
- platform: slow_pwm
pin:
number: GPIO22
id: vibrator_pwm
period: 1s
In your case you might want to use a cover
entity (maps to an OH Rollershutter item) or a number
instead of a switch in case you want to have various levels of blind closings.
Happy hacking!
Thank you DaveG you saved me quite the headache with the UOM fix.
How did you fix? I was able to edit the code. But the device dosent connect anymore when i edit any code on the thing.
I tried just removing the unit line and changing codes to s but it will only connect when i have it auto configure.
Thank you for the suggestions. I was able to tilt the blinds using the number component but Iām lost trying to use the cover component. The sample configurations I have reviewed are still too confusing (or complex) for me. Attached is the working esphome code using the number component.
esphome:
name: blikitctrtemp
friendly_name: BliKitCtrTemp
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "removed"
ota:
- platform: esphome
password: "removed"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Blikitctrtemp Fallback Hotspot"
password: "removed"
captive_portal:
number:
- platform: template
name: Servo Control
min_value: -100
initial_value: 0
max_value: 100
step: 1
optimistic: true
set_action:
then:
- servo.write:
id: servo_master1
level: !lambda 'return x / 100.0;'
output:
- platform: esp8266_pwm
id: 'tilt'
pin: GPIO5
frequency: 50 Hz
servo:
- id: servo_master1
transition_length: 5000ms
output: 'tilt'
Update: I got the cover component to work with the following configuration. Iām not yet confident if my configuration is robust or efficient. Any suggestion would be welcome.
globals:
- id: my_pos
type: float
script:
- id: move_servo
then:
- servo.write:
id: servo_master1
level: !lambda "return id(my_pos) / 100.0;"
cover:
- platform: template
name: "Blinds"
id: pub_pos
open_action:
- lambda: |-
id(my_pos) = 60;
- script.execute: move_servo
close_action:
- lambda: |-
id(my_pos) = -78;
- script.execute: move_servo
stop_action:
- servo.detach: servo_master1
The binding (which I had installed via the Add-on Store) was uninstalled after the upgrade to openHAB 4.3.2. Is that normal behavior?
Sometime in or after OH4 there was a new āfeatureā in OH that uninstalls all marketplace bindings on upgrade, just in case they (in theory) are incompatible with the new OH version (most work just fine). Remember, you had the same problem in a previous upgrade as well: ESPHome binding for the Native API - #222 by ErikDB
Workaround: Download the jar file and put in in the addons
folder, those files are not deleted.
There are some efforts to create a better Marketplace, feel free to chime in: https://community.openhab.org/t/marketplace-versioning-with-embedded-resource