Smart plug in HomeGenie?

I have one Amazon smart plug (came with an Alexa Dot ver 3 I got on Black Friday).

Currently using it for my Christmas Tree, and works great from Alexa Dot by voice command or the Alexa app.

Was looking to see if it’s possible to add WiFi plugs to HG? I see a package for WeMo but that looks specific to that brand and not generic for WiFi plugs.

It is definately possible if you know the protocol.
Sending commands to a wifi camera or wemo switches is no different you only need to know the switches ip and port and commands it 3xpects to receive. Most smart devices use MQTT.

Enable UPnP in HomeGenie and see if HG reports it presence. You can modify the WeMo MIG to take account of an Amazon smart plug.

Have a look at this in the GitHub issue. It may well be what you are looking for. It does go on a bit but you may well find something you could use with the Amazon smart plug.

Interesting I tried using an X10 lamp module controlled by a CM15A with my new LED xmas tree when scheduled to off it turns off and right back on immediately. I had to set up my Xmas tree on a mechanical timer to get to work on a schedule.

Have you got a second X10 controller on the same power line.

I turn UPnP in the home genie and it found two devices. One was my home genie server on the pi and the other was a Roku media player. The Amazon smart plug did not show up.

I also am not familiar with MQTT nor how I would implement that.

Maybe I’ll play around with it some more after the holidays

Do you have a discovery service on the App you use to control the Amazon smart plug. If Alexa can see your smart plug so should HG.

I’d place a request on the HG GitHub requesting that support be added to HG for the Amazon smart plug as I imagine many more will be looking for this too.

I’m using just one controller The CM15A

Send two Off commands in your script and let me know what happens.

Hello Petediscreete thank you for taking an interest in this x10 issue.I have tried with 2 off commands with LM465 lamp module (NO gain control) it comes right back on.Tried with PLM04
(WITH gain control) and it goes off but flickers continually. Both of these modules work correctly on lamps even led lamps. This tree is a multi function tree. It can be programmed via tree remote to change colors, set up favorite colors, use one color constant on ect. My guess the electronics built in to the tree are not compatible with these x10 lamp modules.

No I think there’s a problem with Scheduler or another program is referencing your devices to turn on when they are turned off.

I never used Scheduler as I never needed it. I will try it at some stage to see if I can replicate your issue.

Have you got other programs active that may be causing a problem like Smart Lights, Advanced Smart Lights or the Hue Program. Try disabling these programs one at a time to see if you can solve the problem.

Also be careful what scripts you import into HG unless you are sure you fully understand them. I’ve come across some scripts that will actually break your system or cause unwanted side effects recently.

I believe I had previously read that the x10 lamp modules do not do not cut off current completely and devices with vey low wattage may remain on. Have you ever heard of this? I am using smarts lights but again these lamp modules do work correctly as long as I do not try to control this new multi function xmas tree

Do simple x10 on and off commands work with these lights.

X10 lamp modules aren’t to be used with any thing other then lights. The fact that your using it with a tree that has extra funtions indicates you should be using an appliance module.using a lamp module will dammage your multifunction tree lights or your lamp module or both.

Yes the lamp modules work perfectly with my living rm lamps
on/off with RF remote and also they obey my scheduler, its only
when I try to use the the multi function xmas tree the modules act
up, so I discontinued use of module with my xmas tree. Will
resume use of lamp module after xmas and use with my living rm
lamps as I did before xmas successfully.

Thank you Tuicemen for your advice I may try using an appliance
module but I am happy for now to leave it on the mechanical
timer. It does its job.

I’ll have another look at the Scheduler program as I still think there are problems with its logic. There are other issues relating to it and it has suffered problems in the past.

The hardware problems I leave to those who know their X10 stuff and I’m sure you will find them on the X10 forum. I’m purely the Linux software side of things.

Been back taking a look at this - the original question that is, about integrating smart plugs (wifi) into HG.

I currently have 1 Amazon Smart Plug, 2 Teckin Smart Plugs, 1 Gosund smart plug and 3 Gosund Smart Switches.

These are all in use, and all connected to Alexa (and work). They are not part of my HG setup however and I would like to be able to do that. If I consider the Amazon smart plug an outlier, and just look at the Teckin and Gosund ones - those both use the Tuya API based on some research I have been doing. Each has their own Android app, but they look the same and appear to both use the Tuya framework.

Trying to find information that I can use to build a program in HG that would allow these types of switches to be integrated into HG has not been fruitful. I can find some snippets of code (mostly Python, and I already ran into issues with using that for my humidity sensor).

So figured I would follow up here to see if perhaps anyone else has had any success doing this?

I also noticed on the HomeGenie GitHub site there was a recent post of code changes from Gene that had this description:
Added API method for updating module parameters via JSON payload

So I wonder if that may prove useful with this type of device.

From what I can see on the GitHub there should be a major release of HG due shortly. v15 to v17 are Beta releases with already reported bugs.

In the meantime have you considered using virtual devices in HG and using api calls to you devices outside of HG to update their status and return their values. This would give an opportunity to create automations based on their status.

An interesting program to investigate is the Ping Me at Home Extended You could possibly edit the code and adapt it to your own use. It’s written in C# but quite easy to follow.

As you’ve already discovered your restricted to Iron Python v2.7 and I doubt that status will change anytime soon.

Using API calls is exactly what I have been looking at doing from HG - but I cannot find enough documentation on what I need to do that. Most solutions I find have Python scripts that handle the API calls - what I would like is to be able to form the url programatically and make the calls from HG (to get curretn status of the plug/switch or to toggle it on or off).