PiFace 2 - Sensor/Counter not working

Moderators: fantom, leecollings

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

Re: PiFace 2 - Sensor/Counter not working

Post by macieiks »

@bizziebiz,

I can confirm it too, I am running V2.2563 (stable) and I can see update each 10 sec in logs (even if there is no impulse from S0 meter). However my counter's stats does not increase and states all the time 0.000kWh as I mentioned before. Which version of domoticz (stable / beta) should I run and test to get it working?
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 :)
NickHead
Posts: 83
Joined: Tuesday 29 October 2013 18:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by NickHead »

I went here and did some of the examples.

Mine wouldn't count, now it does, not sure if correct yet.

I was fed up of hearing other had the same problem as me and I searched for ages and came up with this,

http://www.element14.com/community/mess ... face#93804

also put this in my PI2, something to do with RPI Update.
sudo apt-get --reinstall install libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 raspberrypi-bootloader

sudo reboot

Make sure you backup/be safe before any modifications.

I take no responsibility for doing this, however, I did do it and restored faith in my PiFace Digital 2.

Hope it helps.
A lot of stuff that is doing my head in.
cwiekol
Posts: 4
Joined: Sunday 11 October 2015 11:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by cwiekol »

This one seems to solve my problem. Before i had only 4 inputs visible in devices section of domoticz, now i see all inputs and outputs.. Will test in the evening if they are acting as they should. Thanks NickHead.
sudo apt-get --reinstall install libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 raspberrypi-bootloader

sudo reboot
NickHead
Posts: 83
Joined: Tuesday 29 October 2013 18:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by NickHead »

Yes, it did with mine for a while, then it went wrong.

I am using a different approach now, so not sure on the status of this fix.

Regards

Nick
A lot of stuff that is doing my head in.
MrFrankie
Posts: 10
Joined: Tuesday 16 July 2013 8:45
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.2585
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by MrFrankie »

Oh good to see that there is a solution. It was so frustrating that it was not working correct.
At this moment I don't use the PiFace. I converted everything to MySensors and EasyESP. It's a bit more portable and easier to debug in my opinion. But who knows...

Thanks NickHead for the solution.
cwiekol
Posts: 4
Joined: Sunday 11 October 2015 11:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by cwiekol »

last thing which i have done like ten days ago was also disabling device tree:

sudo raspi-config
8 advanced options
A5 Device Tree

and reboot..

Now i'm on
Linux raspberrypi 4.1.7+ #817 PREEMPT Sat Sep 19 15:25:36 BST 2015 armv6l GNU/Linux

and

2015-11-21 10:20:29.822 Domoticz V2.3566 (c)2012-2015 GizMoCuz
2015-11-21 10:20:29.823 Build Hash: 332f2d5, Date: 2015-11-09 19:00:36
2015-11-21 10:20:29.825 System: Raspberry Pi

and piFace is working all right..

hope that helps...
badz
Posts: 4
Joined: Friday 05 February 2016 18:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by badz »

Hi,
I have been struggling big time with my Piface2 in domoticz.
After doing this fix, I have everything working smoothly.
https://github.com/domoticz/domoticz/pull/426
try it and tell me
PS: This is has been already merged in master on github .. just "git pull;make" to get the latest when using source code
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by nigels0 »

Hi,

Still having probems with this - setting the first parameter (enabled) in piface.conf to true sets the device up as Lighting 1 - putting it as false and I get no devices. What is the correct value for the piface.conf for a watermeter?
User avatar
Sine
Posts: 17
Joined: Monday 02 February 2015 15:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by Sine »

From my config:

Code: Select all

piface.0.input.7.enabled=false
piface.0.input.7.pin_type=level
piface.0.input.7.count_enabled=true
piface.0.input.7.count_update_interval_sec=10
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by nigels0 »

Thanks. Tried that but still don't get the utility come up in the devices. Wonder what the difference is?
Jan Jansen
Posts: 229
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by Jan Jansen »

Wich kernel are you running? Today i did a rpi-update (new kernel 4.4.?). After that update my piface did not work anymore. After then i installed kernel 4.1.18+ again, everything worked as desired. I hope that history does not repeat (kernel related to driver piface)
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by nigels0 »

Hi,

I'm using 4.4.13+ Maybe that's the problem. I'll try with 4.1.18+. ........

I tried it with 3.10.25+ and it still didn't work! So maybe not the kernel.
Jan Jansen
Posts: 229
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by Jan Jansen »

Hi,

At the moment my Pi B (2 Pifaces connected) is running 4.4.13+. Setting raspi-config > Advanced options > SPI enable.
Running 4.1.18+ Setting raspi-config > Advanced options > Device tree > disable.

The crux for me was setting the Raspi -config.

Perhaps you 've seen it : WIKI > Piface > General notes and connecting the SO bus.
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by nigels0 »

My Piface is working... Just not the devices showing in Domoticz.
User avatar
Sine
Posts: 17
Joined: Monday 02 February 2015 15:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by Sine »

You set domoticz to allow for new devices right?

I don't exactly know how this is handled, but I suspect it needs to see a few pules when it is in "allow new devices mode"
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by nigels0 »

No I didn't! I'll try that next.
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by nigels0 »

Unfortunately no change
NickHead
Posts: 83
Joined: Tuesday 29 October 2013 18:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by NickHead »

Code: Select all

from time import sleep

import pifacedigitalio

pifacedigitalio.init()

pifacedigital = pifacedigitalio.PiFaceDigital()

pifacedigital.leds[7].toggle()

sleep(0.5)

pifacedigital.leds[7].toggle()
try running this on the pi and see if it kickstarts the piface

P.S. It is a python script
A lot of stuff that is doing my head in.
Piacco
Posts: 69
Joined: Friday 14 November 2014 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by Piacco »

I use my piface to register my watermeter. What i noticed is that the RXFmeter only updates when i'am using water. When i'am not using any water for a while the RFXmeter becomes red. I thought the RFXmeter was updated every 10sec (count_update_interval_sec=10 in the piface.conf file).
In the hardware setting i have the data timeout for the piface board disabled, is this normal behavior?
Jan Jansen
Posts: 229
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: PiFace 2 - Sensor/Counter not working

Post by Jan Jansen »

Yes it is normal behavior.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests