Skip to content

Instantly share code, notes, and snippets.

View CoMPaTech's full-sized avatar
😎
Coding along

Tom CoMPaTech

😎
Coding along
  • CoMPa Technology
  • The Netherlands
  • 21:22 (UTC -12:00)
View GitHub Profile
@CoMPaTech
CoMPaTech / Kanboard.duplicate.debug.log
Created March 16, 2016 09:22
Kanboard duplicate with all boxes checked
[2016-03-16 10:19:58] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2016-03-16 10:19:58] [error] ActionParameter::duplicateParameters => unable to resolve category_id=
[2016-03-16 10:19:58] [error] Action::duplicate => skip action \Kanboard\Action\TaskAssignColorCategory 8
[2016-03-16 10:19:58] [debug] SELECT projects.id, projects.name FROM `projects` LEFT JOIN `project_has_users` ON `project_has_users`.`project_id`=`projects`.`id` WHERE (project_has_users.user_id = ? OR projects.is_everybody_allowed = ?) AND projects.is_active IN (?)
[2016-03-16 10:19:58] [debug] QUERY_DURATION=0.00024509429931641 ALL_QUERIES_DURATION=0.00024509429931641
[2016-03-16 10:19:58] [debug] SELECT projects.id, projects.name FROM `projects` LEFT JOIN `project_has_groups` ON `project_has_groups`.`project_id`=`projects`.`id` LEFT JOIN `group_has_users` ON `group_has_users`.`group_id`=`project_has_groups`.`group_id` WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2016-03-16 10:19:58]

Keybase proof

I hereby claim:

  • I am compatech on github.
  • I am tom_scholten (https://keybase.io/tom_scholten) on keybase.
  • I have a public key ASAglQwpAPP-dM9MMA0IrcM3k1fwu3RwPUu0sMkHjlujzQo

To claim this, I am signing this object:

@CoMPaTech
CoMPaTech / gist:f42a306dda106809f20d1cc6f8c16584
Created March 20, 2018 21:18 — forked from simonw/gist:104413
Turn a BeautifulSoup form in to a dict of fields and default values - useful for screen scraping forms and then resubmitting them
def extract_form_fields(self, soup):
"Turn a BeautifulSoup form in to a dict of fields and default values"
fields = {}
for input in soup.findAll('input'):
# ignore submit/image with no name attribute
if input['type'] in ('submit', 'image') and not input.has_key('name'):
continue
# single element nome/value fields
if input['type'] in ('text', 'hidden', 'password', 'submit', 'image'):
@CoMPaTech
CoMPaTech / sonoff-demo.yaml
Created March 12, 2019 19:53
ESPHome.io Sonoff POW R2
esphome:
name: sonoffv
platform: ESP8266
board: esp01_1m
wifi:
ssid: 'mywifi'
password: 'mysecret'
manual_ip:
static_ip: 192.168.1.20
@CoMPaTech
CoMPaTech / grafana_projected-max-range_panel.json
Created April 3, 2019 08:57
Additional panel for battery health (lephisto/tesla-apiscraper) : Note the ###FIXTHIS### entries
{
"aliasColors": {
"Ideal range vs Battery level": "#e24d42",
"charge_state.mean_mean": "#e24d42"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "###FIXTHIS###",
"fill": 1,
@CoMPaTech
CoMPaTech / Charging2.json
Created April 14, 2019 08:33
teslascraper charging dashboard
{
"__inputs": [
{
"name": "DS_TESLASCRAPER",
"label": "TeslaScraper",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
},
<?xml version="1.0" encoding="UTF-8"?>
<domain_objects>
<module id='2174b15978334867a3d634a16d14ada8'>
<vendor_name>Plugwise</vendor_name>
<vendor_model>ThermoTouch</vendor_model>
<hardware_version>6539-1301-5002</hardware_version>
<firmware_version>2018-02-08T11:15:53+01:00</firmware_version>
<upgrade/>
<created_date>2019-04-23T20:32:36.476+02:00</created_date>
<modified_date>2019-04-23T21:51:27.014+02:00</modified_date>
<?xml version="1.0" encoding="UTF-8"?>
<domain_objects>
<module id='2174b15978334867a3d634a16d14ada8'>
<vendor_name>Plugwise</vendor_name>
<vendor_model>ThermoTouch</vendor_model>
<hardware_version>6539-1301-5002</hardware_version>
<firmware_version>2018-02-08T11:15:53+01:00</firmware_version>
<upgrade/>
<created_date>2019-04-23T20:32:36.476+02:00</created_date>
@CoMPaTech
CoMPaTech / thermo_finding.py
Last active March 31, 2020 19:39
thermo finding
# used match_locations to determin type of location (i.e. must be thermostat)
# then ran along finding master/slaves
# in general ... this should be ran after 'connect'
# so match_locations finds the 'thermostat' locations
# this finds masters and slaves
# and returns something into self._slaves
# self._slaves is a list (or set([])) of things that are slave
@CoMPaTech
CoMPaTech / control.sh
Created April 9, 2020 14:04
rfxcom control
#!/bin/sh
rfxcmd="/root/rfx-program/rfxcmd/rfxcmd.py"
#serial=`find /dev/serial/by-id -type l`
serial="/dev/ttyUSB0"
# Beamer (Kingpin)
#09130011E1428041000
# xxxx - 1040 timing/pulse in hex
# xx - Command (24/stop 22/up 28/down)