please someone would write me * .yaml for SONOFF basic ESPhome.
I need the contact to turn ON when the voltage at the L and N inputs (I don’t need the contact, I just need to monitor the voltage).
Or if Sonoff basic has the option of a sensor for the sensor to report that the basic is energized?
The button would change the state of the contact, but only for x seconds, after the time has elapsed, the contact will ON again.
I do not think anyone will do your work for you but if you try then many will help! As hard as it sounds there is no easy way here. You are expected to put your bit in first. You may have to understand a new (written) language, You may have to find the right hardware for the job you want to do?
Those choices are yours. In many years I have never visited any forum that will do your work if you do not try to solve it for yourself!
having said that what have you done so far? Please ensure that you provide code with the correct formatting!
I’m not sure it’s a Sonoff basic you actually need.
Can you describe the situation this device is going to be in.
Maybe there is a much easier and cheaper solution.
I discovered Homeassistant and Sonoff about 2 months ago. You learn slowly with the language barrier. Well, maybe by winter I will be able to learn everything so that I can control the heating.
I apologize once again and promise not to waste the forrum again.
I believe what he wants is a boolean return when the device connected is running or not.
That is also why I believe the Sonoff basic is not the correct tool.
Oh, I have a bunch of sonoff basics for that purpose. Sonoff 4 CH Pro that switch on a contacter / teleruptor in the distribution box, sonoff basic to know if the light is on or off.
I am preparing 4x TH-10 for measuring temperature and humidity in 4 rooms and 5x POW for switching and measuring heating and water heating. The electricity distribution company provides me with a lower price of electricity for some time a day and controls it with an electrical impulse that I just need to monitor.
I have Sonoff basic in ESP and I know for sure that sonoff basic with originall firmware can do what I need - after the voltage returns it turns on to the desired state and that’s enough for me. I just don’t know how to set it up in ESP firmware
You could then have an automation that tells you when the device is connected / has power.
automation:
trigger:
- platform: state
entity_id: binary_sensor.hdo_server_status
to: "on"
action:
- service: notify.notify
data:
message: Your device has power