Ticket #981 (new)

Opened 8 years ago

Last modified 3 years ago

Nodewatcher owserver / owget module

Reported by: Musti Owned by: kostko
Priority: major Milestone: Next milestone
Component: nodewatcher/modules Version:
Keywords: Cc:
Related nodes: Realization state:
Blocking: Effort: normal
Blocked by: Security sensitive: no

Description (last modified by Musti) (diff)

Create a nodewatcher module, that implements the following capabilities:

  • detects all 1-wire devices on the bus
    #Example: This will output all connected sensor IDs
    owget -s localhost:5500 | grep "[[:digit:]]\{2\}"
    
  • outputs the device ID and value gathered in nodewatcher format, depending on the first two numbers in device ID
    • for temperature sensors (this can be hardcoded for now: first two id numbers IDs; 10. 22. 28.):
      #This will output a single sensor temperature
      owdir -s localhost:5050 /10.8A7211020800/temperature
      
    • for voltage sensors (this can be hardcoded for now: first two id numbers IDs; 20):
      #This will output a quad A/D converter
      owdir -s localhost:5050 /20.8A7211020800/volt.ALL
      

This output should allow a each measurement to be scaled for a fixed factor, that depends on the hardware setup.

  • for humidity sensors (this can be hardcoded for now: first two id numbers IDs; 26):
    #This will output a single sensor humidity
    owdir -s localhost:5050 /26.8A7211020800/humidity}}}
    
    This is the support required now for proper monitoring of backbone nodes. The fully customizable module for use with generator and repository package is not essential at the moment, because it will only be applied to a small number of nodes and can be done manually.
    

Change History

comment:1 Changed 8 years ago by Musti

  • Description modified (diff)

comment:2 Changed 8 years ago by Musti

Drop in hack solution for digitemp, but the sensor ID has to be manually disocovered:

#
# nodewatcher module
# OWGET ONE-WIRE TEMPERATURE SENSORS
#

# Module metadata
MODULE_ID="sensors.onewire.digitemp"
MODULE_SERIAL=1

# Configuration
SERIAL="22.7FB31A000000"

#
# Report output function
#

report()
{
temp=""environment.sensor0.temp:" $(owget -s localhost:10300 /$SERIAL/temperature | grep "[[:digit:]]") " 
serial="environment.sensor0.serial: $SERIAL"

echo $temp
echo $serial
}

Running a server:

owserver -d /dev/ttyS0 -p localhost:10300

comment:3 Changed 8 years ago by Musti

I suggest a module to be written that reads all the parameters of all the sensors and publishes them as appropriate for nodewatcher. Using owshell module owget, this would loook something like this:

root@pohorje-s55umx:~# owget -s localhost:10300 
/20.DD050C000000
/22.7FB31A000000
/bus.0
/uncached
/settings
/system
/statistics
/structure
/simultaneous
/alarm

Here there are two folders that represent sensors, both starting with two digits. Inside these folders, there are values that have to be published, for example:

root@pohorje-s55umx:~# owget -s localhost:10300 20.DD050C000000
/20.DD050C000000/CO2
/20.DD050C000000/PIO.ALL
/20.DD050C000000/PIO.A
/20.DD050C000000/PIO.B
/20.DD050C000000/PIO.C
/20.DD050C000000/PIO.D
/20.DD050C000000/address
/20.DD050C000000/alarm
/20.DD050C000000/alias
/20.DD050C000000/crc8
/20.DD050C000000/family
/20.DD050C000000/id
/20.DD050C000000/locator
/20.DD050C000000/memory
/20.DD050C000000/pages
/20.DD050C000000/power
/20.DD050C000000/r_address
/20.DD050C000000/r_id
/20.DD050C000000/r_locator
/20.DD050C000000/set_alarm
/20.DD050C000000/type
/20.DD050C000000/volt.ALL
/20.DD050C000000/volt.A
/20.DD050C000000/volt.B
/20.DD050C000000/volt.C
/20.DD050C000000/volt.D
/20.DD050C000000/volt2.ALL
/20.DD050C000000/volt2.A
/20.DD050C000000/volt2.B
/20.DD050C000000/volt2.C
/20.DD050C000000/volt2.D

The script should merge all these values to a for appropriate for nodewatcher for all attached sensors.

Last edited 8 years ago by Musti (previous) (diff)

comment:4 Changed 3 years ago by mitar

  • Milestone changed from 3.0b to Next milestone
Note: See TracTickets for help on using tickets.