• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. ncollins
    N
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 7
    • Groups 0

    ncollins

    @ncollins

    4
    Reputation
    311
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    ncollins Unfollow Follow

    Best posts made by ncollins

    • Batch push sensor data once network is available

      I'm running MyController on an orangePi on my local network at home. It's working great at home and I'd like to build a similar network in my old Jeep. I would run an orangePi with a separate mycontroller install in the Jeep. When the Jeep is within range of my home wireless network, it would push all of the data collected since the last successful push to the primary MyController (master) install.

      I haven't completely thought this through, but I'm thinking the sync would only need to go in one direction, but there might be some data or configs that I would like to push to the Jeep.

      In the Jeep, I'd probably want the full MyController install to display an LCD dashboard of all of my sensor data (inside temp, outside temp, car battery voltage, compass, accelerometer, gyros, gps, mpg, speedometer). Once the data is synced with the primary (house based) MyController install, I would make different views to display things like which cars are home, last trip info, battery info.

      I've considered using a 3G module to create a cellular gateway but I really don't need constant connection, I don't want to pay for sim cards and monthly service or reloads. Also, it's possible my vehicle goes out of service area, which means I still need a way to sync data collected while offline. Even in that case, I would rather find a way to push that data through my cellphone.

      Final thought: While my primary use case is collecting vehicle data, I'm also thinking this might work for wearables. It would be amazing to create a tiny wearable network to collect biometric data and/or environment data, then push that when the network is available. (or a pet tracker).

      I'd really appreciate your thoughts and feedback. Thank you.

      posted in Developers Zone
      N
      ncollins
    • RE: Triggering rule through the HTTP request

      @Daniele This is an example for a node.js script that I use to pull back sensor data.

      const https = require('https');
      
      https.get({
      	host: 'localhost' // host of your mycontroller install
      	,port: 443 // this is 443 since it's SSL
      	,path: '/mc/rest/sensors/264' // example getting sensor info for sensor 264
      	,headers: {
      		'Authorization': 'Basic ' + new Buffer('USERNAME:PASSWORD').toString('base64')
      	}
      
      }, (resp) => {
        let data = '';
        //console.log(resp);
        // A chunk of data has been recieved.
        resp.on('data', (chunk) => {
          data += chunk;
        });
      
        // The whole response has been received. Print out the result.
        resp.on('end', () => {
          console.log(JSON.parse(data).variables[0]);
        });
      
      }).on("error", (err) => {
        console.log("Error: " + err.message);
      }); 
      

      Important thing to note is the Basic Auth header. This is how you send username and password.

      The first google result I found for sending basic auth params in a python script
      https://stackoverflow.com/questions/6999565/python-https-get-with-basic-authentication

      import requests
      
      r = requests.get('https://my.website.com/rest/path', auth=('myusername', 'mybasicpass'))
      print(r.text)
      
      posted in General Discussion
      N
      ncollins
    • RE: Request: Make all graph x-axis a consistent range [current time - (hour,day,week...), current time]

      GitHub: nikolac

      Thanks for responding!

      posted in Developers Zone
      N
      ncollins

    Latest posts made by ncollins

    • RE: Triggering rule through the HTTP request

      @Daniele This is an example for a node.js script that I use to pull back sensor data.

      const https = require('https');
      
      https.get({
      	host: 'localhost' // host of your mycontroller install
      	,port: 443 // this is 443 since it's SSL
      	,path: '/mc/rest/sensors/264' // example getting sensor info for sensor 264
      	,headers: {
      		'Authorization': 'Basic ' + new Buffer('USERNAME:PASSWORD').toString('base64')
      	}
      
      }, (resp) => {
        let data = '';
        //console.log(resp);
        // A chunk of data has been recieved.
        resp.on('data', (chunk) => {
          data += chunk;
        });
      
        // The whole response has been received. Print out the result.
        resp.on('end', () => {
          console.log(JSON.parse(data).variables[0]);
        });
      
      }).on("error", (err) => {
        console.log("Error: " + err.message);
      }); 
      

      Important thing to note is the Basic Auth header. This is how you send username and password.

      The first google result I found for sending basic auth params in a python script
      https://stackoverflow.com/questions/6999565/python-https-get-with-basic-authentication

      import requests
      
      r = requests.get('https://my.website.com/rest/path', auth=('myusername', 'mybasicpass'))
      print(r.text)
      
      posted in General Discussion
      N
      ncollins
    • RE: Request: Make all graph x-axis a consistent range [current time - (hour,day,week...), current time]

      GitHub: nikolac

      Thanks for responding!

      posted in Developers Zone
      N
      ncollins
    • Request: Within a graph, sensor variables should have consistent color

      Problem
      I have a graph that displays events for ~12 motion/door sensors within the last 12 hours. Events for Sensor-5 might be blue, or orange, or red...depending on how many other sensors were tripped in that same time frame.

      Example: I look at the graph at 10:00, and I see two events from two different sensors: motion at 5:00 from Sensor-1 (blue), motion at 6:30 from Sensor-5 (orange).

      The next day, I look at the graph at 10:00, and I see three events from three different sensor: 5:30 Sensor-1 (blue), 6:25 Sensor-3 (orange), 6:30 Sensor-5 (green).

      Yesterday, sensor-5 was orange, today sensor-5 is green. I always have to check the legend to figure out which sensors are in the graph.

      Request
      For each graph configured on a dashboard, there should be a fixed relationship between sensor variable <-> color.

      A tripped graph displays 5 sensor variables [Sensor1, Sensor2, Sensor3, Sensor4, Sensor5] over the last 12 hours.

      Yesterday at 10:00, there were 3 events in the last 12 hours: Sensor2 (orange), Sensor3 (green), Sensor4 (red).

      Today at 10:00, there were 2 events in the last 12 hours: Sensor2 (orange), Sensor4 (red).

      Whenever I look at the chart, I know orange is Sensor2, red is Sensor4.

      posted in Developers Zone
      N
      ncollins
    • Request: Make all graph x-axis a consistent range [current time - (hour,day,week...), current time]

      Problem

      I have a chart that shows triggers (motion sensors, doors) in the "last 12 hours" . Every time I look at the chart, I have to look at the first and last point on the chart to determine how big of a window I'm looking at.

      Right now, it appears the x-axis range on the the default graphs is [time of earliest datapoint in last (hour, day, week...), time of most recent data point in last (hour, day...)].

      For example, I look at the chart at 10:00. There are two events on the graph: a motion event at 5:00 and a motion event at 5:10. The width of the graph represents 10 minutes.

      The next day, I look at the chart at 10:00. There are two events on the graph: a motion event at 1:00, and a motion event at 9:30. In this instance, the width of the graph represents 8.5 hours.

      Request

      I believe a range [current time - (hour, day...year), current time], independent of the data within the range, would provide a more consistent experience. Also a more representative visualization.

      posted in Developers Zone
      N
      ncollins
    • RE: V_HVAC_FLOW_STATE issue

      Have you tried setting the payload value to 0 instead of "Off"?

      posted in Developers Zone
      N
      ncollins
    • RE: Batch push sensor data once network is available

      @tag I briefly considered caching data at the node level, but memory limits of the arduino modules and/or the added cost & complexity of having SD Card/FLASH modules at every node seems like a big hurdle.

      But...caching at the gateway or repeater might work out a little better.

      posted in Developers Zone
      N
      ncollins
    • Batch push sensor data once network is available

      I'm running MyController on an orangePi on my local network at home. It's working great at home and I'd like to build a similar network in my old Jeep. I would run an orangePi with a separate mycontroller install in the Jeep. When the Jeep is within range of my home wireless network, it would push all of the data collected since the last successful push to the primary MyController (master) install.

      I haven't completely thought this through, but I'm thinking the sync would only need to go in one direction, but there might be some data or configs that I would like to push to the Jeep.

      In the Jeep, I'd probably want the full MyController install to display an LCD dashboard of all of my sensor data (inside temp, outside temp, car battery voltage, compass, accelerometer, gyros, gps, mpg, speedometer). Once the data is synced with the primary (house based) MyController install, I would make different views to display things like which cars are home, last trip info, battery info.

      I've considered using a 3G module to create a cellular gateway but I really don't need constant connection, I don't want to pay for sim cards and monthly service or reloads. Also, it's possible my vehicle goes out of service area, which means I still need a way to sync data collected while offline. Even in that case, I would rather find a way to push that data through my cellphone.

      Final thought: While my primary use case is collecting vehicle data, I'm also thinking this might work for wearables. It would be amazing to create a tiny wearable network to collect biometric data and/or environment data, then push that when the network is available. (or a pet tracker).

      I'd really appreciate your thoughts and feedback. Thank you.

      posted in Developers Zone
      N
      ncollins