Author Topic: Smart Plugs  (Read 5286 times)

Tim Hall

  • Victoria is my queen
Re: Smart Plugs
« Reply #50 on: 10 May, 2021, 11:29:30 pm »
Resurrecting this thread because I have recently discovered Tasmota.  Open source firmware for myriad internet-of-shit devices that can make them a lot less shitty (speaking MQTT/HTTP locally, without any of that cloud nonsense).
Does the Bold bit mean Jeff Bezos/Sundar Pichai don't get to know when you're turning your kitchen light on? It's all within the Kim & barakta Towers Netjbex?
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Kim

  • Timelord
Re: Smart Plugs
« Reply #51 on: 10 May, 2021, 11:41:59 pm »
Resurrecting this thread because I have recently discovered Tasmota.  Open source firmware for myriad internet-of-shit devices that can make them a lot less shitty (speaking MQTT/HTTP locally, without any of that cloud nonsense).
Does the Bold bit mean Jeff Bezos/Sundar Pichai don't get to know when you're turning your kitchen light on? It's all within the Kim & barakta Towers Netjbex?

Exactly.  Needless to say I've got all this stuff quarantined on its own VLAN with no access to the outside internet.

To do clever thigns with Tasmota you need a MQTT broker (a simple piece of software that stores and forwards messages between clients).  Sort of thing that's easily run on a Linux server, Raspberry Pi or virtual machine.  And probably some sort of high-level decision-making/user interface stuff.  Don't ask me about that bit, I've just grafted them into my own proprietary system, but I see talk about NodeRed in Tasmota circles.

But, TBH, Tasmota has a lot of useful functionality on its own: Clever timers, event-based rules, sensor thresholds, that sort of thing.  So if you want, say, a light that comes on for 5 minutes when you press the switch and then switches itself off, but only after sunset, you can do that without connecting it to anything[1].  And the HTTP interface is phone-friendly (accessing and resolving it left as an exercise for the reader).  Not that these smart things won't have similar functionality on their stock firmware, but it probably relies on some cloud service at some point.


[1] Well, a time server's probably helpful...
Careful, Kim. Your sarcasm's showing...

Kim

  • Timelord
Re: Smart Plugs
« Reply #52 on: 15 May, 2021, 12:30:17 am »
Today's adventure in wanky automation was configuring CUPS to tell the smart plug feeding the laserjet to switch on when a job is added to the print queueue.

This is obviously a vast improvement on the previous system of messaging barakta on IRC to tell her to frob the switch...
Careful, Kim. Your sarcasm's showing...

Kim

  • Timelord
Re: Smart Plugs
« Reply #53 on: 29 September, 2021, 09:18:16 pm »
I've discovered another exciting use for smart plugs:

I fitted one to the microwave so that, like the kettle, the alerting system could provide a visual cue that it had finished (so barakta doesn't unknowingly leave it beeping).  It occurred to me that I could program it to power-cycle at exactly 13:01[1] every day, thereby bodge-synchronising its spectacularly inaccurate clock.   :thumbsup:


[1] For reasons that don't really make sense, the clock is 12-hour and starts from 1:01 at power on.
Careful, Kim. Your sarcasm's showing...

Re: Smart Plugs
« Reply #54 on: 30 September, 2021, 01:19:59 pm »
Today's adventure in wanky automation was configuring CUPS to tell the smart plug feeding the laserjet to switch on when a job is added to the print queueue.

This is obviously a vast improvement on the previous system of messaging barakta on IRC to tell her to frob the switch...

Ooh I like that one. How much delay did you have to build in before the print job gets sent to allow the printer to boot and dhcp etc? Or does CUPs just keep retrying until the printer comes online?
I think you'll find it's a bit more complicated than that.

Kim

  • Timelord
Re: Smart Plugs
« Reply #55 on: 30 September, 2021, 02:05:58 pm »
Today's adventure in wanky automation was configuring CUPS to tell the smart plug feeding the laserjet to switch on when a job is added to the print queueue.

This is obviously a vast improvement on the previous system of messaging barakta on IRC to tell her to frob the switch...

Ooh I like that one. How much delay did you have to build in before the print job gets sent to allow the printer to boot and dhcp etc? Or does CUPs just keep retrying until the printer comes online?

No delay, I think it just retries for a bit.

tea4CUPS and curl are the special sauce.
Careful, Kim. Your sarcasm's showing...