Ras Pi supply voltage

If you have multiple messages then you always have to follow it with a Switch (or similar) to get rid of those you don't want. With everything in the payload there is not that problem.
Could possibly have checkboxes to say which info is required, that would save multiple calls of the system command for those who just want (for example) temperature.

1 Like

Evening Paul (@Paul-Reed),
I will get back on this in a couple of weeks, and let you know when I have something to test.
Bart

2 Likes

I've just had delivered (all the way from China!) a great little power lead which has reduced the voltage drop across the supply cable, and stopped the 'Low Voltage' alert & throttling.
With a 1m standard USB cable (if there is such a thing), I was measuring 4.65V - 4.7V on the Pi's power pins.
With this 0.25m lead, I'm now measuring a minimum of 4.8V, as the lead is claimed to support up to 5A for the 0.25m cable, 4A for 0.5m & 3A for 1m.

The cable/connectors quality appears very good, and at 77 pence with free delivery (which took 2 weeks).....

The lead can be found by googling;

site:aliexpress.com PZOZ Micro USB Cable 3A Fast Charging Microusb Charger Cord For Samsung S7 Xiaomi Redmi Note 5 Pro 4 Tablet Android Phone Micro

@Paul-Reed, thanks for posting that. It looks like a quality product and an honest spec. For some reason the link didn't work for me, but I think I found it at:

https://www.aliexpress.com/item/PZOZ-Micro-Usb-Cable-3A-Fast-Charging-For-Samsung-Huawei-Xiaomi-redmi-LG-Data-Cable-Android/32975547477.html?spm=2114.search0104.3.64.43fd57a5IC3fp7&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10130_10068_10890_10547_319_10546_317_10548_10545_10696_453_10084_454_10083_10618_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_57,ppcSwitch_0&algo_expid=dcd2e62d-875b-46c1-8185-5ba84ee42fee-7&algo_pvid=dcd2e62d-875b-46c1-8185-5ba84ee42fee&transAbTest=ae803_4

Short and fat is not always a bad thing :slight_smile:

2 Likes

No, that's way too expensive!!
I've updated my post above with a way to find the correct dealer - PZOZ Official Store

2 Likes

It's amazing that the postage alone, on a similar lead from Pimoroni which is about 28kms from my home, costs Ā£3.25p.
Buying the lead from China - 8,200kms from my home, the postage is free...

How can that be?

1 Like

Where is it? I don't see it in Manage Palette and a search in github doesn't find it?
I can't run vcgencmd on my Pi running Hass.IO, but a Vcgencmd Node might provide the info since I do have Node Red running there.

1 Like

Steve, it is a bit early, this was a suggestion for the NAME of the plugin

Doh-150x111

1 Like

Evening guys,
I had completely forgotten this one ...

However recently Paul has been so kind to assist me - all the way - with my garage door openers.
As a result, I had no other option than develop this node (as a payback plan).
Damn you Paul :rofl:

Here is a beta version of node-red-contrib-vcgencmd, which should contain most of the features discussed above. It is not available on NPM yet, so you can install it directly from my Github account:

npm install bartbutenaers/node-red-contrib-vcgencmd

Would be nice if you could test it, and review the documentation (i.e. the readme page and the node's info panel). Since you guys are the experts on this one, all 'constructive' feedback is welcome!

Some doubts already from my side:

  1. Would like to inform - in the flow editor - the user, in case it is being installed on a non-Raspberry platform. I thought that there was already something alike (e.g. for GPIO), but cannot find it at first sight. Some links to code snippets would be welcome ...
  2. Beside your feature requests, I have also added a few things that might be useful in the future for my personal project(s). For example there is an option to turn on/off the video power. Can anybody test whether this works. I'm not sure whether this is for hdmi or a rpi touchscreen?
  3. Currently none of the settings can be updated via the input messages. Don't know if there is a good use case to add such a message-based control?

Have fun with it !!!!
Bart

1 Like

Just curious as to the reason why most shouldn't be exposed?

I have read this thread.

The idea sounds good.

From my stand point I see two options.
1 - a list of options to send with tick boxes selecting what is/not sent.
2 - sending what is selected in one message with different ... components.
eg: msg.temperature msg.voltage msg.(others)

But yes it does sound like a very good idea for a node.

Hi Bob (@Bobo),

Don't know why Dave said that, but my feeling at the time being was: "let's add all of the available vcgencmd functionality, since you never now in advance what users will need...". However this week - during development of the node - my gut feeling told me that I should follow Dave's advice.

Some examples:

  • otp_dump: Not very well documented and don't think you will need this very often.
  • set_backlight: Seems to me that it is only for future use.
  • render_bar: Debug function.
  • And so on ...

So I removed them again from my code. I have only kept the ones that I think users will call from a Node-RED flow. For example the 'get temperature' could be called every N seconds, which makes sense. But if you want to have an otp_dump a few times in your lifetime, you can call the vcgencmd command yourself in command line. But if I have missed some relevant options perhaps, please let me know and I can add those to the dropdown list ...

1 Like

Hi Andrew (@Trying_to_learn) ,

I have been playing with that idea myself. But if you want to have selected N options, then I have to call the vcgencmd command myself (inside the node) N times. Don't think I can call it once with N options.

  • So from a performance point of view, there is no advantage doing it like that. I mean the node still has to execute the vcgencmd command N times, with the overhead of executing a child_process N times.
  • But indeed it could make your flow smaller, have 1 node instead of N nodes.
    image
    However I think your flow will be easier to understand if you have 1 node for each option. For example:
    image

So that is the reason that you can now select 1 option in the node ...

Why can't you do a call to get all things and then filter out what is requested by the user?

I am not sure that is possible to do with just one "call" to the command.

Yeah, that seems fair enough if all else fails.

So you can't do one call and get all the options and filter only the ones wanted?
(But thinking about it, I guess looking the command it probably isn't an option.)

Because I am sure that if it was possible, people smarter than me - like you - would have done this already.

I also guess it isn't possible. Such a command is called from Javascript code like this:

child_process.exec("vcgencmd measure_volts sdram");

As you can see, we call the command in our code exactly the same way as you would type it in your command line interface. Summarized: if you can't use N options in your command line, we also can't do it in our code.

Of course I could write a loop around it and call it N times (i.e. one time for every option that you have requested in the node's config screen):

for (var i = 0 ; i < specified_options.length; i++) {
   child_process.exec(specified_options[i]);
}

But then there is no performance gain ...
But I'm not an expert in this, so if someone has a better alternative please let me know!

Agreed, the obscure ones are probably not needed. But it's always the issue, who decides what is obscure? :upside_down_face:

Anyhow I am currently running your nodes in parallel with my vcgencmd exec nodes and all seems good so far ...

1 Like

In this case Bart decides... - and then we can all ask for extra... that he may deem worthy of adding.
The basic principle should be only add what people are actually using. Adding every possible option a) just confuses beginners b) makes it all more complicated for no benefit c) clutters up the UI and/or the response object. It's much easier to add extra function later after people have requested it and it has been discussed here (eg single versus multiple outputs etc etc), rather than implementing things maybe in a (possibly) dumb way that makes it hard to use - or hard to change later.

As Bart said its easy enough to call an exec node with a single command for some obscure option if needed leaving the node to do the useful ones like temperature, voltage, etc.

If this sentence is not copyright protected, I will add it to the readme file on Github ...

1 Like