This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NMEA0183 Generator fail to start
#1
I have:
  • Raspberry Pi3
  • BMP180
  • HTU21D
  • USB GPS/Glonass 

pi@openplotter:~ $ python .config/openplotter/openplotter.py
python: can't open file '.config/openplotter/openplotter.py': [Errno 2] No such file or directory


pi@openplotter:~ $ python .config/openplotter/openplotter
Traceback (most recent call last):
  File "/home/pi/.config/openplotter/tools/NMEA_0183_generator.py", line 151, in <module>
    MyFrame().Show()
  File "/home/pi/.config/openplotter/tools/NMEA_0183_generator.py", line 68, in __init__
    self.read_sentences()
  File "/home/pi/.config/openplotter/tools/NMEA_0183_generator.py", line 90, in read_sentences
    self.list_nmea.Append([ii[0],ii[2],fields])
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_controls.py", line 4816, in Append
    self.SetStringItem(pos, i, cvtfunc(entry[i]))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5: ordinal not in range(128)
Reply
#2
Yes. That's a bug. It seems that you typed in a character which ASCII code is higher than 128.
Can you please post the Section [NMEA0183] of your openplotter.conf?
Reply
#3
[NMEA0183]
sentences = [['MTW', [['environment.inside.temperature.value', 'x.x', '+', 0.0], '\xc2\xb0C'], 1.0]]
Reply
#4
(2016-12-13, 02:04 PM)kste Wrote: [NMEA0183]
sentences = [['MTW', [['environment.inside.temperature.value', 'x.x', '+', 0.0], '\xc2\xb0C'], 1.0]]

I did a fix that doesn't allow wrong characters in the string input field (available on Github).

Please edit the openplotter.conf and delete \xc2\xb0.

[NMEA0183]
sentences = [['MTW', [['environment.inside.temperature.value', 'x.x', '+', 0.0], 'C'], 1.0]]
Reply
#5
thank you,
Now 0183 generator starts.

But I see now on nmea degrees kelvin instead of Celsius degrees (Celsius on signalk are correct)

There's documentation on how to configure the conversion 0183 directly editing openplotter.conf?
Reply
#6
The advantage of SignalK is that they use SI-units (m,m²,m³,m/s,m³/s,J,rad,K,Pa,A,V,Hz,W). The disadvantge is most data have to be translated to private used units. In the diagnostic SignalK input window is a selection box for private unit. If you uncheck it you see the real SignalK value.
In the 0183 generator you have to select Expression instead of SignalK value to do calculations.
Then select in the field --operator the -
and add in the next empty field 273.15. The rest is the same as for SignalK value.
Reply
#7
Because sentence set automatically (MTW) is wrong, I tried to change it with MTA (Opencpn only recognizes this) or XDR.
I did a lot of tests, but I always get the NMEA0183 diagnostic that tells me:

An exception of type occured.Arguments timeout:

using:
python .config / openplotter / openplotter
does not display any error message

I then restored
sentences = [['MTW', [['environment.inside.temperature.value', 'x.x', '+', 0.0], 'C'], 1.0]]

but I always get:
An exception of type occured.Arguments timeout:

I removed and reinstalled openplotter and restored the NMEA string (either by editing the file openplotter.conf, both NMEA0183GENERATOR)
but I always get:
An exception of type occured.Arguments timeout:

Nmea not the output is longer produced for temperature, while signalK values are ok.

What can I do?
Reply
#8
I put your sentence in my openplotter.conf.
I went to:
SignalK tab and pushed restart
NMEA0183 tab clicked Restart
clicked on system (make it blue)
pushed diagnostic and saw the sentences in diagnostic_input window
opencpn settings connections checkbox Show NMEA Debug Window -> the sentences are coming

I also reboot everything works.

Does this info help?

btw you don't need to put in "python .config / openplotter / openplotter". Just "openplotter" will do.
Reply
#9
no, it does not work, always the same message
Reply
#10
Let's check if SK-base_d.py work at all.
Go to:
Tools NMEA 2000 generator
select Rudder
press OK
NMEA 2K tab
If Enable N2K output is checked uncheck it
push Diagnostic output

Does Rudder appear in the window?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)