windkh / node-red-contrib-shelly

Shelly control nodes for node red.
MIT License
34 stars 21 forks source link

Requesting energie total and current form Shelly 2.5 #38

Closed nitram-rem closed 3 years ago

nitram-rem commented 3 years ago

Hi, i use several Shelly 2.5 as standard switches and like to ask you if it is possible to grab the values for Energy total and current for each channel as it is shown in the web from each Shelly and bring it to node-red?

windkh commented 3 years ago

You mean these values? { "power": 0, "overpower": 23.78, "is_valid": true, "timestamp": 0, "counters": [1,2,3], "total": 4 }

windkh commented 3 years ago

Well, maybe they are already included in the full status object under msg.status? Can you check that?

nitram-rem commented 3 years ago

will do. "Power" means current used power for that channel? and "overpower" for which valus this stands for?

windkh commented 3 years ago

Here you can read the description https://shelly-api-docs.shelly.cloud/gen1/#shelly2-5-status

nitram-rem commented 3 years ago

When i poll the status (using your example for the 2.5) i get an array with 2 objects: array[2] 0: object ison: true has_timer: false timer_started: 0 timer_duration: 0 timer_remaining: 0 overpower: false overtemperature: false is_valid: true source: "http"

I do not see power and overpower is false not a number

windkh commented 3 years ago

ist that msg.payload or msg.status???

Configure the debug node so that the full message object is shown

windkh commented 3 years ago

[{"id":"df3ef55ad580c765","type":"shelly-switch","z":"365debdef1efd315","hostname":"192.168.178.165","description":"","pollinginterval":"0","x":410,"y":580,"wires":[["37260f7c104b2f5b"]]},{"id":"599976b3ad50906b","type":"inject","z":"365debdef1efd315","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":580,"wires":[["df3ef55ad580c765"]]},{"id":"37260f7c104b2f5b","type":"debug","z":"365debdef1efd315","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":660,"y":580,"wires":[]}]

windkh commented 3 years ago

image

windkh commented 3 years ago

I will close this for now, ok?