Skip to content

Instantly share code, notes, and snippets.

@marcelrv
marcelrv / Serial driver
Last active February 26, 2016 10:31
Aeon Labs Gen5 z-stick installation
Aeon Labs Gen5 z-stick installation
https://github.com/frep/radxa/blob/master/files/cdc-acm.ko
# install the driver (if it is not already present in your build)
mkdir -p /lib/modules/3.0.36+/kernel/drivers/usb/class
cp ${pathToFile}/cdc-acm.ko /lib/modules/3.0.36+/kernel/drivers/usb/class/
//Подключение библиотек
#include <UTFT.h>
#include <DS1307.h>
//Подключения шрифта
extern uint8_t BigFont[];
//Подключение дисплея TFT01-22SP
UTFT myGLCD(TFT01_22SP,9,8,50,51,53);
Working commands 55PUS7181
http://192.168.3.51:1925/system
{"menulanguage":"Dutch","name":"55PUS7181\/12","country":"Netherlands","serialnumber_encrypted":"F6905Z+vyquNhZoXegQ1DzZXCqMIcjJpkzy3LsiPac=\n","softwareversion_encrypted":"1YWR42sjQ6xdjuyIXWZbyPnoRswLoRswLmKtAhR9GRsBx1qY=\n","model_encrypted":"jGNvXDerdJoWjOpwh\/n0gw2MgM7oRswLoRswLKC73wfMgra3S62c4=\n","deviceid_encrypted":"7mv3ZEtMH8oRswL0RoRswLISTn38FN8HAqfmSF95qoaiRsuukSraQ=\n","nettvversion":"6.0.2","epgsource":"one","api_version":{"Major":6,"Minor":2,"Patch":0},"featuring":{"jsonfeatures":{"editfavorites":["TVChannels","SatChannels"],"recordings":["List","Schedule","Manage"],"ambilight":["LoungeLight","Hue","Ambilight"],"menuitems":["Setup_Menu"],"textentry":["context_based","initial_string_available","editor_info_available"],"applications":["TV_Apps","TV_Games","TV_Settings"],"pointer":["not_available"],"inputkey":["key"],"activities":["intent"],"channels":["preset_string"],"mappings":["server_mapping"]},"systemfeatures":{"tvtype":"consumer","
Various ways to get windcentrale data:
https://zep-api.windcentrale.nl/production/131/live?ignoreLoadingBar=true
{"powerProducerId":"563fbecd-d6f8-4d5e-9c3a-5e8577c7e256","windSpeed":2.0,"windDirection":"NW","powerAbsTot":16.0,"powerAbsWd":3.0,"powerRel":2.0,"diameter":13.0,"rpm":16.1,"pulsating":false,"kwh":76111.0,"kwhForecast":2767000.0,"hoursRunThisYear":173.0,"runPercentage":98.06002568751889,"windSpeedForecast":4.0,"windDirectionForecast":"Z","timestamp":"2017-01-08T11:01:39"}
http://backend.windcentrale.nl/windcentrale/productie_131.txt
http://backend.windcentrale.nl:50001/-gyb0=131
https://backend.windcentrale.nl/windcentrale/productie?id=131
example data:
All Nefit endpoints
/dhwCircuits/dhwA/dhwCurrentSwitchpoint
/dhwCircuits/dhwA/dhwNextSwitchpoint
/dhwCircuits/dhwA/dhwOffDuringAbsence
/dhwCircuits/dhwA/dhwOffDuringNight
/dhwCircuits/dhwA/dhwOperationManualMode
/dhwCircuits/dhwA/dhwOperationMode
/dhwCircuits/dhwA/dhwOperationType
/dhwCircuits/dhwA/dhwProgram0
@marcelrv
marcelrv / nginx.service
Created January 12, 2018 15:34 — forked from scottslowe/nginx.service
This very simple systemd unit file will launch a Docker container running the Nginx web server.
[Unit]
Description=Nginx web front-end
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=/usr/bin/docker pull nginx
ExecStart=/usr/bin/docker run --rm --name nginx -p 80:80 nginx
ExecStop=/usr/bin/docker stop nginx
@marcelrv
marcelrv / Bluez Install.txt
Created December 12, 2018 12:06
Installation Bluez 5.46 on Ubuntu 16.04
Based on https://askubuntu.com/questions/883713/using-bluez-5-43-on-ubuntu-16-04
sudo apt-get install debhelper dh-autoreconf flex bison libdbus-glib-1-dev libglib2.0-dev libcap-ng-dev libudev-dev libreadline-dev libical-dev check dh-systemd libebook1.2-dev devscripts
#unless you have already a gpg key
sudo apt-get install rng-tools
gpg --gen-key
@marcelrv
marcelrv / read.py
Last active July 15, 2019 18:48
Vaarkaarten
import urllib.request
import json
url = 'https://vaarweginformatie.nl/frp/api/webcontent/downloads?pageId=infra/enc'
req = urllib.request.Request(url)
##parsing response
r = urllib.request.urlopen(req).read()
cont = json.loads(r.decode('utf-8'))
counter = 0
print (cont)
@marcelrv
marcelrv / TSD build error.txt
Last active December 1, 2019 20:31
TSD build error
marcel@docker-server:~/TheSpaghettiDetective$ docker-compose --verbose up --build -d
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.utils.config.find_config_file: Trying paths: ['/home/marcel/.docker/config.json', '/home/marcel/.dockercfg']
docker.utils.config.find_config_file: Found file at path: /home/marcel/.docker/config.json
docker.auth.load_config: Couldn't find auth-related section ; attempting to interpret as auth-only file
docker.auth.parse_auth: Auth data for auths is absent. Client might be using a credentials store instead.
docker.auth.parse_auth: Auth data for HttpHeaders is absent. Client might be using a credentials store instead.
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.35/version HTTP/1.1" 200 535
compose.cli.command.get_client: docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
http://miot-spec.org/miot-spec-v2/instances?status=all
http://miot-spec.org/miot-spec-v2/instances?status=debug
http://miot-spec.org/miot-spec-v2/instances?status=released
and for example air purifier 3 cn (zhimi.airpurifier.ma4)
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-ma4:1
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:light:0000A001:philips-bulb:1
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:zhimi-sa1:1