Can someone talk me through Kip boolean control panel --> node red
Hello
I have tried hard to find an answer but I can't so I am asking here. I am trying to figure out how to get the Kip boolean control panel (actually the depricate dbutton/switch) into node red, ultimately so I can control some relays but for now all I want is to get a debug value in node red when I click a switch in Kip. From there I can set up everything else but I haven't seen an explanation of how to do this. I believe I need a signalk put handler but I can't see how to set up a path that is recognised in the Kip. Can someone help me out?
17 Replies
Did you see this example?
https://github.com/SignalK/node-red-embedded/blob/master/examples/put-handler.json
GitHub
node-red-embedded/examples/put-handler.json at master · SignalK/nod...
Node red nodes for use with the signalk-node-red plugin - SignalK/node-red-embedded
Yes. I have tried that and a different example. I can't get the path to show up in Kip. I can see the path and value in signalk data browser (Becasue the path is injected via the send pathvalue node, presumeably) but I don't get the path in the Kip path configuration.
Don’t use the deprecated switch
You should be able to see it the new switch. Right @David Godin ?
I can't see it with the boolean control panel push switch either. (Hopefully this control has a momentary function as oppsed to cilck, but I can't get that far at the moment)
Isn’t there a checkbox or something to show all paths?
OK. The checkbox "use numeric value" was the one. Can you explain why this is? Also, is there a way to make the push button behave as a momentary (like a mouse down/mouse up), or is it possible to use the depricated one? Thanks for the help, I have been at this for hours.
I should update that example to set meta units to bool and use true/false as the value. Then you would not need that.
I don’t think Kip can do momentary push. @David Godin can confirm.
It was an option with the now depricated boolean button/switch, which is great for something like a windlass. Can you tell me what to put in the meta units (presumably the send pathvalue) node. It would advance my understanding.
Actually I'm not sure it was to do with the numeric value. It seems to be that it takes several minutes to show up in the path list in Kip, despite it being available in the data browser immediately. But the behavior on an Android phone is not the same as from a web browser so I guess it is back to node red dashboard, which isn't nearly as nice looking.
Momentary push is present in the old and new controls. Keeping the button pressed sends numeric 1 or Boolean true every half second if memory serves well.
I'm controlling a usb relay with node red (allows me to enable n2k bus when testing from home). Startup read relay state and creates SK path. PUT handler accepts (true/false) input from Kip's boolean toggle, flow logic then controls relay, reads state and sends pathvalue to to update SK path.
Also, I've used Kip's Push (eg. to mute notification playback) and it seems to send true as fast as it can while being depressed. I'm not seeing any repeat rate control. The boolean Toggle control works well for my use case above w/ USB switching.
I noticed keeping the button pressed sends true every half a second on my laptop but it doesn't seem to do so on an Android phone, which is what I wanted to use it on. On the phone it seems to act like a toggle switch, i.e. I have to push it each time I want to set true/false.
With the new Kip boolean panel a "Push" type control sends multiple/continuous events with True. I'm seeing 5-10 per second. When released (stop pressing) it stops sending True (does not send a False). Maybe try adding a new Push type switch to make sure you're not getting any cached code?
I just tried it again after deleting my cache and logging in again. On my Pixel 8 pro it only sends on a click event, and then only a 1 (true). It looks like Android behaviour as anything long and there is no debug message at all. I deleted the old push button and tried a new one. It was the same behavior with the deprecated version, although I can't assign the path again this time around.
I'm not sure what to tell you w/o an Andriod to test ... maybe try other platforms w/ different javascript engine? I can't even run Kip on my older ipad air however I did just test on an iphone and while the "Push" control works (pressing on button sends true) I can't get it to repeat. This issue may just be related to touch interface vs. mouse events.
Well thanks for the responses anyway. I have it working in node red, I was hoping to keep everything in once place using Kip but I am getting the hang of node red and its layout so I have a route that works for me.