Input toggles output in Raspberry

Posted on
Mon Dec 10, 2018 1:01 pm
Sam offline
Posts: 29
Joined: Aug 22, 2016

Re: Input toggles output in Raspberry

Here is the result..

The file is from the Indigo Mac.. did a menu send xxxx "all programs .." to the RPIs but no luck

Code: Select all
pi@raspberrypi:~/pibeacon $ tail -F temp/messageSend
master:  {"program":"master","i2c":[],"ipAddress":"192.168.10.21","pi":"10","temp":"48.3"}
w capital F
tail: temp/messageSend: filen avhuggen
OUTPUTgpio:      {"outputs":{"OUTPUTgpio-1-ONoff":{"17624462":{"actualGpioValue":"high"}}},"program":"OUTPUTgpio","i                                                                                                                         pAddress":"192.168.10.21","pi":"10","ts":{"tz":"CEST","time":1544467141.2}}
^C


Code: Select all
pi@raspberrypi:~/pibeacon $ ps -ef | grep .py
nobody     323     1  0 14:05 ?        00:00:00 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user nobody --deviceglob /dev/input/event*
root     19302     1  0 19:37 pts/0    00:00:00 python master.py
root     19625     1  0 19:37 pts/0    00:00:00 /usr/bin/python /home/pi/pibeacon/copyToTemp.py
root     19698     1  0 19:37 pts/0    00:00:01 /usr/bin/python /home/pi/pibeacon/OUTPUTgpio.py
root     19742     1  0 19:37 pts/0    00:00:00 /usr/bin/python /home/pi/pibeacon/receiveGPIOcommands.py 9999
pi       20758 16846  0 19:40 pts/0    00:00:00 grep --color=auto .py
pi@raspberrypi:~/pibeacon $

Posted on
Mon Dec 10, 2018 1:22 pm
kw123 offline
User avatar
Posts: 6449
Joined: May 12, 2013
Location: Dallas, TX

Re: Input toggles output in Raspberry

could you do


0. do a edit RPi and save

1. go to rpi

2. set inverse on indigo
cat parameters, check for "outType": "1" if that changes

if it does not change then the send to RPi is not working

if it does change do
tail -F temp/messageSend
and set output on/off in indigo

then change to inverse
and do
tail -F temp/messageSend
and set output on/off in indigo

check if it changes
Code: Select all
OUTPUTgpio:  {"outputs":{"OUTPUTgpio-1-ONoff":{"1964742022":{"actualGpioValue":"low"}}},"program":"OUTPUTgpio","ipAddress":"192.168.1.198","pi":"0","ts":"tz":"CDT","time":1544467348.85}}
==> actualGpioValue":"low" or "high"


Karl

Posted on
Mon Dec 10, 2018 1:53 pm
Sam offline
Posts: 29
Joined: Aug 22, 2016

Re: Input toggles output in Raspberry

It changes fine..


Code: Select all
pi@raspberrypi:~/pibeacon $ tail -F temp/messageSend
OUTPUTgpio:      {"outputs":{"OUTPUTgpio-1-ONoff":{"17624462":{"actualGpioValue":"low"}}},"program":"OUTPUTgpio","ipAddress":"192.168.10.21","pi":"10","ts":{"tz":"CEST","time":1544470039.38}}

pi@raspberrypi:~/pibeacon $ tail -F temp/messageSend
OUTPUTgpio:      {"outputs":{"OUTPUTgpio-1-ONoff":{"17624462":{"actualGpioValue":"high"}}},"program":"OUTPUTgpio","ipAddress":"192.168.10.21","pi":"10","ts":{"tz":"CEST","time":1544470158.17}}

pi@raspberrypi:~/pibeacon $ tail -F temp/messageSend
OUTPUTgpio:      {"outputs":{"OUTPUTgpio-1-ONoff":{"17624462":{"actualGpioValue":"high"}}},"program":"OUTPUTgpio","ipAddress":"192.168.10.21","pi":"10","ts":{"tz":"CEST","time":1544470248.48}}

pi@raspberrypi:~/pibeacon $ tail -F temp/messageSend
OUTPUTgpio:      {"outputs":{"OUTPUTgpio-1-ONoff":{"17624462":{"actualGpioValue":"low"}}},"program":"OUTPUTgpio","ipAddress":"192.168.10.21","pi":"10","ts":{"tz":"CEST","time":1544470387.83}}



One question..

The status in Indigos custom states never shows "on" when actualGpioValue is "high" regardless of whether I set the output type as normal or inverse. Is it supposed to work so?


OUTOUT normal
actualGpioValue=high --> status=off
actualGpioValue=low --> status=on

OUTPUT inverse
actualGpioValue=high --> status=off
actualGpioValue=low --> status=on

/Sam

Posted on
Mon Dec 10, 2018 2:36 pm
kw123 offline
User avatar
Posts: 6449
Joined: May 12, 2013
Location: Dallas, TX

Input toggles output in Raspberry

What device type do you use ?

Could you delete and recreate. Not a dimmer but an on/off relay device.


Sent from my iPhone using Tapatalk

Posted on
Mon Dec 10, 2018 4:32 pm
Sam offline
Posts: 29
Joined: Aug 22, 2016

Re: Input toggles output in Raspberry

I use OUTPUT-GPIO-1-ON/off . I have tested to delete and recreate it but with the same result.

/Sam

Posted on
Mon Dec 10, 2018 5:41 pm
kw123 offline
User avatar
Posts: 6449
Joined: May 12, 2013
Location: Dallas, TX

Re: Input toggles output in Raspberry

I am now following the up/down high/low through each step and have cleaned up some programming.. many places to look...

this is roughly the flow
action --> get dev defs --> send to RPI -> receive at RPI --> set GPIO --> send "actual value" back to plugin --> receive in plugin --> put into dev/state

will post a new version later today ..

Karl
will have this
Screen Shot 2018-12-10 at 17.40.05.png
Screen Shot 2018-12-10 at 17.40.05.png (29.85 KiB) Viewed 385 times

Posted on
Mon Dec 10, 2018 6:15 pm
kw123 offline
User avatar
Posts: 6449
Joined: May 12, 2013
Location: Dallas, TX

Re: Input toggles output in Raspberry

Sam
could you try this version:
https://www.dropbox.com/s/88hxonsxvzgpoal/piBeacon-2018-12-10.zip?dl=1
?
you need to edit the GPIO device and save it. Then the device states will be populated.

Karl

Posted on
Tue Dec 11, 2018 12:16 am
Sam offline
Posts: 29
Joined: Aug 22, 2016

Re: Input toggles output in Raspberry

In the new version, everything works perfect. I have tried normal / inverse output and everything looks good.
Thank you so much for all your help and all your work and for a very good plugin.

/Sam

Posted on
Tue Dec 11, 2018 10:31 am
kw123 offline
User avatar
Posts: 6449
Joined: May 12, 2013
Location: Dallas, TX

Re: Input toggles output in Raspberry

Sam

is now published on the indigo store.
Version # one higher -- only cosmetic changes beyond yours

again thanks for testing


Karl

Who is online

Users browsing this forum: No registered users and 0 guests