IO Pi Plus Exporting pins and using them in DOMOTICZ

Moderator: leecollings

Post Reply
DeLei
Posts: 3
Joined: Tuesday 26 January 2021 19:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

IO Pi Plus Exporting pins and using them in DOMOTICZ

Post by DeLei »

Hello,
I'm a novice in programming,
Can anyone put me on the right track regarding "exporting pins from the IO Pi Plus expansion board", to integrate them into DOMOTICZ afterwards.
With the standard pins of the "raspberry Pi 3B +" I managed to do this without any problems, however I need more IO ports for my project.
after a lot of trying I start to get a bit hopeless :(
I would really appreciate if someone could help me out of this s*i*

thanks in advance
Leon
User avatar
waltervl
Posts: 5364
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: IO Pi Plus Exporting pins and using them in DOMOTICZ

Post by waltervl »

I am not familiar with the board. But I see there is a python library available on https://github.com/abelectronicsuk/ABEl ... _Libraries

If you already have a MQTT broker running you could use that with the python examples.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
DeLei
Posts: 3
Joined: Tuesday 26 January 2021 19:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: IO Pi Plus Exporting pins and using them in DOMOTICZ

Post by DeLei »

Dag Walter,
Alvast bedankt voor je reactie,
Ik ga dit eens proberen uit te vlooien, want MQTT is weer een nieuw gegeven voor mij.
Als het lukt laat ik je dat zeker weten
Nog bedankt voor de tip
DeLei
Posts: 3
Joined: Tuesday 26 January 2021 19:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: IO Pi Plus Exporting pins and using them in DOMOTICZ

Post by DeLei »

Beste Walter,

Zoals ik al zei, ik ben een leek in programmeren,
Ik ben ondertussen met MQTT zover dat ik de juiste pin op de juiste bus kan aanspreken,

#!/usr/bin/env python
from IOPi import IOPi
import time

bus = IOPi (0x21)
bus.set_port_direction(0, 0x00)
bus.write_port(0, 0x00)
while True:
bus.write_pin(1, 1)
time.sleep(1)
bus.write_pin(1, 0)
time.sleep(1)

Dit lukt, maar hoe moet ik zoiets importeren in domoticz???
User avatar
waltervl
Posts: 5364
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: IO Pi Plus Exporting pins and using them in DOMOTICZ

Post by waltervl »

As this is an English forum I will answer in English so also a user from France can follow our discussion.

Goto this page https://www.domoticz.com/wiki/MQTT#Domo ... munication

I presume you already have a MQTT broker like Mosquito installed and the MQTT gateway activated? If not follow the instructions on the same wiki page.
Domoticz is listening to Domoticz/in and sending to Domoticz/out.

So your IOPi Python should be listening to Domoticz/out and sending to Domoticz/in

You better test this with the Mosquito client to see if you Python program is acting as expected before continue integrating in Domotica.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests