PiFace support added

RobinS
Posts: 67
Joined: Friday 13 September 2013 0:24
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by RobinS » Friday 20 December 2013 20:23

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
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

vincent
Posts: 1
Joined: Thursday 26 June 2014 19:08
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by vincent » Thursday 26 June 2014 19:17

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

RobinS
Posts: 67
Joined: Friday 13 September 2013 0:24
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by RobinS » Saturday 06 September 2014 20:03

vincent wrote:Hi everybody,
During an event, I would like to reset my water counter value.
Hi Vincent,

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

tommyken
Posts: 28
Joined: Friday 13 March 2015 0:18
Target OS: Raspberry Pi
Domoticz version:
Location: Belgium
Contact:

Re: PiFace support added

Post by tommyken » Saturday 21 March 2015 22:37

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!

User avatar
BigDog
Posts: 288
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi
Domoticz version: V2.3530
Location: The Netherlands
Contact:

Re: PiFace support added

Post by BigDog » Wednesday 01 April 2015 15:12

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
1x Raspberry With Domoticz V2.3530 [Linux version 4.1.6+]
PiRack With
-1X PiFace Digital(headache device)
-1X RaZberry - OpenZWave USB
1X RFXtrx433 USB Firmware: 183
5X Arduno: mysensors V1.5(Testing)
6x ESP8266: easy firmware(Testing)
1X Synology Nas

rgroothuis
Posts: 158
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by rgroothuis » Monday 13 April 2015 21:31

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?

User avatar
BigDog
Posts: 288
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi
Domoticz version: V2.3530
Location: The Netherlands
Contact:

Re: PiFace support added

Post by BigDog » Tuesday 14 April 2015 9:16

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

Code: Select all

sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
after that you can use the tuturrial you have used before :)
1x Raspberry With Domoticz V2.3530 [Linux version 4.1.6+]
PiRack With
-1X PiFace Digital(headache device)
-1X RaZberry - OpenZWave USB
1X RFXtrx433 USB Firmware: 183
5X Arduno: mysensors V1.5(Testing)
6x ESP8266: easy firmware(Testing)
1X Synology Nas

rgroothuis
Posts: 158
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by rgroothuis » Tuesday 14 April 2015 13:08

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 code

Code: Select all

sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
after that you can use the tuturrial you have used before :)
Thanks, downgrading is solving some problems. At least I don't get those error messages anymore and the performance seems to be reasonable again.

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?

tommyken
Posts: 28
Joined: Friday 13 March 2015 0:18
Target OS: Raspberry Pi
Domoticz version:
Location: Belgium
Contact:

Re: PiFace support added

Post by tommyken » Wednesday 15 April 2015 13:31

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 :)

rgroothuis
Posts: 158
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by rgroothuis » Wednesday 15 April 2015 13:55

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 :)
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.

User avatar
remb0
Posts: 811
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: PiFace support added

Post by remb0 » Sunday 26 April 2015 10:19

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?

jadijkstra2000
Posts: 132
Joined: Monday 26 May 2014 10:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by jadijkstra2000 » Wednesday 13 May 2015 13:11

Hmmm not in my setup :(

User avatar
proohu01
Posts: 177
Joined: Friday 17 October 2014 12:20
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: PiFace support added

Post by proohu01 » Wednesday 13 May 2015 15:56

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
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

jadijkstra2000
Posts: 132
Joined: Monday 26 May 2014 10:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by jadijkstra2000 » Tuesday 30 June 2015 13:42


macieiks
Posts: 55
Joined: Tuesday 07 July 2015 12:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by macieiks » Saturday 25 July 2015 10:05

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:

Image

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 :D )

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 :)

User avatar
BigDog
Posts: 288
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi
Domoticz version: V2.3530
Location: The Netherlands
Contact:

Re: PiFace support added

Post by BigDog » Saturday 25 July 2015 17:46

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

Code: Select all

 sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
and all is working now :)

hope they fix it or i mast buy a new pi and piface :P
1x Raspberry With Domoticz V2.3530 [Linux version 4.1.6+]
PiRack With
-1X PiFace Digital(headache device)
-1X RaZberry - OpenZWave USB
1X RFXtrx433 USB Firmware: 183
5X Arduno: mysensors V1.5(Testing)
6x ESP8266: easy firmware(Testing)
1X Synology Nas

macieiks
Posts: 55
Joined: Tuesday 07 July 2015 12:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by macieiks » Tuesday 28 July 2015 13:30

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
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 :)

RobinS
Posts: 67
Joined: Friday 13 September 2013 0:24
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by RobinS » Tuesday 28 July 2015 22:15

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

macieiks
Posts: 55
Joined: Tuesday 07 July 2015 12:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by macieiks » Tuesday 28 July 2015 22:36

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!
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 :)

Dlanor
Posts: 88
Joined: Sunday 22 March 2015 17:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: PiFace support added

Post by Dlanor » Thursday 30 July 2015 20:54

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 code

Code: Select all

 sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
and all is working now :)
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.
Last edited by Dlanor on Saturday 08 August 2015 19:40, edited 1 time in total.
Status: DomoNoob
Raspberry Pi (2x) | RFXCOM RFXtrx433E USB | RFlink | Landis+Gyr ZME120ACd | USB-IR-Schreib-Lesekopf | Alecto WS1500 | Touchscreen | Yooda Sunscreen | Google Nest | Piface| kWh meter| DS18B20 | BMP180

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest