I am a newbie here and want to connect to my home WiFi to control a WiFi switch. I want the Arduino to sense an external event. then only switch the switch off if it is between certain times.
Any assistance with the WiFi code would be appreciated.
I am a newbie to the forum but have experience in programming Arduino. I need help with connecting the Arduino to a device on my home network via WiFi. I want to control a WiFi mains switch from the Arduino.
it heavily depends on the interface(s) of the WiFi switch device.
But most of them have http requests or MQTT supported (then a MQTT broker is needed in the network).
If you already have a 'wifi mains switch' (your words) as I do (altogether I have something like 20) just install the app that controls the switch. You might be able to get the Arduino into the act (not needed and clumsy) by using the Arduino with the Arduino IoT cloud and an Alexa capable device.
Thank you for your response. I need to automatically switch on and off when certain conditions are met. Between 11.30PM and 5.30AM only if my electric car is charging. Alexa cannot detect this condition so I will use a CT clamp on the supply to the charger. The Arduino can then detect these conditions and control the WiFi switch accordingly..