PiFace support added

User avatar
Keptenkurk
Posts: 440
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: PiFace support added

Post by Keptenkurk » Thursday 30 July 2015 22:09

Will +12V/50mA suit it?
According to Ohm's law the current will never exceed 12V divided by 2000 ohm equals 6 mA. So your 50mA supply will do easily.
/paul

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Friday 31 July 2015 14:22

Just tried the beta and the piface/domoticz interface does not recognize any rfx meters.

i am going round in circles again
A lot of stuff that is doing my head in.

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

Re: PiFace support added

Post by Dlanor » Friday 31 July 2015 21:03

NickHead wrote:i am going round in circles again
Just try this:
BigDog wrote:I have reinstall domoticz with the image and did a full update upgrade and downgrade to the kernel 3.10.25+ with the code:

Code: Select all

 sudo rpi-update 2ef601a50b68eebeeb4dc3c6c525855961891be6
and all is working now :)
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

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Friday 31 July 2015 21:45

I would ask the question of compatibility. Mine is a Pi 2 B+ and I have seen that it could corrupt the installation.

The PiFace is a Digital 2, and therefore it may not have the drivers written.

Anyways, I am talking myself into doing this, it doesn't work at the moment therefore what can happen - not work even more at the moment - I may do it later.

Cheers for the reply.

Nick
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Tuesday 04 August 2015 15:21

I think I fixed mine :)

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.

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 05 August 2015 22:16

mmm does not work in my config :(
r2 + piface2

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Wednesday 05 August 2015 22:29

Sorry to hear that Jadi,

I have tried many examples on counting with piface d2 and they never worked, this IS the only one I got to work.

I got myself believing that people say they work, when they don't, because nobody gave an explanation, they just clamped up when examples were requested.

Hence why I put my findings up and I believe it mad a difference

Maybe a bit more digging about may solve things
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Wednesday 05 August 2015 22:33

PI D2 and added light sensor
Attachments
IMG_1269.jpg
Last one was too big
IMG_1269.jpg (2.53 KiB) Viewed 2024 times
Last edited by NickHead on Wednesday 05 August 2015 22:38, edited 1 time in total.
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Wednesday 05 August 2015 22:36

Also the proof that it is counting
Attachments
Capture.JPG
Capture.JPG (32.86 KiB) Viewed 2024 times
A lot of stuff that is doing my head in.

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

Re: PiFace support added

Post by jadijkstra2000 » Thursday 06 August 2015 15:22

My problem however is a little different :) When I reboot the pi, the inputs are available (again) as switches, not as counters... (when I have enabled the inputs). After trying the 'blink' example, it works again...until I do a reboot

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Thursday 06 August 2015 22:54

Hi Jadi,

just tested mine and it has also stopped. Just trying to find a way to kickstart it again.
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Thursday 06 August 2015 23:22

rebooted a few times, now it's working again. Really random.
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Thursday 06 August 2015 23:32

Snip1.JPG
Snip1.JPG (19 KiB) Viewed 1982 times
Snip2.JPG
Snip2.JPG (19.13 KiB) Viewed 1982 times
Snip3.JPG
Snip3.JPG (18.42 KiB) Viewed 1982 times
Back running - here's a 2kW input, don't know if it is synchronised with the readings but it works for now.

Getting there slowly.

Looks about 1750 Watts, a bit out but my generator timing maybe out as well, near though.

Just looked at it over 20 minute cycle and it's 1.98 kWh pulse, so maybe more accurate than I thought.

Even nearer, yay
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Thursday 06 August 2015 23:58

Sorry Maciek,

I have just noticed that I was answering someone else's question and totally hi-jacked you thread.

My sincere apologies bud.

Nick
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Saturday 08 August 2015 16:02

I didn't re-install Domoticz, I have 3 Pi's, the counter is on V 2.2657, never had to downgrade so not sure and I don't want to corrupt your system totally.



If not, we'll have another look at what's wrong. I am no god on this, still learning.

Cheers

Nick, UK
Last edited by NickHead on Sunday 09 August 2015 13:14, edited 1 time in total.
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Saturday 08 August 2015 17:13

This is with my 1kW Arduino LED Pulse Simulator, being sampled by the Pi 2.

Reads as 998 Watts over the 1 hour duration, the 2 Watts probably being the
actual LED "ON" state that was not accounted for in the program.


Usage.JPG
Usage.JPG (39.91 KiB) Viewed 1922 times
A lot of stuff that is doing my head in.

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 08 August 2015 18:13

So I am after tests. I did test 2 times: one time on stable 2.563 and second on latest beta 2.2703. Both failed but here are the results :D :

I connected my S0 meter to PiFace Digital2 input 0 (schematic from domoticz wiki, source +12V) and Photo Sensor is connected to input 2 (source 3.3V).

Stable 2.563:
I can see RFXMeter icons in Device window and after enabling them they report each 10 seconds but they does not increment / count.
If I add S0 meter input into Domoticz (called: 0_test_S0) there are not any rising/falling edges.
Photo:
Image

However on my multimeter I can see drops from 0.5V to ~0. And there is a beep sound :) I am curious if this voltage - in period when there is no impulse - is not too low? I used this schematic http://www.domoticz.com/forum/download/file.php?id=188 and of course 2N7000 is onboard.

I also tried to run your pfinit.py and I had seen blinking leds,then restarded domoticz with no success.

My last observation, If I click on Photo Sensor input icon (2_test_photo_sensor) I can see rising/falling edges so Domoticz see impulses, photo:
Image

but RFXMeter still does not incerase.

Beta: 2.2703:
I can not see RFXMeter icons, only "Lighting 1" icons. The RFX are just simply not present in Device window. Initializing PiFace from python script does not improve situation :D .

Image

I would like to try your exact beta version, could you please give me a link to download it? Because I just only see v2.2703.
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 :)

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

Re: PiFace support added

Post by Dlanor » Saturday 08 August 2015 19:18

I have tried to install a new piface 1 on RPI B+. I was told this should work fine. It boots fine but cannot add the piface. SPI is activated. Can anyone tell if the B+ can handle the Piface 1?
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

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Saturday 08 August 2015 22:20

My beta version was an update from the Domoticz system itself,

I did not download it as a file, it came down as a beta update.

However, saying that, the bugs are usually ironed out as the updates progress, by the look of it
you are on a version well past mine so it should be even better, if not still work/not work as it does not.

So, not sure on what I can do from here.

Older versions can be found here http://sourceforge.net/projects/domoticz/files/
but not on there for long.
A lot of stuff that is doing my head in.

NickHead
Posts: 164
Joined: Tuesday 29 October 2013 19:30
Target OS: Linux
Domoticz version:
Location: North East Coast of the UK
Contact:

Re: PiFace support added

Post by NickHead » Saturday 08 August 2015 22:23

The pin-outs on the PI B+ are exactly the same as the PI 2, so I would reckon
that it should be the same, and work OK.

I maybe wrong, and I can't take my B+ offline to check, so not sure, but would err on the yes.
A lot of stuff that is doing my head in.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests