I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one
that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
Any suggestions on where to look ? I'm not interested in a wireless solution, as it is likely to be used in places where signals are not reliable.
I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one
that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
Any suggestions on where to look ? I'm not interested in a wireless solution, as it is likely to be used in places where signals are not reliable.
On 1
(FWIW I'm leaning towards the Shelly Plus Plug, at around £20. IIRC
there's a euro version too. It's the only one I've found that seems not
to need cloud servers.)
I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
Any suggestions on where to look ? I'm not interested in a wireless solution, as it is likely to be used in places where signals are not reliable.
I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one
that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
Any suggestions on where to look ? I'm not interested in a wireless solution, as it is likely to be used in places where signals are not reliable.
Thanks
Adrian
Adrian <bulleid@ku.gro.lioff> wrote:
I'm looking for a USB controlled mains switch (230V AC) that I canI don't understand the difference. Surely anything that's going to
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one
that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
turn something on/off needs to be "one that sits in line (between the
device and the supply)" doesn't it?
Do you mean (the ones that cost 100 Euros or more) something that
already has a mains plug and socket on it? I think they're going to
be expensive simply because they aren't much in demand. What 'the
world' wants is a WiFi connected switch and they're two a penny of
course.
Any suggestions on where to look ? I'm not interested in a wirelessI think you'll probably have to bite the bullet and get a relay board
solution, as it is likely to be used in places where signals are not
reliable.
of some sort. Does it **have** to be USB? There's lots of quite neat
relay hats for the Pi.
On 1/18/25 23:07, Adrian wrote:
Any suggestions on where to look ? I'm not interested in a wireless
solution, as it is likely to be used in places where signals are not
reliable.
What do you mean not reliable? Active interference? Otherwise if you
have a device close enough for USB, it will be close enough for
Bluetooth or WiFi.
On 18/01/2025 23:07, Adrian wrote:
I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem
to fall into two categories, either a relay device which means having >>rewire the device (which I'd rather avoid), priced around 30Euros or
one that sits in line (between the device and the supply). The latter >>appears to be in excess of 100Euros, which is considerably more than I
want to pay.
Any suggestions on where to look ? I'm not interested in a wireless >>solution, as it is likely to be used in places where signals are not >>reliable.
Oh, and if you only need a PI for local control, with no networking,
don't forget the PI can be an AP and run a nearby wireless device
without a central router.
(FWIW I'm leaning towards the Shelly Plus Plug, at around £20. IIRC
there's a euro version too. It's the only one I've found that seems not
to need cloud servers.)
Adrian <bulleid@ku.gro.lioff> wrote:
I'm looking for a USB controlled mains switch (230V AC) that I canI don't understand the difference. Surely anything that's going to
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one
that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
turn something on/off needs to be "one that sits in line (between the
device and the supply)" doesn't it?
Do you mean (the ones that cost 100 Euros or more) something that
already has a mains plug and socket on it? I think they're going to
be expensive simply because they aren't much in demand. What 'the
world' wants is a WiFi connected switch and they're two a penny of
course.
Any suggestions on where to look ? I'm not interested in a wirelessI think you'll probably have to bite the bullet and get a relay board
solution, as it is likely to be used in places where signals are not
reliable.
of some sort. Does it **have** to be USB? There's lots of quite neat
relay hats for the Pi.
On 19/01/2025 11:25, Pancho wrote:
On 1/18/25 23:07, Adrian wrote:
Any suggestions on where to look ? I'm not interested in a wireless >>>solution, as it is likely to be used in places where signals are not >>>reliable.What do you mean not reliable? Active interference? Otherwise if
you have a device close enough for USB, it will be close enough for >>Bluetooth or WiFi.
Sadly that is not a given. You wont get much wifi to a board inside a
tin box, but you could make a hole for a USB cable...
serial over USB can probably do a hundred meters at a pinch, too.
In message <vmitka$2719a$11@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> writes
On 19/01/2025 11:25, Pancho wrote:
On 1/18/25 23:07, Adrian wrote:
Any suggestions on where to look ? I'm not interested in a wireless What do you mean not reliable? Active interference? Otherwise if
solution, as it is likely to be used in places where signals are not
reliable.
you have a device close enough for USB, it will be close enough for
Bluetooth or WiFi.
Sadly that is not a given. You wont get much wifi to a board inside a
tin box, but you could make a hole for a USB cable...
serial over USB can probably do a hundred meters at a pinch, too.
By WiFi, in this case, I'm referring to my home WLAN.
This isn't a new install, I'm looking at extending what I do with that particular Pi. I've tried using the Pi on WiFi in that location and it
can disappear off the network for prolonged periods of time. Likewise
if I'm stood next to it with my mobile, it has reverted to 4G rather
than WiFi for data, so the location is not really practical for a WiFi
based solution.
Using the Pi as an AP could work, that isn't something I've tried yet.
The Pi lives in a plastic IP55 box, so I would hoped that short range
(couple of feet) WiFi / Bluetooth would work.
I'm looking for a USB controlled mains switch (230V AC) that I can connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to fall into two categories, either a relay device which means having to rewire
the device (which I'd rather avoid), priced around 30Euros or one that
sits in line (between the device and the supply). The latter appears to
be in excess of 100Euros, which is considerably more than I want to pay.
Any suggestions on where to look ? I'm not interested in a wireless solution, as it is likely to be used in places where signals are not reliable.
In message <6pru5l-oju1.ln1@q957.zbmc.eu>, Chris Green <cl@isbd.net>
writes
Adrian <bulleid@ku.gro.lioff> wrote:
I'm looking for a USB controlled mains switch (230V AC) that I canI don't understand the difference. Surely anything that's going to
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one >> that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
turn something on/off needs to be "one that sits in line (between the >device and the supply)" doesn't it?
The cheaper option involves cutting the plug off the item, and hard
wiring it into the board. I've got two problems with that. Firstly, it means that I can't readily reuse that item elsewhere as I'd have to
replace the plug (a bit of a faff if it is temporary move), and secondly
if I'm trying to control something fed via a wall wart then it gets
messy unless I leave the wall wart powered all the time (which I'd
rather not do), and switch between it and the device.
No, but USB seemed to be the most likely solution as it works equally as
well for Non-Pi situations. Power may also be an issue. My initial requirement is for a low power device, which (without checking the
numbers) might be within the capability of running directly from the Pi,
but I can foresee needs where that won't be the case, so a standard
solution has its attractions.
... the options seem to fall into two categories, either a relay device
which means having to rewire the device (which I'd rather avoid), priced around 30Euros or one that sits in line (between the device and the
supply)
The advantage of wireless is you get isolation for free, so you don't need
to worry about mains backfeeding into the Pi, which makes construction >cheaper. It doesn't need to be wifi, there are also options using 433MHz >'remote control' frequency, which is point to point and longer range:
https://energenie4u.co.uk/catalogue/product/ENER002-2PI >https://www.ebay.co.uk/itm/396124241128
also with power measurement: >https://energenie4u.co.uk/catalogue/product/ENER002-2PI-RT
The transmitter speaks GPIO and there's Python code to control them from the >Pi.
I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or one
that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
Any suggestions on where to look ? I'm not interested in a wireless solution, as it is likely to be used in places where signals are not reliable.
Thanks
Adrian
In message <TjgqpoLGRDjnFwvW@ku.gro.lloiff>, Adrian
<bulleid@ku.gro.lioff> writes
I'm looking for a USB controlled mains switch (230V AC) that I can
connect to a PI to turn a mains power supply on and off.
I've done a bit of digging around on the net, and the options seem to
fall into two categories, either a relay device which means having to
rewire the device (which I'd rather avoid), priced around 30Euros or
one that sits in line (between the device and the supply). The latter
appears to be in excess of 100Euros, which is considerably more than I
want to pay.
Any suggestions on where to look ? I'm not interested in a wireless
solution, as it is likely to be used in places where signals are not
reliable.
Thanks
Adrian
OP here with a follow up.
After some ruminating, I decided to give the Local Bytes Smart plug a
try. I've got it happily working now, although I did have to install
(yet) another Pi to act as the control hub (Home Assistant if anyone is interested). I'm now waiting for a fresh delivery of a Pi3 to install
as a WiFi AP (the Pis in the locality are all Pi2).
One useful feature of the Local Bytes offering is that you can see to
power being consumed by the device it is controlling (although mine
suggests that I'm on 245V), but I've yet to work out how to access that
via a command line, rather than web interface.
Thanks again for the suggestions.
Adrian
OP here with a follow up.
After some ruminating, I decided to give the Local Bytes Smart plug
a try. I've got it happily working now, although I did have to install >>(yet) another Pi to act as the control hub (Home Assistant if anyone
is interested). I'm now waiting for a fresh delivery of a Pi3 to
install as a WiFi AP (the Pis in the locality are all Pi2).
One useful feature of the Local Bytes offering is that you can see
to power being consumed by the device it is controlling (although mine >>suggests that I'm on 245V), but I've yet to work out how to access
that via a command line, rather than web interface.
Thanks again for the suggestions.
Adrian
Did you opt for ESPHome or Tasmota firmware?
I use Tasmota, but I use Domoticz rather than Home Assistant. From what
I read ESPHome is tailored for Home Assistant and uses REST API rather
than MMQT like Tasmota.
A Pi4 can handle a lot of different services on the same machine,
installed in Docker Containers. So you don't necessarily need lots of
Pis. If the Pi4 isn't enough, there are more powerful Pis.
=Pi3 I had to go shopping. I hope that for what I'm going to be usingit for (apart from the AP), a Pi3 will be more than enough.
interested). I'm now waiting for a fresh delivery of a Pi3 to install
as a WiFi AP (the Pis in the locality are all Pi2).
On 2025-02-10, Adrian <bulleid@ku.gro.lioff> wrote:
interested). I'm now waiting for a fresh delivery of a Pi3 to install
as a WiFi AP (the Pis in the locality are all Pi2).
I hope you plan to run other services on the Pi3 as well - used purely as an >access point, the pi is not the best choice. For a low number of stations >and low throughput, it works, but dedicated wireless access points have >better wifi hardware (and probably cost less).
So far as I've been able to find out, HA is only installed as an image
on the SD card (using the RPI Imager), rather than manually installed on
an existing Pi image (e.g. apt install ...), so that means that the Pi
can only be used for what HA allows you to do. Therefore, one downside
(for me) with HA is that I don't seem to be able to gain SSH access to
the PI. I can access it via the web interface, and I can install a ZSH
shell on it, but that is in (I think) a Docker Container. What I would
like to be able to do, which I can with my other Pis, is to run regular health check stuff, CPU temp, free memory, free card space that sort of stuff. I can do that from the Docker Container, but I can't set up a
cron job to do it, and I haven't even tried getting it to email me a
daily summary.
HA can be installed in several ways.
Adrian <bulleid@ku.gro.lioff> wrote:
So far as I've been able to find out, HA is only installed as an image
on the SD card (using the RPI Imager), rather than manually installed on
an existing Pi image (e.g. apt install ...), so that means that the Pi
can only be used for what HA allows you to do. Therefore, one downside
(for me) with HA is that I don't seem to be able to gain SSH access to
the PI. I can access it via the web interface, and I can install a ZSH
shell on it, but that is in (I think) a Docker Container. What I would
like to be able to do, which I can with my other Pis, is to run regular
health check stuff, CPU temp, free memory, free card space that sort of
stuff. I can do that from the Docker Container, but I can't set up a
cron job to do it, and I haven't even tried getting it to email me a
daily summary.
HA can be installed in several ways.
On 2/13/25 12:15, Theo wrote:
Adrian <bulleid@ku.gro.lioff> wrote:
So far as I've been able to find out, HA is only installed as an imageHA can be installed in several ways.
on the SD card (using the RPI Imager), rather than manually installed on >>> an existing Pi image (e.g. apt install ...), so that means that the Pi
can only be used for what HA allows you to do. Therefore, one downside
(for me) with HA is that I don't seem to be able to gain SSH access to
the PI. I can access it via the web interface, and I can install a ZSH
shell on it, but that is in (I think) a Docker Container. What I would
like to be able to do, which I can with my other Pis, is to run regular
health check stuff, CPU temp, free memory, free card space that sort of
stuff. I can do that from the Docker Container, but I can't set up a
cron job to do it, and I haven't even tried getting it to email me a
daily summary.
I had no idea why I chose Domoticz over HA, it was a few years ago, but
you present a compelling argument.
My rpi4 Domoticz install is a 12 line docker-compose.yml.
I already had MQTT.
Domoticz works, lets me switch things on and off, immediately or
scheduled, and provides me with historical usage graphs. Which is all I >really want.
Dunno if it relates to you, but I had a similar SSH problem.
I had a Gitea Container (a pretty UI git repo manager) needing to
reserve the standard SSH port for git to work, this took over the host
rPi host standard SHH port. My solution was to assign the Gitea
container its own LAN IP address using a Docker Macvlan network drive,
thus the Gitea container and the host rPI could each use the default
SSH port as they had distinct IPs.
Try Domoticz, it is supposed to be much simpler than HA. Not as feature
rich as HA, but maybe a better fit for a simple home setup. (Caveat:
I've never used HA).
Docker is brilliant! If they had had it when I was working, I wouldn't
have needed to wear my brown trousers every release day, at least not
so much :-). Although, I'm sure the bright young things of today will
have introduced new complexity, so it is still easy to mess things up.
Nowadays, for me, it can make installing third party software simple,
as opposed to a nightmare of conflicting environment.
In message <vol5gc$2v89p$1@dont-email.me>, Pancho <Pancho.Jones@protonmail.com> writes
On 2/13/25 12:15, Theo wrote:
Adrian <bulleid@ku.gro.lioff> wrote:
So far as I've been able to find out, HA is only installed as an image >>>> on the SD card (using the RPI Imager), rather than manually HA can be installed in several ways.
installed on
an existing Pi image (e.g. apt install ...), so that means that the Pi >>>> can only be used for what HA allows you to do. Therefore, one downside >>>> (for me) with HA is that I don't seem to be able to gain SSH access to >>>> the PI. I can access it via the web interface, and I can install a ZSH >>>> shell on it, but that is in (I think) a Docker Container. What I would >>>> like to be able to do, which I can with my other Pis, is to run regular >>>> health check stuff, CPU temp, free memory, free card space that sort of >>>> stuff. I can do that from the Docker Container, but I can't set up a >>>> cron job to do it, and I haven't even tried getting it to email me a
daily summary.
I had no idea why I chose Domoticz over HA, it was a few years ago,
but you present a compelling argument.
My rpi4 Domoticz install is a 12 line docker-compose.yml.
I already had MQTT.
Domoticz works, lets me switch things on and off, immediately or
scheduled, and provides me with historical usage graphs. Which is all
I really want.
I've managed to get a PI to ask HA to turn my switch on and off, but
I've not been able to get the PI to read the data used to generate the graphs, which I'd like to be able to do. It would be useful to at least know if the switch is already on before I try to turn it on again !
Bonus points for being able to get the power consumption of the device
it is controlling.
Dunno if it relates to you, but I had a similar SSH problem.
I had a Gitea Container (a pretty UI git repo manager) needing to
reserve the standard SSH port for git to work, this took over the host
rPi host standard SHH port. My solution was to assign the Gitea
container its own LAN IP address using a Docker Macvlan network drive,
thus the Gitea container and the host rPI could each use the default
SSH port as they had distinct IPs.
Until installing HA, I've never (knowingly) had any dealings with Docker.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 505 |
Nodes: | 16 (2 / 14) |
Uptime: | 75:59:19 |
Calls: | 9,930 |
Calls today: | 6 |
Files: | 13,807 |
Messages: | 6,347,423 |
Posted today: | 2 |