csuermann / node-red-contrib-presence-faker

Node-RED node that fakes presence in a smart home by switching devices (e.g. lights) on and off at random times.
MIT License
23 stars 2 forks source link

Feature Request: Indicate dynamically overridden settings in editor #18

Closed csuermann closed 3 years ago

csuermann commented 4 years ago

I guess this is what needs to be used: https://nodered.org/docs/creating-nodes/node-js#exposing-settings-to-the-editor

https://github.com/csuermann/node-red-contrib-presence-faker/issues/17#issuecomment-672838084_

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 1.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

valbuz commented 3 years ago

again.... i have to raspi with node red and presence-faker running. both with the same version. on one raspi it works since the update 1.8.0 on the other it doesn't work with the same flow. see the att picture: right

wrong

csuermann commented 3 years ago

Hi @valbuz,

could you please share the json export of both of your flows?

Also, what does the DevTools network tab show when you open the editor? It should look something like this:

image

valbuz commented 3 years ago

hi here are the two flows.

presence-faker_false.txt presence-faker_working.txt

csuermann commented 3 years ago

Your function node is composing a string instead of an object:

msg.payload = '{"windowEnd":"' + sunrise + '"}';

Your working example converts that string back to JSON with a dedicated json node. Your failing example doesn't.

valbuz commented 3 years ago

so, i export the working nodes from working system and import it on the other system in a new flow. The same Node's work's only on the one system..... Both systems have the same version's of Node Red/Presence-Faker.

This Flow works on one system and not on the other :-( flows.txt

csuermann commented 3 years ago

Can you please attach a debug-node behind the json-node and observe the payload received there?

valbuz commented 3 years ago

of course...

sunrise

csuermann commented 3 years ago

Yap, there is the problem: It should be an object but is a string.

valbuz commented 3 years ago

.....i only export and import the flow on the other system...

csuermann commented 3 years ago

All I can tell you is that your sending the wrong message format to the presence-faker node. This is not a defect of presence-faker.

valbuz commented 3 years ago

Sorry, my error. i take the debug in front of the json-node :-)

Now the debug out as object...

flow

object

properties

csuermann commented 3 years ago

And the overridden settings still don't show up in the editor?

Which version of presence-faker do you use?

Once you override the settings, does the context-tab for the presence-faker node look similar to this?

image

valbuz commented 3 years ago

kontext

version

the only difference on the two systems: raspberry pi4 and the other is a Container on a Proxmox

pat

csuermann commented 3 years ago

Good to know. Maybe the call to the context API doesn't go through. Can you please check and compare the network tab?

https://github.com/csuermann/node-red-contrib-presence-faker/issues/18#issuecomment-801430094

valbuz commented 3 years ago

what's the url of the api call? there is nothing blocked in my proxmox (so i know)

csuermann commented 3 years ago

the URL contains the Node-RED node-ID at the end, in my case it looks like this: http://rpi4.local:1880/context/node/13d3434b.54931d

valbuz commented 3 years ago

The is no FW activ on my Container himself... Also on another Container, it doesn't work. So it must be a problem with proxmox....

thanks pat

valbuz commented 3 years ago

I change my last Raspi to a Proxmox and here it also stop's working :-(

Why isn't it possible to change the value's in the corresponding input forms himself?

form

csuermann commented 3 years ago

Have you made any progress figuring out what's blocking the calls to the context API on your Proxmox based systems?

Mind you, the override should still work, it's only the visual hint in the editor, that's not working properly.

Of course you can set new values via the input forms, but that always requires a re-deploy of your flow.

valbuz commented 3 years ago

Hi

No, i didn't find the solution

and Yes, i know it works also without the Popup ;-) so with the kontext showing the settings are ok for me.

thanks pat