question

xsilvergs avatar image
xsilvergs asked

Node-Red Temperature Sensor Node

Using Node-Red v2.6-large-image-7 on a RPi3 B+ with an mcp3208 ADC.

When I try to use the Temperature Sensor node I'm unable to select either sensor.


I get this message in the "Edit Temperature Sensor node" box:

Multiple temperature sensors were found with the same name. You can set a custom name for the device in Venus settings.

screenshot-at-2021-01-06-18-29-06.png


I am unable to see how to change the name of the sensor, any help would be much appreciated.


Node-RED
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Justin Cook avatar image Justin Cook ♦♦ commented ·

Moved to Modifications Space for non-Victron-supported systems/questions and to bring the question into the attention of other users of non-supported systems. Cheers!

0 Likes 0 ·
1 Answer
markus avatar image
markus answered ·

Hi,

On your Venus device:

go to Device List --> Temperature sensor you want to rename --> Device --> Name

You can enter a name for the sensor there.

BR


21 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xsilvergs avatar image xsilvergs commented ·

@Markus

But I don't have a field called name


screenshot-at-2021-01-07-16-11-45.png

0 Likes 0 ·
bathnm avatar image bathnm xsilvergs commented ·

What version of software are you running?

It exists on mine

1610038155588.png

0 Likes 0 ·
1610038155588.png (99.8 KiB)
xsilvergs avatar image xsilvergs bathnm commented ·

Using Node-Red v2.6-large-image-7 on a RPi3 B+ with an mcp3208 ADC.


I see there is a version that says it's for a rpi4

https://www.dropbox.com/sh/i8ru22o4ydws1rx/AADpa8lj5s2APZ2JS78OGPjKa?dl=0


I do not see Offline updates only Online updates.

screenshot-at-2021-01-07-18-37-22.png

From within the software I see this but get an error.

screenshot-at-2021-01-07-17-56-20.png

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ xsilvergs commented ·

> Not seeing Offline updates

where did you see that exact wording?

You do see it, 'install firmware from SD/USB', but is just named differently.


> Temp sensor

What software are you running to read out that MCP? You must have done some modifications, as I’m quite sure Venus OS doesnt read that out of the box?
My guess is that driver is missing the feature to set a name to the temp sensor.


hope that helps you & the rest of people here to get it solved, all the best

0 Likes 0 ·
xsilvergs avatar image xsilvergs mvader (Victron Energy) ♦♦ commented ·

I read Offline updates somewhere on the internet, not sure where though.

I took info from here https://community.victronenergy.com/articles/38710/victron-raspi-hat.html?childToView=71020#comment-71020

And info from here https://community.victronenergy.com/questions/19608/raspberry-pi-analog-inputs-tank-input.html

Can you explain or give a link to the more info for the driver please so I may find the file and perhaps edit it to include a name feature.

Many thanks

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ xsilvergs commented ·

hi, I don't know about how you-the-community :-) made temp sensing work on a rpi, nor what driver that uses, sorry. But I'm sure others here can help; or maybe self-help by just reading and trying a lot more.


The other thing you could try, just to make sure, is install a more recent image, yesterday I released v2.70~2-large-image-8.

https://www.victronenergy.com/live/venus-os:large

0 Likes 0 ·
xsilvergs avatar image xsilvergs mvader (Victron Energy) ♦♦ commented ·

@mvader (Victron Energy)

I'm getting nowhere fast at the moment so I'd appreciate a pointer or two.

I've reinstalled v2.60-image-large-7 on my RPi 3 B+ and it runs OK.

I've downloaded this swu (it does say it's for an RPi 4 though). Should I be able to update from this file from a USB stick and if so how as I can't?

It will update from USB to v2.60~38-large-image-6 but no further

Thank you for any help

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ xsilvergs commented ·

Hi, If you have an rpi3; you’ll need to use rpi3 files.

Which means my previous advise put you in the wrong direction, as there are no recent large-image files for an rpi3 yet. Sorry.

So, to see if that fixes it, you’ll have to wait I’m afraid.


maybe there is another way to fix your original problem (unable to use the temp sensor in node-red on a venus-large install);


maybe someone else has ideas on how to do that / work around it.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ mvader (Victron Energy) ♦♦ commented ·

Ps as far as I know, verification errors when writing sdcards can only mean one thing: broken sd card.

0 Likes 0 ·
xsilvergs avatar image xsilvergs mvader (Victron Energy) ♦♦ commented ·

That's what I thought but card checks out OK and I was able to write the v2.60~38-large-image-6 image to it and it's running now. Another one of lifes mysteries.

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie xsilvergs commented ·

Hi

I don't use node red only the standand image file with a touch screen etc, with all function working OK.

0 Likes 0 ·
xsilvergs avatar image xsilvergs bathnm commented ·

I still have not been able to get the Name option to display.

In an attempt to learn more I have taken a look at the gui folder files. The file PageDeviceInfo.qml has a section MbEditBox, id I remove the line show: item.valid with // the Name option is displayed. I can type in a name but it is not saved. Does this mean anything?

MbEditBox {

id: name

description: qsTr("Name")

item.bind: Utils.path(root.bindPrefix, "/CustomName")

//show: item.valid

maximumLength: 32

enableSpaceBar: true

}


I notice in this file there are a couple of other instances of "show: item.valid", they also don't appear.

0 Likes 0 ·
bathnm avatar image bathnm xsilvergs commented ·

It may well be that dBus does not hold the data and have a valid path. Use the dBus-spy tool to look at the temperature sensor and see if it has that data element associated with it.

the QML was not displaying it as item.valid must have been false, that means the data element dose not exist.

If dBus-spy shows it not there, then I suspect the driver which is maintaining the dbus path has not created it, if you can let me know the driver I’ll dig through the source and see if I can find the issue.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ bathnm commented ·

Hey both, normally its this one:

https://github.com/victronenergy/dbus-adc

But, for the rpi + temp sensor, I have no clue how thats done.

If you look at the commit logs of above, you can see a "add custom name support" commit early last year, iirc.

Success!

0 Likes 0 ·
xsilvergs avatar image xsilvergs bathnm commented ·

typing dbus-spy into terminal gives this output:

Services
com.victronenergy.digitalinput.input01                                                                                     Bilge pump
com.victronenergy.digitalinput.input02                                                                                     Bilge pump
com.victronenergy.fronius
com.victronenergy.logger
com.victronenergy.modbusclient.tcp
com.victronenergy.modbustcp
com.victronenergy.qwacs
com.victronenergy.settings
com.victronenergy.system
com.victronenergy.tank.builtin_adc2_di2                                                                            Generic Tank Input
com.victronenergy.tank.builtin_adc4_di0                                                                            Generic Tank Input
com.victronenergy.tank.builtin_adc6_di1                                                                            Generic Tank Input
com.victronenergy.temperature.builtin_adc3_di1                                                              Generic Temperature Input
com.victronenergy.temperature.builtin_adc5_di0                                                              Generic Temperature Input

dbus -y com.victronenergy.system / GetValue
'AvailableTemperatureServices': {'com.victronenergy.temperature/23/Temperature': 'Battery temperature sensor (1)',
                                  'com.victronenergy.temperature/24/Temperature': 'Battery temperature sensor (2)',
                                  'default': 'Automatic',
                                  'nosensor': 'No sensor'},

Does this mean anything to you? I'm not that familiar with dbus, yet!

0 Likes 0 ·
bathnm avatar image bathnm xsilvergs commented ·

scroll down and select one of the temperature sensors. You will then get data like this..
1610375036111.png

Key data is do you have the CustomeName. The fields Mgmt/ProcessName is the name of the process that is driving the sensor and Mgmt/ProcessVersion is the software version. Need to compare this against the git repository to confirm if you have a bug or just outdated software.

0 Likes 0 ·
1610375036111.png (281.3 KiB)
xsilvergs avatar image xsilvergs bathnm commented ·

Looks like my version is out of date, 1.17

screenshot-at-2021-01-11-16-19-24.png

Where do I find a later version?

0 Likes 0 ·
xsilvergs avatar image xsilvergs bathnm commented ·

Installed dbus-adc 1.27 from here:

https://github.com/victronenergy/dbus-adc/releases

I have run dbus-spy again but it still displays 1.17 !

0 Likes 0 ·
xsilvergs avatar image xsilvergs bathnm commented ·

Well, I found this which shows how to upgrade:

https://community.victronenergy.com/questions/59971/some-help-with-venusos-v258-dbus-adc-in-relation-t.html

But it doesn't run the dbus now. The dbus-adc.conf was empty so I filled it in as per the example. There is mention of read_adc.sh but that makes no difference.


Is it time to give up on this and buy a Cerbo and add Node-Red to it?

0 Likes 0 ·
bathnm avatar image bathnm xsilvergs commented ·

Node-Red is available in a test image for the Cerbo, I have it running at the moment.

Did you reboot between installed of the dbus-adc.

Have you looked in the dbus-adc logs to see if there is anything that will give you some pointers?

cat /var/log/dbus-adc/current | tai64nlocal


0 Likes 0 ·
xsilvergs avatar image xsilvergs bathnm commented ·

OK, Forgot about the Node-Red part, reinstalled just the regular image for an RPi, read up some more posts and it is now working.

I'll now go back,install a Large image and start afresh.

Thanks to all for your help, I've learnt more about how this works.

0 Likes 0 ·