Use of scriptable (iOS) with node-red (via JSON)

Hello together,

some time ago I encountered the nice functionality of "scriptable for iOS" and asked myself, if there was a way to show the most important keyfigures from my node-red dashboard (like battery level, gas capacity etc.) - You must know that I am living on a boat, so some of the figures are essential.

I wanted to have a solution where I don´t need to open my dashboard and login every time, but have the necessary data on my iPhone display just when I look at it.

Therefore I checked the web to see if there is already any implementation of node-red in combination with scriptable, but I didn´t find anything. Ok, time to build something myself ... :slight_smile:

Finally I created a scriptable-script and a node-red implementation, which is relatively easy to use and I would like to share it with you. This is my very first gitHub project, feel free to check out my implementation on https://github.com/rankerson/node-red-scriptable.

Cheers
Ranki

Current features are:
The script can process several types of data like text, numbers (will be rounded), switches (with different possibilities like SFSymbols) and circles (e.g. to show a level indicator). You can show SFSymbols related to a status or the symbol itself. The data is cached in case the connection is lost.

I attached some examples ...


node-red-scriptable-small

1 Like

Interesting.

node-red-scriptable/node-red-integration.js at node-red · rankerson/node-red-scriptable (github.com) appears to be a JSON file? If so, it probably would be less confusing to rename it with a .json extension rather than .js?

Hi there,

you are right; I changed it and now there is a json :slight_smile:

Same would fit for the ioswidget-file, but I keep it with this; maybe I adapt it in the next release as the filename is part of the settings in the code.

Thank you for the hint!

Cheers
Sascha

Hello together,

I wanted to edit my original post to include another user example, but this seems not to work. I attached it here now.

Cheers
Ranki

node-red-scriptable-medium_v104_2

Hi folks,

I just released an update of the «scriptable script» including a (hopefully) better to read node-red integration.

This are the relase notes, if you are interested:

Version 1.05 (13.05.2021)

  • typos corrected
  • introduced general possibility to transfer color information in data.color
  • changed structure in SFSymbol from data.SFSymbol_Color to data.color (but downside compatible)
  • enabled possibility to determ color of circle filling
  • switch to use dark mode added
  • code resturctured a little bit in order to have all settings at the top
  • optimized node-red example

I hope you enjoy this enhancement - I really do appreciate your comments and thoughts!

Cheers
Ranki

The "Hello world" example for release v1.05: