This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] 0.11.3a action commands not working
#1
I am trying to us a sensor, in this case a 1W sensor using sig K handle environment.water.temperature.value to trigger actions. 

I set up the trigger with the trigger as above, operator >= and value 303 (30 Centigrade)

I set two actions, the first just shows a message; which works fine

the second should operate set a GPIO output high using the command 


Code:
echo 1 > /sys/class/gpio/gpio16/value


This works fine from the command line in the terminal but nothing happens in OP. When I run OP from the command line there are no error messages.

Any ideas?
Reply
#2
There are some linux arguments that the python interpreter can not digest and this is an example. It does not like the symbol >. There would be a solution changig the way these arguments are interpreted but it could create a security issue. Let me try something.

Anyway, what you are trying to do it will be possible soon. When you define a GPIO output in GPIO tab it will appear as a new action to set this GPIO to High or Low. On next update.
Reply
#3
Sounds great. Looking forward to trying it.

On the case of my plotter I have an red illuminated button (momentary close). When I get an alarm condition the I illuminate the button via the above GPIO pin. I haven't connected it yet but the idea is to have another action which resets the alarm condition when the button is pressed. Ideally the first press will silence the buzzer (also activated via a relay on the GPIO pin) and turn the light off - I would then like a second press to completely clear any existing messages.

Is there a way to implement this second press situation in OP ?
Reply
#4
(2017-05-03, 05:34 AM)Littlechay Wrote: Sounds great. Looking forward to trying it.

On the case of my plotter I have an red illuminated button (momentary close). When I get an alarm condition the I illuminate the button via the above GPIO pin. I haven't connected it yet but the idea is to have another action which resets the alarm condition when the button is pressed. Ideally the first press will silence the buzzer (also activated via a relay on the GPIO pin) and turn the light off - I would then like a second press to completely clear any existing messages.

Is there a way to implement this second press situation in OP ?

Maybe node-red would be a way to do this?
Reply
#5
(2017-05-02, 04:20 PM)Sailoog Wrote: There are some linux arguments that the python interpreter can not digest and this is an example. It does not like the symbol >. There would be a solution changig the way these arguments are interpreted but it could create a security issue. Let me try something.

Anyway, what you are trying to do it will be possible soon. When you define a GPIO output in GPIO tab it will appear as a new action to set this GPIO to High or Low. On next update.

(2017-05-03, 10:47 AM)PaddyB Wrote:
(2017-05-03, 05:34 AM)Littlechay Wrote: Sounds great. Looking forward to trying it.

On the case of my plotter I have an red illuminated button (momentary close). When I get an alarm condition the I illuminate the button via the above GPIO pin. I haven't connected it yet but the idea is to have another action which resets the alarm condition when the button is pressed. Ideally the first press will silence the buzzer (also activated via a relay on the GPIO pin) and turn the light off - I would then like a second press to completely clear any existing messages.

Is there a way to implement this second press situation in OP ?

Maybe node-red would be a way to do this?

I don't know. Can Node-Red interact with physical controls?

Or are you suggesting that Node-Red get passed the physical button action from OP/Signal K and then return an action to OP to clear the messages? 

I haven't played with Node Red much yet. I need to get all my instruments accurately reporting into Signal K first before I get fancy. Smile
Reply
#6
(2017-05-02, 04:20 PM)Sailoog Wrote: There are some linux arguments that the python interpreter can not digest and this is an example. It does not like the symbol >. There would be a solution changig the way these arguments are interpreted but it could create a security issue. Let me try something.

Anyway, what you are trying to do it will be possible soon. When you define a GPIO output in GPIO tab it will appear as a new action to set this GPIO to High or Low. On next update.

I see the action to set up a GPIO has been added in the latest version. But how do I set it as an action?

I have set GPIO 16 as, output, pull-up

I have tried "Command" and then entering <sensors.alarmLight> in the data section but that seems to have zero effect.

Chris
Reply
#7
Sorry Littlechay I have not added gpio actions yet as I promised you. First I wanted to publish I2C changes. Next update is coming soon with gpio and mqtt actions.
Reply
#8
GPIO output actions are working now in v0.11.5
Reply
#9
Yes confirmed for me. Thanks. Smile
Reply
#10
(2017-05-12, 08:03 PM)Sailoog Wrote: GPIO output actions are working now in v0.11.5

Yay! Fuel transfer pump working again after I broke node red gpio Cool

Thanx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)