Can you add energenie sockets as controlled devices.
I looked in list but it seems very limited.


can you share a link to the device?



sure you can connect it. add a device using https://github.com/myDevicesIoT/Cayenne-MQTT-Python and then use energenie library to control it from the dashboard https://pythonhosted.org/energenie/


wow. thanks . what a great response


you can create a pi plugin for energenie and help the cayenne community user to add engenie directly using pi agent and no need for coding https://github.com/myDevicesIoT/cayenne-plugin-example.
i see energenie as an excellent add on to pi agent plugin list.


Thanks. Ive spent the last couple of hours looking through the information and trying things out. Im afraid its well out of my scope of experience.
I thought it would be easy to find the energenie pimote adapter and load it up but that doesnt seem to be the way it works.
I was also trying to add a dht11 sensor but again came unstuck


no issue here,

what is the issue you are facing?

if you can provide more detail, i can help solve it.


Thanks for your time on this its .much appreciated.
I cant see how to start and add the pimote board to your system.
same applies to the dht11 temp sensor.
I know both work as ive tested them with pyhon scripts.


First of all you need to create new device on cayenne: On your cayenne dashboard navigate to add new--->devices/widget--->Bring your Own thing and you will get MQTT credential.
on you pi add this code https://github.com/myDevicesIoT/Cayenne-MQTT-Python/blob/master/examples/Example-03-CayenneClient.py and change the MQTT credential.
Next, run the code and you will see your device online on the dashboard. you will also see some green temporary widget, you can add them if you want.
Now you need a button to control the energenie device ON/OFF. For this add a custom button widget with channel 4 selected and add the below code in your code.

def on_message(message):
    print("message received: " + str(message))
    if (message.channel == 4) and (message.value == "1"):

For DHT11 you can either use pi plugin https://github.com/myDevicesIoT/cayenne-plugin-dht or have a code to read DHT11 data https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/overview and send it using the above code.


I tried that info but get:
pi@raspberrypi:~/Desktop python cayenne.py Traceback (most recent call last): File "cayenne.py", line 2, in <module> import cayenne.client File "/home/pi/Desktop/cayenne.py", line 2, in <module> import cayenne.client ImportError: No module named client pi@raspberrypi:~/Desktop
I tried from the beginning but the same result.


Run this command on your pi:

git clone https://github.com/myDevicesIoT/Cayenne-MQTT-Python
cd Cayenne-MQTT-Python
python setup.py install


Thanks. Thats working now

I followed the dht11 sensor instructions but when i run
sudo pip3 install it just gives error.


you are missing the DOT sudo pip3 install .


Thank you
That worked but now its the same message that it stops at the
import cayenne.client

Ive gone back and all the commands again but it comes back to halting at import cayenne.client



hold on, there are two separate method and seems like you using both. Use any one. either use python code or pi agent with plugin


I can see the message received and the value change from 0 to 1 etc but the code doesnt respond to the change.


can you share the code you are using?


Its probably where ive pasted the code that’s making it fail.


Can you copy paste the code and the output here in place of sending the image as it is difficult to read it.