I think you're the first one who understands what I am building. I would LOVE to avoid this complexity and use an out of the box solution but I have not been able to find one that is free. IFTTT costs money if you want to use webhooks. Not sure what you meant by Google API to IOT. But if I want to issue Google Voice assistant commands then it is not so easy, you need a "works with Google" device.The title of this post is misleading, as with the use of an isolated wall adapter 220V -> 3.3V the RPI will have no mains connection.
Although the proposed solution is a complicated way to achieve the desired function (google -> control plug -> isolated wall adapter 3.3V -> RPI GPIO -> some code on the RPI -> show message) it can be a quick solution as controlling a plug already works.
Having this solution implemented, then OP has time to look for a google api to IOT on RPi which makes the detour unnecessary.
Personally I would add an optoisolator between the 3.3V output of the wall adapter and the GPIO input. Example "SparkFun Opto-isolator Breakout". This would also allow to use a 5V wall adapter.
In my case the workflow I have in mind is the following: I say "Hey google, turn of cartoons" which turns on and then turns off the smart plug. My RPI will detect the turning on of my smartplug and issue a webhook web request which will be picked up on my other computer and execute some custom command. The only limitation I see is that I can run only one action like "turn off cartoons" with my RPI. There is no way to give it multiple different commands. That is a huge limitation. I need a RPI for each command.
Statistics: Posted by martinsz — Fri Sep 06, 2024 6:51 am