Hello, Thank you for allowing me to join the forum. I'm new to Node Red. I'm running it on Home Assistant. I can now control a few lights and switches with some color automations. Now I want to make things more complex. I'd like to run a boiler on excess solar power, but for a minimum of 4 hours per day. I'm using a Homewizzard energy socket for this. It works fine in the summer months, but in the winter months, I run out of energy. The boiler needs to be on for 4 hours a day. How can I monitor the switch-on time each day and, if there's a shortage, have it switch on for the missing time, for example, at 4:00 PM? I'm now able to read the status of the energy socket in Node Red, but I don't know how or which flows to use to achieve my goal. Thanks in advance for your help.
Welcome to the forum. I've adjusted your post as you managed to wrap it in triple back-ticks which is for displaying code rather than text. I've also changed the category from Meta>Forum Help to General. The former being for help with the forum rather than from it.
Interestingly, this device seems to have an open API so that will be what you need. You should be able to access that using an http-request node.
Ah, OK, you are already passed that stage.
Looks like we need to know whether your device only supports the v1 API or the v2. The v2 API has a websocket interface which would let you monitor things in realtime. v1 would require you to poll the device regularly - say once a minute.
I duckduckgoed homewizzard energy socket and could only find homewizard with one z. I presume it's the right device.
Many folk like to interface their smart devices with Node-red via MQTT I don't see any indication that the homewizard can do this, but it does have an API which you can presumably interrogate through an http request.
You might find some useful info in this forum post.
And of course one reason to run Home Assistant is that it can interface with lots of devices.
How? Is there any documentation anywhere for this? What data can you access?
The Energy socket is linked to Home Assistant via the Home Wizard integration. For this, I had to enable the local API function in the Home Wizard app. In Node Red, I can use the Node Event:status to indicate whether the status is enabled or disabled. My first step, in my opinion, would be to find a way to count the number of minutes it's been switched on. The problem is that the switch isn't constantly on because it might be cloudy or an appliance is using more power than the solar panels are generating. How can I achieve this?
How can I find out if it supports V1 or V2? I have no idea what that means.
Have you looked on the website I linked?
This page tells you which devices support which API versions:
I wouldn't normally suggest Home Assistant but if you are struggling with Node-RED and don't want to learn the details, HA is probably a better choice for you. Node-RED is a bit more hands-on and requires a bit more understanding of how to do things.
I missed the link. What I can find is that the Energy socket supports V1. V2 is in development.
I'm eager to learn, but I have little to no experience with Node Red. I have more experience with PLC. I've searched extensively online for a similar solution, but I can't find one. Any help is appreciated.
How are you able to read the status of the energy socket in Node-red?
What does the data that you get look like? (Feed the data into a Debug node set to display the entire message, show us the debug output).
Hi,
not sure that i can contribute… but reading P1 with HomeWizard is easy. I work with the DeviceID as a Static IP is not possible with Tele-not-so-netjes. As an alternative, in case of power break down and the IP changes, you can read with arp the new IP… and adjust (automatic) in the function node.
But the question was : monitor the switch-one time. Why would you do that ? Work with a cheap kwh-device. And with a function node you calc the consumed kWh per hour at the end of each hour. If the power is <2600W i work with IKEA plug E2206 or Tuya TS011F... to track/control deferrable consumers. Node-Red & ZigBee2MQTT works like horse & charriage. As coordinator i work with UZG-01… because of the decent external antenna.
For what it is worth.
Cheers,
I think that is what Node-red shows on the "Info" tab for the debug node. It is not what I asked for.
What I want to see is on the Debug tab, when a message arrives at the debug node. See the little bug symbol?
I have asked twice how you can read the status in Node-red.
Perhaps the question makes no sense to you, in which case please ask for clarification.
If you just ignore my questions I won't be interested in helping you.
I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.
@jbudd My apologies. I'm trying to answer the questions. I can see whether the energy switch is activated by the icon below the event status node. I'll add two images. I'll also add what's in the "bug" image.
OK. The blue node is presumably a HomeAssistant node. Like many people here I am unfamiliar with HomeAssistant so I can only make a guess about it.
Put a debug node on the other output as well. Make sure both debugs are set to output the complete msg object.
If you switch the boiler off and back on again, do you see anything in the debug output in the right hand column?
Here is a simple example of a debug node's output. You can see that in this case there was a msg.topic: "temperature" and msg.payload: 878.
It would have been most useful if you could have started with the fact that you are using Home Assistant as that completely changes the way you are doing things.
While it is, I know, confusing when the helpful people in this forum wade in with questions and suggestions, it is important that you read them carefully and respond to all the questions so we can see what is going on in your environment.
You should also not assume that, because we are experts in node-red, that we know how all the nodes work. There are thousands. HA in particular is not often used by regulars in this forum so we need more info as requested by others.
Adding the home assistant tag to this thread for clarity.
To be fair, this is @Robbert123's first statement:
"Hello, Thank you for allowing me to join the forum. I'm new to Node Red. I'm running it on Home Assistant."