Skip to content

Instantly share code, notes, and snippets.

View hj91's full-sized avatar
:octocat:

Harshad Joshi hj91

:octocat:
View GitHub Profile
@hj91
hj91 / FanucMTConnectTopics.txt
Created September 20, 2023 07:25
Topics data that are logged in Influxdb.
MTConnectFanuc/Device/d9006c59-58cc-57ff-b9a1-21ecb7559681
MTConnectFanuc/Device/f_sim
MTConnectFanuc/Observation/
MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/Availability
MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/DeviceAdded
MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/DeviceChanged
MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/DeviceRemoved
MTConnectFanuc/Observation/f_sim/Axes/Linear[X]/Condition/Actuator
MTConnectFanuc/Observation/f_sim/Axes/Linear[X]/Condition/Position
MTConnectFanuc/Observation/f_sim/Axes/Linear[X]/Condition/Temperature
@hj91
hj91 / MTConnect.array
Created September 18, 2023 16:08
Getting Topic and Payload as an array
["MTConnectFanuc/Device/d9006c59-58cc-57ff-b9a1-21ecb7559681",null]
["MTConnectFanuc/Device/f_sim",null]
["MTConnectFanuc/Observation/",3.2]
["MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/DeviceChanged","UNAVAILABLE"]
["MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/DeviceRemoved","UNAVAILABLE"]
["MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/DeviceAdded","f_sim"]
["MTConnectFanuc/Observation/d9006c59-58cc-57ff-b9a1-21ecb7559681/Events/Availability","AVAILABLE"]
["MTConnectFanuc/Observation/f_sim/Controller/Path/Events/x:ProgramSize.Main","500"]
["MTConnectFanuc/Observation/f_sim/Controller/Path/Events/PartCount.All","1079"]
["MTConnectFanuc/Observation/f_sim/Controller/Path/Events/Block","4"]
@hj91
hj91 / parse.txt
Created September 15, 2023 12:25
Parser for data obtained from http://mtconnect.mazakcorp.com:5609/current
harshad@harshad-HP-Laptop-15q-ds0xxx:~$ node mt-parser-current.js
ComponentStream: base, Component: Axes
Condition:
Unavailable: N/A (timestamp: 2023-08-06T20:17:07.303223Z)
Unavailable: N/A (timestamp: 2023-08-06T20:17:07.303223Z)
ComponentStream: A, Component: Rotary
Samples:
AngularVelocity: UNAVAILABLE (timestamp: 2023-08-06T20:17:07.303223Z)
Load: UNAVAILABLE (timestamp: 2023-08-06T20:17:07.303223Z)
Angle: UNAVAILABLE (timestamp: 2023-08-06T20:17:07.303223Z)
@hj91
hj91 / config.toml
Created December 14, 2022 10:20
configuration file for opcua logger
# The OPCUA connection parameters. If you want to use anonymous auth,
# remove the username and password lines.
[opcua]
url = "opc.tcp://192.168.1.9:49320/KEPServerEX"
user = ""
pass = ""
# The InfluxDB connection parameters. Use a connection url containing all
# details, ie. http(s)://user:password@host:port/database
[influx]
@hj91
hj91 / opcua_server_to_gnusocial.py
Created April 7, 2022 16:31
Post opcua server variable data on GNUSocial
#opcua to GNUSocial Post
#(c) Bufferstack.IO Analytics Technology, 2021
from opcua import Server
from random import randint
from gnusocial import statuses
import time
server = Server()
@hj91
hj91 / esp32-opcua-server-log
Created December 10, 2020 11:54
This is esp32 server log
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
[
{
"id": "5e47003a.bd96b",
"type": "tab",
"label": "Flow 2"
},
{
"id": "265fd756.cc0488",
"type": "tab",
"label": "Flow 1"
/*
LinConnect: Mirror Android notifications on Linux Desktop
Copyright (C) 2013 Will Hauck
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@hj91
hj91 / wififail.txt
Created July 9, 2014 14:50
This is the output of my dmesg after i logged in. I disabled wifi and was unable to boot in. After much efforts i managed to enable wifi and this is what i got. Ubuntu is made by bastards. fucking bastards. idiots releasing untested and unstable drivers.
[ 265.138732] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138755] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138778] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138801] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138824] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138846] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138868] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138891] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138913] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138935] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
@hj91
hj91 / cellinfo2
Created July 25, 2013 13:44
Code for printing Cell Tower information for non GPS phones.
/* @author=harshad joshi */
package com.harshad.cellinfo2;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;