Chris BHR - Can anyone point me to a resource t...

Can anyone point me to a resource that describes how to create a boolean path in signalk? I am trying to send a PUT command from KIP to node-red but there are no paths available in the Boolean Button/switch widget. I'm assuming that the widget filters only boolean paths?
19 Replies
Scott Bender
Scott Bender2y ago
Here's an example of a PUT handler in node red https://github.com/SignalK/signalk-node-red/discussions/48
GitHub
A PUT handler that sets a node-red global variable · SignalK signal...
[{"id":"219b9c95.4e0d5c","type":"inject","z":"db137791.d0f408","name":"","props":[{"p":"payl...
Chris BHR
Chris BHROP2y ago
Thanks @Scott Bender I've run that flow and i see the red.autoLights.state path in Data Browser but i still dont get that path showing in the Boolean Button/Switch (or Boolean Control Panel) widget in KIP
Scott Bender
Scott Bender2y ago
I'm not sure how kip detects paths. @David Godin ? maybe try the path electrical.switches.*.state ?
Chris BHR
Chris BHROP2y ago
My Cerbo has already generated loads of those paths and those arent being detected either
Scott Bender
Scott Bender2y ago
yeah, I'm seeing the same here looks like KIP only supports true and false for the value @David Godin can you make it support 0 or 1 also? Most of the switching plugins use that
Chris BHR
Chris BHROP2y ago
Even if i set it to true i dont see the path as an available option in KIP
David Godin
David Godin2y ago
Hi Scott . Kip does detect paths I could. How can I detect if it's a PUT path? The way it's done is it lists boolean type paths so that it only lists a limited set of paths Maybe convert the value to boolean in node-red? KIP should pick it up
Chris BHR
Chris BHROP2y ago
Thats what i had done but still not being detected in KIP unfortunately
Scott Bender
Scott Bender2y ago
@David Godin all the switching stuff, n2k, Shelly, Sonoff, Victron. It all uses 0 or 1
Chris BHR
Chris BHROP2y ago
I set it to false, rather than true and now its being detected (maybe it wasnt properly set to true boolean before and redeploying put it straight)
David Godin
David Godin2y ago
Added a feature request: https://github.com/mxtommy/Kip/issues/323 Maybe a bit off topic but we should think of a way, unless I just don't understand how (which is totally possible), to improve identification of path data types. Like on/off to boolean types and also Object types that some paths send. Maybe using strong meta units specifications. It would improve path discovery.
Chris BHR
Chris BHROP2y ago
I've also found payload is always "default". I can test current switch state in node-red and switch accordingly but is that expected behaviour?
David Godin
David Godin2y ago
It's a new widget and no one really uses it so you are pretty much in uncharted territory! I'll fix it all. Just be patient as I have a big release to complete. Getting close! I only tested with a "fake" node-red boolean path setup (shared by Scott - same as you).
Chris BHR
Chris BHROP2y ago
Understood. Its a great widget though and appreciate all the work youve put into it (and KIP) so far!
David Godin
David Godin2y ago
I'm releasing 2.8 shortly and will work on this in the next release
edouard_k
edouard_k16mo ago
Hello, I don't understand all the things, Is it possible to directly interact with electrical.switches.*.state from signalk or do we need to go trough node-red ?
Scott Bender
Scott Bender16mo ago
Yes, you use PUT via http or WebSocket. See the specification section on PUT.
David Godin
David Godin15mo ago
KIP now supports 0/1 numeric path PUT. It will be in the next release, ETA tbd @Chris BHR @edouard_k Hi guys. Just checking up to see if you are using KIP to trigger paths that are numeric (1/0) since the release that supports it? I've not had any feedback. Cheers!
Chris BHR
Chris BHROP15mo ago
To be honest my flows are all set up with ON/OFF son haven't used the update but I'll give it a test

Did you find this page helpful?