Page 1 of 1
IO Pi Plus Exporting pins and using them in DOMOTICZ
Posted: Wednesday 27 January 2021 16:53
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
Re: IO Pi Plus Exporting pins and using them in DOMOTICZ
Posted: Friday 29 January 2021 0:26
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.
Re: IO Pi Plus Exporting pins and using them in DOMOTICZ
Posted: Friday 29 January 2021 13:56
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
Re: IO Pi Plus Exporting pins and using them in DOMOTICZ
Posted: Monday 01 February 2021 11:41
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???
Re: IO Pi Plus Exporting pins and using them in DOMOTICZ
Posted: Monday 01 February 2021 12:41
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.