Project

General

Profile

solved: Problem installing drivers

Added by physikus over 6 years ago

Hi,
I’m running housemon 0.6.0. At the moment, two nodes are sending there data - one three bytes, the other eight bytes. With rf12demo, demo and logger installed everything works fine. I get nice log files. Now I wanted to go on and wrote two driver files and a nodeMap-local.coffee. I additionally installed jcw-readings and jcw-staticdata. And did not get the information on the browser that I expected. I got nothing. Of course. I had forgotten to install drivers. So I installed that, too. But now housemon hangs.

nohup.out says:
@
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-tick
install briq rf12demo:ttyUSB0
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
install briq sysinfo
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
install briq status
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
install briq logger
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
install briq jcw-readings
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
install briq jcw-staticdata
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
install briq drivers
ESC[36m➙ESC[39m ESC[90mevent:allESC[39m ss-store
7 Aug 20:54:58 - ESC[1;31m[nodemon] app crashed - waiting for file changes before starting…ESC[0m
@

Sorry for all the ESCs. I seem to have some incorrect settings in my terminal program.

I suspect errors in one of the files I wrote. So, here they are:

nodeMap-local.coffee:

exports.rf12nodes =
  212:
    1: 'NGarage'
    2: 'NHeizung'

exports.rf12devices =
  'ttyUSB0':
    recvid: 26
    group: 212
    band: 868

NGarage.coffee:

module.exports =

  announcer: 1

  descriptions:
    nt:
      title: 'AussenNord'
      unit: '°C'
      scale 0
      min: -50
      max: 70
    it:
      title: 'Garage'
      unit: '°C'
      scale 0
      min: -50
      max: 70
    st:
      title: 'AussenSued'
      unit: '°C'
      scale 0
      min: -50
      max: 70

  feed: 'rf12.packet'

  decode: (raw, cb) ->
    cb
      nt: raw[1]
      #nt: if raw[1] < 100 then raw[1] else raw[1] - 256
      it: raw[2]
      #it: if raw[2] < 100 then raw[2] else raw[2] - 256
      st: raw[3]
      #st: if raw[3] < 100 then raw[3] else raw[3] - 256

NHeizung.coffee:

module.exports =

  announcer: 2

  descriptions:
    vlsys:
      title: 'VL_Sys'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    rlsys:
      title: 'RL_Sys'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    vlfb:
      title: 'VL_FB'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    rlfb:
      title: 'RL_FB'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    vlk:
      title: 'VL_K'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    wwzul:
      title: 'WW_Zul'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    kessel:
      title: 'Kessel'
      unit: '°C'
      scale 0
      min: 0
      max: 100
    hell:
      title: 'Helligkeit'
      unit: '%'
      scale 0
      min: 0
      max: 100
      factor: 100 / 255

  feed: 'rf12.packet'

  decode: (raw, cb) ->
    cb
      vlfb: raw[1]
      rlfb: raw[2] 
      vlk: raw[3]
      vlsys: raw[4]
      rlsys: raw[5]
      kessel: raw[6]
      wwzul: raw[7]
      hell : raw[8]

      # Reihenfolge der Daten: vlfb, rlfb, vlk, vlsys, rlsys, kessel, wwzul, hell

I have no idea what could be wrong. My receiving node is a jeelink connected to ttyUSB0 (id 26, group 212, @868MHz). Could anybody help me, please?

BTW: In NGarage.coffee have commented out three lines. Would they be a correct replacement for the present lines (with a different result, of course)?

Regards,

Physikus.

edit: inserted pre-tags instead of ats.


Replies (3)

RE: Problem installing drivers - Added by padvinder95 over 6 years ago

Firstly: you can use

tags for multi-line code formatting, which makes it a bit more readable. You could even add

tags within those pre tags to get syntax highlighting for C++ (language: cpp) or coffee-script (language: ruby). Like so (there is a closing pre-tag missing at the end here, I cannot get it to show up):

exports.rf12nodes =
  212:
    1: 'NGarage'
    2: 'NHeizung'

exports.rf12devices =
  'ttyUSB0':
    recvid: 26
    group: 212
    band: 868

This will give the following result:

exports.rf12nodes =
  212:
    1: 'NGarage'
    2: 'NHeizung'

exports.rf12devices =
  'ttyUSB0':
    recvid: 26
    group: 212
    band: 868

Now, as to the problem: It seems you have a missing colon (:) after scale in the drivers. I cannot properly see the indentation because of the formatting, but other than that I don’t see big errors. Then again, I only just started with Housemon…
What you could try if adding those colons doesn’t work is: remove all briqs, install the Reset briq (warning: you will lose all history etc.), maybe flush (drop,empty,destroy) the redis db for good measure (redis-cli FLUSHALL) and then restart housemon, install all briqs and see if it crashes again.

Then on the commented lines: if you only include those three commented lines and remove the other three, it will work.

RE: Problem installing drivers - Added by physikus over 6 years ago

Ah, thanks a lot. I already suspected such a stupid typo. However, looking again and again at the code I didn’t see it. Now it works.

About the formatting of my post: I used the “C” Button above the text field. But somehow this did not produce what I thought it would. Next time I’ll use the pre tags or the code tags.

Physikus.

RE: solved: Problem installing drivers - Added by padvinder95 over 6 years ago

Yeah that C button only works for inline code, like so: @void inlineCode(byte* ptr);, resulting in:void inlineCode(byte* ptr);@

    (1-3/3)