mdopp / simple-sonoff-server

Emulates the original sonoff-cloud-servers within your local network.
BSD 2-Clause "Simplified" License
144 stars 47 forks source link

Server and State not appearing in the palette #18

Closed bramco closed 6 years ago

bramco commented 6 years ago

Just installed your contribution and I can see the List, On and Off nodes in the pallette but not the Server and State.

I used node red manage palette to install assume there is no difference between this and a manual install?

Simon

mdopp commented 6 years ago

I will create a screenshot of my node-red and show what I see in my installation. Maybe that helps as a starting point for our conversation about, what is not working on your side. As I currently do not understand what you are expecting, and where you are expecting this.

bramco commented 6 years ago

Great.

But maybe I've put the issue in the wrong place and it should be on the simple sonoff server but appreciate any help with this.

To give you a bit more detail, when I install using manage palette, then I get a message saying all 5 nodes are installed (server, state, on, off and list). Then when I look at the palette after the install all I can see is 'State'. If I reload node red then all I can see is 'On', 'Off' and 'List'. So something weird is happening.

Simon

mdopp commented 6 years ago

So there should be 4 items image

when you add one to the flow chart, and double-click it, you see "add new server" + edit image

there you can enter all information you need image

the server will be started with node-red...but it does not have its own icon.

bramco commented 6 years ago

Hi,

Mine looks like below, so not State. I noticed as I mentioned earlier that when I have newly installed these nodes all I see is State. When I reopen node-red I then see what is below but no State. Which is a bit weird.

image

I also don't get the edit symbol for the server info. See below. image

mdopp commented 6 years ago

Can you please go to the folder in node-red, an update the simple-sonoff-server code manually?

bramco commented 6 years ago

Node-red restart shows this

4 Mar 11:23:31 - [info] Loading palette nodes pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py info pam_unix(sudo:session): session opened for user root by (uid=0) pam_unix(sudo:session): session closed for user root /home/pi/.node-red/node_modules/node-red-contrib-sonoff-server/config-server/config-server.js:16 log: (message, ...params) => { ^ 4 Mar 11:23:48 - [info] Dashboard version 2.2.0 started at /ui 4 Mar 11:24:06 - [warn] ------------------------------------------------------ 4 Mar 11:24:06 - [warn] [sensehat] Error: Can't find Sense HAT python libraries. Run sudo apt-get install sense-hat 4 Mar 11:24:06 - [warn] [sonoff-server] SyntaxError: Unexpected token . 4 Mar 11:24:06 - [warn] [sonoff-state] SyntaxError: Unexpected token > 4 Mar 11:24:06 - [warn] ------------------------------------------------------ 4 Mar 11:24:06 - [info] Settings file : /home/pi/.node-red/settings.js 4 Mar 11:24:06 - [info] User directory : /home/pi/.node-red 4 Mar 11:24:06 - [info] Flows file : /home/pi/.node-red/flows_Homepi_hub.json 4 Mar 11:24:06 - [info] Server now running at http://127.0.0.1:1880/

Which I'm sure isn't right - the unexpected tokens.

I'm now back with only List, On and Off showing and no edit symbol for the server as before.

Simon

bramco commented 6 years ago

Fixed, I needed to update node-red. I think I'd assumed that node-red was updated with an apt-get update upgrade but read somewhere else that it needs updating using the update-nodejs-and-nodered command.

Did that and half an hour later after re-installing everything it is up and running. Hope this will help anyone else with issues. Do a 'proper' node-red update before trying to install!!

Sorry obviously if I've had you scratching your head trying to work out what was wrong.

Simon

sebastianomelita commented 5 years ago

i have update alla but i still don't see the server node