I want to control a lamp with Raspberry Pi and a relay. However, I want a single power line to provide power for Raspberry Pi and the lamp.
How can I do that? In other words, I want to construct a WiFi lamp with Raspberry Pi, a relay, and a lamp.
If this is a table lamp and you have access to both the UNSWITCHED active and neutral wires, then you can splice in a small power supply to supply the RPI. The RPI relay then switches downstream of the power supply mains input. As said by others, make sure its an appropriate power supply and the mains wiring is done safely and correctly.
I do not want to reflash a device. Is there a WiFi bulb that I can control without a special vendor software and without reflashing?PhatFil wrote: ↑Wed Apr 17, 2019 4:47 pmMost 'smart' devices based on esp8265/6 wifi socs can with varying ease be reflashed with alternative firmware. Tasmota being a Very popular and fully featured option. - smart sockets advertised for use with an app called "smart Life" or "BrandName-Life" can CURRENTLY, be reflashed OTA without any physical mods or opening of cases.. (Google "Tuya-Convert" for the github repo and utubes detailing the process..)
so spend a fraction of the cost of a 240v ac safe Pi case psu grommets etc needed to make your oringinal proposal safe on 1 x smart socket.
reflash it, host a mqtt broker on your pi and then use any mqtt interface for easy control, use node-red and the alexa-local node for hassle free local alexa control etc..
https://github.com/arendst/Sonoff-Tasmota/wiki
https://github.com/arendst/Sonoff-Tasmota/wiki/Tuya-OTA
not as far as i am aware..
Flashing software is relatively straightforward.
Very wise practicing caution with mains power.crocket wrote: ↑Tue Apr 23, 2019 12:07 amFlashing software is relatively straightforward.
The real challenge is making physical connections. The relay requires 5V power input and intercepts a power line. I don't know how to make physical conections without making a mess. This seems to require two power outlets unless I know how to put a power strip and the relay in a miniaturized plastic container. This is far beyond my expertise.
I cannot understand your reply at all. You better show me with a video demonstration.PhatFil wrote: ↑Sun Apr 28, 2019 12:17 amVery wise practicing caution with mains power.
sorry if my ebay link to an example of the cheapest devices available was misleading and requires a 5v dc power supply,
that was a bad example to post in that case .. The crucial point being its essentially the same h/w thats inside the slightly more expensive smart plugs soc wise an esp 8265/6 system which is 801,11g re its wifi (ample for its traffic load btw).
And since reflashing devices currently based on a tuya daughterboard for the esp module that are marketed as being controlled by an app called 'Smart-Life' or in some cases 'BrandName Life' can be accomplished Over The Air (OTA) the $10-15 cost of such a smart switch isnt bad value.
Then once used for the flashing you can re-use your pi as the mqtt broker host and host any further s/w to control you lamp, node red and its alexa-local node make alexa verbal control a doddle,
https://www.youtube.com/watch?v=O5GYh470m5kcrocket wrote: ↑Sun Apr 28, 2019 4:33 amI cannot understand your reply at all. You better show me with a video demonstration.PhatFil wrote: ↑Sun Apr 28, 2019 12:17 amVery wise practicing caution with mains power.
sorry if my ebay link to an example of the cheapest devices available was misleading and requires a 5v dc power supply,
that was a bad example to post in that case .. The crucial point being its essentially the same h/w thats inside the slightly more expensive smart plugs soc wise an esp 8265/6 system which is 801,11g re its wifi (ample for its traffic load btw).
And since reflashing devices currently based on a tuya daughterboard for the esp module that are marketed as being controlled by an app called 'Smart-Life' or in some cases 'BrandName Life' can be accomplished Over The Air (OTA) the $10-15 cost of such a smart switch isnt bad value.
Then once used for the flashing you can re-use your pi as the mqtt broker host and host any further s/w to control you lamp, node red and its alexa-local node make alexa verbal control a doddle,
I think https://www.crowdsupply.com/anavi-techn ... rared-phat or any USB IR transmitter/receiver is the better solution because the light switch in my room can be controlled by an IR remote controller.
Thanks for that link - bookmarked for summercrocket wrote: ↑Tue Apr 30, 2019 5:39 amI think https://www.crowdsupply.com/anavi-techn ... rared-phat or any USB IR transmitter/receiver is the better solution because the light switch in my room can be controlled by an IR remote controller.
My computer monitor can also be controlled by an IR transmitter.