PiFace support added
Moderators: fantom, leecollings
-
- Posts: 37
- Joined: Friday 13 September 2013 0:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Hi Paul,
Good to read that you isolated the problem.
It appears that the P1 corrupts the PiFace port name.
Maybe due to the fact that it was not assigned ? (will have a look)
Best Regards,
Robin
Good to read that you isolated the problem.
It appears that the P1 corrupts the PiFace port name.
Maybe due to the fact that it was not assigned ? (will have a look)
Best Regards,
Robin
My domoticz setup:
PI [Doorbell on Audio out], DS1307 RTC, BMP085, PiFace [4* S0 meter, Doorbell In, PIR, GBS and Door sensors] and RFXCom 433 [5 HomeEasy, 2 Impluz]
2x P1 smartmeter on USB
Gammu-smsd with USB 3G modem
Andromoticz on control tablet
PI [Doorbell on Audio out], DS1307 RTC, BMP085, PiFace [4* S0 meter, Doorbell In, PIR, GBS and Door sensors] and RFXCom 433 [5 HomeEasy, 2 Impluz]
2x P1 smartmeter on USB
Gammu-smsd with USB 3G modem
Andromoticz on control tablet
-
- Posts: 1
- Joined: Thursday 26 June 2014 19:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Hi everybody,
I just install domoticz with a piface extension. During an event, I would like to reset my water counter value.
In "do" part, I insert a "set fonction" like below :
Set"mycounter"="0"
Unfortunatelly it doesn't work, if someone could help me, it would be great !
PS : Please accept appologies from a frenchman really sorry for his poor English
I just install domoticz with a piface extension. During an event, I would like to reset my water counter value.
In "do" part, I insert a "set fonction" like below :
Set"mycounter"="0"
Unfortunatelly it doesn't work, if someone could help me, it would be great !
PS : Please accept appologies from a frenchman really sorry for his poor English
-
- Posts: 37
- Joined: Friday 13 September 2013 0:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Hi Vincent,vincent wrote:Hi everybody,
During an event, I would like to reset my water counter value.
I just read your question, although my reply is a bit late, its better then none

What you want is not possible, as the meters are stored in the domoticz database, as a upcounting counter.
This means that the value only can go up, the meter pulses are counted and are compacted in 5 minute intervals into the database structure.
These 5 minute compacted intervals are used by the reporting software to display all the nice graphs, statistics and total numbers.
So it impossible to just reset the counter by an event. To allow for meter count synchronisation, there is away to set the counter in the PiFace.conf.
Although this works it uses a crude way to accomplish it, and it will mess up so statistics in the process.
As domoticz has recently been extended with 'user variables' (nightly builds), which allows you to store and modify your own data/variables.
I think that this is what you are looking for, and could solve your problems, although some event scripting may be needed.
Best Regards,
Robin
My domoticz setup:
PI [Doorbell on Audio out], DS1307 RTC, BMP085, PiFace [4* S0 meter, Doorbell In, PIR, GBS and Door sensors] and RFXCom 433 [5 HomeEasy, 2 Impluz]
2x P1 smartmeter on USB
Gammu-smsd with USB 3G modem
Andromoticz on control tablet
PI [Doorbell on Audio out], DS1307 RTC, BMP085, PiFace [4* S0 meter, Doorbell In, PIR, GBS and Door sensors] and RFXCom 433 [5 HomeEasy, 2 Impluz]
2x P1 smartmeter on USB
Gammu-smsd with USB 3G modem
Andromoticz on control tablet
-
- Posts: 7
- Joined: Thursday 12 March 2015 23:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PiFace support added
i cant get my piface working anymore. I'm sure its not broken. Some test with python dit work.
I installed domoticz on the raspberry pi. Then i activated SPI in raspi-config
blacklist seems to be empty , so no blocking. After adding piface in hardware thhen i edit piface.conf
output0 is enabled.
When i add input 0 and output 0 in the devices list i see them in switches on the site. output has slave input0
To make sure i rebooted my pi.
i go look in log and i press button 0 , i see them activate in log, but the led or relay does not switch on. I tried also manually in switches list. I see light on input and outpun (ON SITE) gone off.
When i press individually on the bulb for output0 , i see the LED 0 on the print lights on.
But clicking on input0 gives this error 2015-03-21 20:34:17.861 Error: Piface: wrong housecode I
Whats wrong ? I don't find the solution. IT has worked .. I tried alot. Reinstall, updates .... codes ... Plzz help!
I installed domoticz on the raspberry pi. Then i activated SPI in raspi-config
blacklist seems to be empty , so no blocking. After adding piface in hardware thhen i edit piface.conf
output0 is enabled.
When i add input 0 and output 0 in the devices list i see them in switches on the site. output has slave input0
To make sure i rebooted my pi.
i go look in log and i press button 0 , i see them activate in log, but the led or relay does not switch on. I tried also manually in switches list. I see light on input and outpun (ON SITE) gone off.
When i press individually on the bulb for output0 , i see the LED 0 on the print lights on.
But clicking on input0 gives this error 2015-03-21 20:34:17.861 Error: Piface: wrong housecode I
Whats wrong ? I don't find the solution. IT has worked .. I tried alot. Reinstall, updates .... codes ... Plzz help!
-
- Posts: 82
- Joined: Tuesday 17 September 2013 13:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.9269
- Location: The Netherlands
- Contact:
Re: PiFace support added
what version of linux kernel are you using and what version of domoticz?
there is a bug in the new kernel linux that prevent the piface from working correctly
dont know if its fixed already but i have downgraded the kernel till they fix the problem
there is a bug in the new kernel linux that prevent the piface from working correctly
dont know if its fixed already but i have downgraded the kernel till they fix the problem
1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
-
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
I'm having some strange PiFace problems as well in combination with Domoticz. I just upgraded my Raspberry to the latest versions as specified in http://www.domoticz.com/wiki/PiFace
My current kernel version:
Linux raspberrypi 3.18.11+ #777 PREEMPT Sat Apr 11 17:24:23 BST 2015 armv6l GNU/Linux
/opt/vc/bin/vcgencmd version
Apr 11 2015 17:32:05
Copyright (c) 2012 Broadcom
version 311b05fb4e33655a083a6f65b645e6a14e322803 (clean) (release)
How to downgrade to a version that IS working perfectly with the PiFace interface? Any suggestions?
My current kernel version:
Linux raspberrypi 3.18.11+ #777 PREEMPT Sat Apr 11 17:24:23 BST 2015 armv6l GNU/Linux
/opt/vc/bin/vcgencmd version
Apr 11 2015 17:32:05
Copyright (c) 2012 Broadcom
version 311b05fb4e33655a083a6f65b645e6a14e322803 (clean) (release)
How to downgrade to a version that IS working perfectly with the PiFace interface? Any suggestions?
-
- Posts: 82
- Joined: Tuesday 17 September 2013 13:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.9269
- Location: The Netherlands
- Contact:
Re: PiFace support added
i use the kernel 3.10.25+ it is working good with the piface without problems
if the problems with the new kernel is fixed you can upgrade again
to go to the older kernel just use this code
after that you can use the tuturrial you have used before 
if the problems with the new kernel is fixed you can upgrade again
to go to the older kernel just use this code
Code: Select all
sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6

1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
-
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Thanks, downgrading is solving some problems. At least I don't get those error messages anymore and the performance seems to be reasonable again.BigDog wrote:i use the kernel 3.10.25+ it is working good with the piface without problems
if the problems with the new kernel is fixed you can upgrade again
to go to the older kernel just use this codeafter that you can use the tuturrial you have used beforeCode: Select all
sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
How do you have you PiFiace input configured? Only when I press the input button really long (1 second or so) it is being detected in Domoticz and the event is triggered. A small push on the door bell is not recognised.
I've configure the PiFace input port as follow:
piface.0.input.0.enabled=true
piface.0.input.0.pin_type=rising
piface.0.input.0.count_enabled=false
piface.0.input.0.count_update_interval_sec=0.1
Is this the correct and best configuration for a doorbell push button?
-
- Posts: 7
- Joined: Thursday 12 March 2015 23:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: PiFace support added
remember that piface only works as impulse ! Further i only set piface.0.input.0.enabled=true as true and count = false ... Because i don't use meters in my project. Hopely you got informed 

-
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Yip I was informed about this as well. What I was hoping for is that when the rising is configured as type that somehow this was buffered in the PiFace/Domoticz so that you alsways can respond to the event. Currently I need to push and hold the button a bit longer then normal human behaviour when pushing a doorbell to get the Domoticz event started.tommyken wrote:remember that piface only works as impulse ! Further i only set piface.0.input.0.enabled=true as true and count = false ... Because i don't use meters in my project. Hopely you got informed
- remb0
- Posts: 499
- Joined: Thursday 11 July 2013 22:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: PiFace support added
I started today with my new PI2 and the piface 1.
afther a clean image and all the updates I restored my backup.
Everything works1
I run now: (original image + the updates.)
Linux domoticz 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
So it's fixed. or this isn't the newest kernel?
afther a clean image and all the updates I restored my backup.
Everything works1
I run now: (original image + the updates.)
Linux domoticz 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
So it's fixed. or this isn't the newest kernel?
-
- Posts: 58
- Joined: Monday 26 May 2014 10:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Hmmm not in my setup 

- proohu01
- Posts: 95
- Joined: Friday 17 October 2014 12:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: PiFace support added
It does work in my Pi2 setup except for this part...
http://www.domoticz.com/forum/viewtopic.php?f=6&t=6441
EDIT: (17-6-2015) My PiFace 2.0 problems have been fixed with beta release #2573
http://www.domoticz.com/forum/viewtopic.php?f=6&t=6441
EDIT: (17-6-2015) My PiFace 2.0 problems have been fixed with beta release #2573
Pi 2 B | Pi Camera | PiFace 2 | RFXtrx433E (KaKu + Oregon Scientific) | Plugwise (9 Circles) | Aeon Z-Wave stick (Fibaro - dimmers, sockets, RGB, screens/blinds) | RFXMeter (Kwh/water/gaz) | WOL | Onkyo Receiver | RTC | Hikvision | Netatmo | Satel Integra
-
- Posts: 58
- Joined: Monday 26 May 2014 10:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
- Posts: 36
- Joined: Tuesday 07 July 2015 12:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Hey guys,
Yesterday I received new PiFace 2 Digital and Rasp 2. In two days I will receive Energy Meter with S0 impulse output (http://bemko.pl/files/553/instrukcja-bm ... -cz-ru.pdf).
Specification:
1000 imp/kWh
Impulse connection:
Voltage 12~27V, current≤27mA, max length of lead:20m
Impulse width=90ms, connect to terminal 20&21
Limits of values: max 60VDC, max 50mA
I have got question to a schematic below:

From the schematic as I understand I connect S0- (minus) with 2N7000. But what to do with S0+(plus) ? My knowledge is minimal in this topic so I apologise
(It is better to ask earlier than after the fact
)
Thanks !
Maciek
Yesterday I received new PiFace 2 Digital and Rasp 2. In two days I will receive Energy Meter with S0 impulse output (http://bemko.pl/files/553/instrukcja-bm ... -cz-ru.pdf).
Specification:
1000 imp/kWh
Impulse connection:
Voltage 12~27V, current≤27mA, max length of lead:20m
Impulse width=90ms, connect to terminal 20&21
Limits of values: max 60VDC, max 50mA
I have got question to a schematic below:
From the schematic as I understand I connect S0- (minus) with 2N7000. But what to do with S0+(plus) ? My knowledge is minimal in this topic so I apologise


Thanks !
Maciek
RPI2 + RFLink + PiFace D2 + Aeon Z-Wave Gen5 + Foscams FI9821P&R2 + MySensors + UPS APC Back-UPS 950VA
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
-
- Posts: 82
- Joined: Tuesday 17 September 2013 13:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.9269
- Location: The Netherlands
- Contact:
Re: PiFace support added
i give a headsup to you guys
i have reinstall domoticz with the image and did a full update upgrade and firmware to 4.0 and he cant find the piface anymore
then i dit a downgrade to the kernel 3.10.25+
With the code
and all is working now 
hope they fix it or i mast buy a new pi and piface
i have reinstall domoticz with the image and did a full update upgrade and firmware to 4.0 and he cant find the piface anymore
then i dit a downgrade to the kernel 3.10.25+
With the code
Code: Select all
sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6

hope they fix it or i mast buy a new pi and piface

1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
-
- Posts: 36
- Joined: Tuesday 07 July 2015 12:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
I refresh my question
Could you please tell me guys what do to with this S0+ port of Smartmeter and GDN of PiFace ? My base understanding from this schematic is to connect these two ports (S0+ and GND) to external +12 power supply (+ and -) but I just want to ask first to avoid destrying something. Thanks

Could you please tell me guys what do to with this S0+ port of Smartmeter and GDN of PiFace ? My base understanding from this schematic is to connect these two ports (S0+ and GND) to external +12 power supply (+ and -) but I just want to ask first to avoid destrying something. Thanks
RPI2 + RFLink + PiFace D2 + Aeon Z-Wave Gen5 + Foscams FI9821P&R2 + MySensors + UPS APC Back-UPS 950VA
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
-
- Posts: 37
- Joined: Friday 13 September 2013 0:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
macieiks wrote:I refresh my question![]()
Could you please tell me guys what do to with this S0+ port of Smartmeter and GDN of PiFace ? My base understanding from this schematic is to connect these two ports (S0+ and GND) to external +12 power supply (+ and -) but I just want to ask first to avoid destrying something. Thanks
Dear Macieiks,
I understand that you want to get started asap, and expect an answer from the community asap.
But I don't see why you need to PM me twice on this subject.
The documentation in the wiki on this subject is outstanding as you already showed in your post.
Actually I do not know what I can explain more than the schematic already shows.
Just follow the lines:
+12V PSU (+ wire) to S0+ connection
S0- connection to Resistor
Resistor to Resistor and to Gate (G) of 2N7002
Resistor to GND (-wire) of +12V PSU and to GND terminal Piface
Source (S) of 2N7002 to GND terminal PiFace
Drain (D) to PiFace input.
Your S0 meter spec's show your S0 meter is fit for the job.
Don't worry to much about reversing the S0+ and - pins in the schematic as the S0 output pins are designed to handle some abuse.

Best Regards,
Robin
My domoticz setup:
PI [Doorbell on Audio out], DS1307 RTC, BMP085, PiFace [4* S0 meter, Doorbell In, PIR, GBS and Door sensors] and RFXCom 433 [5 HomeEasy, 2 Impluz]
2x P1 smartmeter on USB
Gammu-smsd with USB 3G modem
Andromoticz on control tablet
PI [Doorbell on Audio out], DS1307 RTC, BMP085, PiFace [4* S0 meter, Doorbell In, PIR, GBS and Door sensors] and RFXCom 433 [5 HomeEasy, 2 Impluz]
2x P1 smartmeter on USB
Gammu-smsd with USB 3G modem
Andromoticz on control tablet
-
- Posts: 36
- Joined: Tuesday 07 July 2015 12:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: PiFace support added
Thank you Robin,
Sorry for double message you but as I saw later I typed incorrectly hyper-link address
. Right now I fully understand that I need to deliver +12V PSU to this circuit. I though that this EM is already generating impuls with +12V output. But now I see that it indeed needs +12V PSU to operate. Will +12V/50mA suit it?
Thanks!
Sorry for double message you but as I saw later I typed incorrectly hyper-link address

Thanks!
RPI2 + RFLink + PiFace D2 + Aeon Z-Wave Gen5 + Foscams FI9821P&R2 + MySensors + UPS APC Back-UPS 950VA
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
RPI2 + RFXtrx433e + Foscams FI9821P + MySensors + UPS APC Back-UPS 950VA
RPIB+ + TP-Link MR3420 + Huawei E173 GarageDomoticz :)
-
- Posts: 67
- Joined: Sunday 22 March 2015 16:18
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: PiFace support added
Until now everything looks fine on RPI B! I have reinstalled and downgraded the kernel. I have tried on my B+ and it fails hard! It doesn't boot any more.BigDog wrote:i give a headsup to you guys
i have reinstall domoticz with the image and did a full update upgrade and firmware to 4.0 and he cant find the piface anymore
then i dit a downgrade to the kernel 3.10.25+
With the codeand all is working nowCode: Select all
sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
Last edited by Dlanor on Saturday 08 August 2015 19:40, edited 1 time in total.
Domoticz| Zigbee | SONOFF
Who is online
Users browsing this forum: No registered users and 0 guests