<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Jochen Scheib]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://www.jochen-scheib.de/</link><image><url>https://www.jochen-scheib.de/favicon.png</url><title>Jochen Scheib</title><link>https://www.jochen-scheib.de/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Tue, 10 Mar 2026 22:30:55 GMT</lastBuildDate><atom:link href="https://www.jochen-scheib.de/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[MQTT as central information model for home automation]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h1 id="mqttasinformationmodel">MQTT as information model</h1>
<p>Mqtt is my central communication platform at my smart home, every digital bit and byte should be reflected in the mqtt topic tree and all devices should communicate over mqtt. Data sources which don&apos;t support mqtt will be tranformed and forwarded to mqtt by</p>]]></description><link>https://www.jochen-scheib.de/another-mqtt-world-model/</link><guid isPermaLink="false">602c38d86b3671000130c79e</guid><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Sat, 06 Jan 2018 16:35:45 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h1 id="mqttasinformationmodel">MQTT as information model</h1>
<p>Mqtt is my central communication platform at my smart home, every digital bit and byte should be reflected in the mqtt topic tree and all devices should communicate over mqtt. Data sources which don&apos;t support mqtt will be tranformed and forwarded to mqtt by Node-RED. This also applies to mqtt topics that can not be configured to fit the model described below.</p>
<h1 id="mqttschemas">MQTT schemas</h1>
<p>The mqtt topic tree is the semantic description of the values. Generally it contains a description of the source of a specific mqtt message. There are two approaches commonly used:</p>
<ul>
<li>location-based: <code>Home/Bathroom/light/isOn</code>:<code>true</code></li>
<li>device-based: <code>zigbee/00212effff0058a2/isOn</code>:<code>true</code></li>
</ul>
<p>Both topics describe the same data source, the location-based approach is perfectly readable by human, but you need a mapping to actually address the device at the backend. The device-based approach contains the address of the light bulb and can be directly addressed without additional mapping.</p>
<p>A very good approach is described by Martin <a href="https://harizanov.com/2014/09/mqtt-topic-tree-structure-improvements/">@harizanov.com</a>. He is grouping the values into three groups: places, cloud and people. The places tree is mostly a location-based approach mixed with devices and the actual values as leaves.<br>
This schema is perfectly readable by human but not by a machine. You will have to hard code the topic or you have to create complex regular expressions to get the context of the data integrated into the MQTT tree.</p>
<p>The people and cloud branch are even harder.</p>
<h1 id="thenewschema">The new schema</h1>
<p>There are many blog post regarding how to structure your mqtt topics, but I was not able to find one of them, which is really machine readable without domain or application specific knowledge and also perfectly readable by human. Together with some colleges we tried to define a mqtt tree structure which addresses this topic. We defined a convention to address the issue and to easily transform the topic into a tag oriented model.<br>
To automatically parse the topic and assign a description to the data in the mqtt topic, we decided to add the type to the topic structure surrounded by brackets.</p>
<ul>
<li><code>[places]/springfield/[rooms]/kitchen/[sockets]/coffeeMachine/isOn</code></li>
<li><code>[places]/springfield/[rooms]/bedroom/temperature</code></li>
</ul>
<p>What is the benefit of it?</p>
<p>You can easily transform this schema into a semantic description of a leaf by transforming it into a json obect, e.g.:</p>
<pre><code class="language-json">{
  isOn: true,
  place: home,
  room: kitchen,
  socket: coffeeMachine
}
</code></pre>
<p>This makes it much more easy to process the value in your application and works well with e.g. Time Series Databases like influxdb.</p>
<p>Another benefit of this structure is, you can easily utilise the + character to subscribe to special classes, e.g.<br>
<code>[places]/+/[rooms]/+/temperature</code><br>
This will help you to get all inside room temperatures. You will not get temperatures from outside or something else, without creating complex pattern.</p>
<p>Still it has some drawbacks, e.g. if you have different hierarchical levels: Think of one place has floors, the other does not. This is still not resolved.</p>
<p>In the picture below you can find a screenshot of my current mqtt tree.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Climate Control]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><img src="https://plantuml.jochen-scheib.de/svg/bL91Ri8m4Bpx5Ij-G0weYZ3NddhY1Kwy48l4cwvjGehuUvq4J82sKc-EPcPdihFkO6ohM3NGaAMoOceGF0SKBY4bDIrPj7xh-neXD7KsGojbTSV6UxImKxL38SgQWeQZGpuYdmNS9qGNznaYcM2zRZwzXuBfWBpPW79tC8D1TH4N8InfX8z-YzOHktVbiLDz5ADhtxBLwYfq-svvJlHTZFDLq2dIc88Vnv__DIoRqSau7nWdKIIxyV4miWnr11JhO2pTa0cY0cip9b6kBP2vXzQC582HeAcC2uY4agnNniOt1-jDWrVMV7sBjAB5om8dxkL9CNWmwWTKAwyAvH2CtTNXf8jVj5KyXZqgdi5Z9s9Mr5fgwgoS5Pl3a4lSZANS_05EufGZXyhxLiokHCgfa9lo5LecQEGDVa-TvM2oKgIha6psbPTfDJ-OJh7I_ryDqdTq7YhF8RZY6m00" alt loading="lazy"></p>
<!--kg-card-end: markdown-->]]></description><link>https://www.jochen-scheib.de/climate-control/</link><guid isPermaLink="false">602c38d86b3671000130c7a1</guid><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Thu, 23 Nov 2017 18:54:10 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><img src="https://plantuml.jochen-scheib.de/svg/bL91Ri8m4Bpx5Ij-G0weYZ3NddhY1Kwy48l4cwvjGehuUvq4J82sKc-EPcPdihFkO6ohM3NGaAMoOceGF0SKBY4bDIrPj7xh-neXD7KsGojbTSV6UxImKxL38SgQWeQZGpuYdmNS9qGNznaYcM2zRZwzXuBfWBpPW79tC8D1TH4N8InfX8z-YzOHktVbiLDz5ADhtxBLwYfq-svvJlHTZFDLq2dIc88Vnv__DIoRqSau7nWdKIIxyV4miWnr11JhO2pTa0cY0cip9b6kBP2vXzQC582HeAcC2uY4agnNniOt1-jDWrVMV7sBjAB5om8dxkL9CNWmwWTKAwyAvH2CtTNXf8jVj5KyXZqgdi5Z9s9Mr5fgwgoS5Pl3a4lSZANS_05EufGZXyhxLiokHCgfa9lo5LecQEGDVa-TvM2oKgIha6psbPTfDJ-OJh7I_ryDqdTq7YhF8RZY6m00" alt loading="lazy"></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[InfluxDB to store your sensor data]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>To store sensor data from my mqtt message broker I use influxdb. Influxdb is a time series database to make historical analysis, predictive analysis and anomaly detection. The nice thing about it, its open source (MIT) and easy to install, though not so easy to configure or manage.</p>
<p>In this</p>]]></description><link>https://www.jochen-scheib.de/influxdb-to-store-your-sensor-data/</link><guid isPermaLink="false">602c38d86b3671000130c79f</guid><category><![CDATA[node.js]]></category><category><![CDATA[node-red]]></category><category><![CDATA[influxdb]]></category><category><![CDATA[smart home]]></category><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Sun, 13 Nov 2016 15:17:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>To store sensor data from my mqtt message broker I use influxdb. Influxdb is a time series database to make historical analysis, predictive analysis and anomaly detection. The nice thing about it, its open source (MIT) and easy to install, though not so easy to configure or manage.</p>
<p>In this post I will describe how I use influxdb to archive my data, I will describe how the data goes into influxdb and how I use the retention policies and continuous queries to reduce the amount of data points over time.</p>
<h6 id="influxdbabriefsummary">Influxdb - A brief summary</h6>
<p>Influxdb uses a totally different approach as relational database (e.g. mysql), it is a so called NoSQL (Not only SQL) database.<br>
In influxdb everything revolves around <em>time</em>. <em>Time</em> is the central concept in influxdb hence all data in the database are associated with a corresponding <em>timestamp</em>.<br>
Further the <strong>data points</strong> have at least one <em>field set</em>. <strong>Field sets</strong> are used to store data in key-value pairs, with the <em>field key</em> as a string describing the <em>value</em>. Each data point can have multiple of such <em>field sets</em>.<br>
Beside that all <em>data points</em> can optionally have multiple <strong>tags</strong> as another key-value pair. They are used to store further meta data to semantically describe the data point. and can help you to create easy queries.<br>
All the data points are aggregated in a <strong>measurement</strong> which acts as container for data points and are conceptional similar to tables. They are identified by a name.</p>
<p>Here is a short example from my influxdb database, at the moment I only use one field for each measurement, but this may change in the future:</p>
<pre><code>&gt; select * from temperature LIMIT 10
name: temperature
-----------------
time				heatings	places		rooms		value
2016-11-12T17:15:29.233Z			Moensheim			1.7
2016-11-12T17:15:30.945Z			Moensheim	Schlafzimmer	17.1
2016-11-12T17:15:30.951Z	Essbereich	Moensheim	Wohnzimmer	22
2016-11-12T17:15:30.97Z		Heizung		Moensheim	Schlafzimmer	17.1
2016-11-12T17:15:31.086Z			Moensheim	Wohnzimmer	22
2016-11-12T17:16:29.886Z	Heizung		Moensheim	Bad		15.5
2016-11-12T17:16:29.892Z			Moensheim	Bad		15.5
2016-11-12T17:16:33.482Z			Moensheim			0.7
2016-11-12T17:17:36.856Z	Heizung		Moensheim	Schlafzimmer	17.1
2016-11-12T17:17:36.859Z			Moensheim	Schlafzimmer	17.1
</code></pre>
<p>Each measurement belongs to a specific <strong>retention policy</strong>. The policy defines how long data points are stored and when they should be discarded to free up space. They also define how many copies of the data should be saved if you have a cluster.</p>
<p>Every data point with the same retention policy, measurement and tag set belongs to the same series.</p>
<h4 id="retentionpoliciesandcontinuousqueries">Retention policies and continuous queries</h4>
<p>Each database can have multiple retention policies, one of them has to be set as default where all new points are stored. I use three retention policies to store my measurements:</p>
<ul>
<li><strong>default:</strong> Retention: 1 week;</li>
<li><strong>a_year:</strong> Retention: 1 year; Data point interval: 1h;</li>
<li><strong>infinite:</strong> Retention: infinite; Data point interval: 1d;</li>
</ul>
<p>All new data points are saved in the default retention policy and are deleted after 1 week. To move points between retention policies you can use continuous queries or use the <code>INTO</code> clause in a normal query. Both require a <em>function</em>, an <em><code>INTO</code> clause</em> and a <em><code>GROUP BY time()</code> clause</em>.</p>
<p>Continuous queries are executed in the time interval defined in the <code>GROUP BY time()</code> clause. Here are the continuous queries I use to move data from the <em>default</em> retention policy to the <em>a_year</em> and the <em>infinite</em> retention policy:</p>
<pre><code>name: metrics
-------------
name	query
cq_1d	CREATE CONTINUOUS QUERY cq_1d ON metrics BEGIN SELECT mean(*) INTO metrics.infinite.:MEASUREMENT FROM metrics.&quot;default&quot;./.*/ GROUP BY time(1d), * END
cq_1h	CREATE CONTINUOUS QUERY cq_1h ON metrics BEGIN SELECT mean(*) INTO metrics.a_year.:MEASUREMENT FROM metrics.&quot;default&quot;./.*/ GROUP BY time(1h), * END
</code></pre>
<p>The goal of the continuous query is to reduce the amount of data stored. There for the <em>mean function</em> together with the <em><code>GROUP BY time()</code> clause</em> is used. This means for the provided example in the Listing above, that every hour the mean value over the last hour will be calculated for every series in the <em>default</em> retention policy. The calculated value will then be moved to the <em>a_year</em> retention policy and saved for one year. The second contininuous query will calculate the same but for the last day.<br>
The raw data in the <em>default</em> retention policy will be deleted after one weak, at this moment only the aggregated data will be available.</p>
<h4 id="howthedatagetintoinfluxdb">How the data get into influxdb</h4>
<p>As priviously described the central data hub in my system is a MQTT broker. The data flow is managed by node-RED, hence the data points are added with a specific flow in node-RED, that can be seen in the screenshot.</p>
<p><img src="https://www.jochen-scheib.de/content/images/2016/11/Bildschirmfoto-von--2016-11-13-16-11-01-.png" alt loading="lazy"></p>
<p>Input node is a mqtt node to subscribe to everything in <code>[Places]/#</code> followed by a function to transform the mqtt topic into tags:</p>
<pre><code class="language-javascript">var regexTags = /(?:\[([\w]*)\]\/([^\/]*)?)/g;
var regexMeasurement = /^(?:\[[\w]+\]\/[\w]+\/)*([\w]+)$/g;

if (measurement = regexMeasurement.exec(msg.topic)) {
    msg.measurement = measurement[1];
    
    msg.tags = {};
    while(match = regexTags.exec(msg.topic))
    {
        msg.tags[match[1].toLowerCase()] = match[2];
    }
    return msg;
}
</code></pre>
<p>In the following function the message is formated into the database format:</p>
<pre><code class="language-javascript">node.send(
    {
        topic: msg.topic,
        payload: [
            JSON.parse(msg.payload),
            msg.tags
        ],
        measurement: msg.measurement
    }
); 

</code></pre>
<p>After filtering out some unwanted measurements the data is written into the influxdb database.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Edimax Smart Plug - Firmware Image]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>binwalk</p>
<pre><code>DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             CSYS header, little endian, size: 458752
20            0x14            uImage header, header size: 64 bytes, header CRC: 0xBFFB8484, created: 2015-03-25 02:14:33, image size: 2871212 bytes, Data Address: 0x80000000, Entry Point: 0x80213000, data CRC: 0x80762D51, OS: Linux, CPU: MIPS, image type: OS Kernel</code></pre>]]></description><link>https://www.jochen-scheib.de/edimax-smart-plug-firmware-image/</link><guid isPermaLink="false">602c38d86b3671000130c79d</guid><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Tue, 19 Jul 2016 15:57:26 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>binwalk</p>
<pre><code>DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             CSYS header, little endian, size: 458752
20            0x14            uImage header, header size: 64 bytes, header CRC: 0xBFFB8484, created: 2015-03-25 02:14:33, image size: 2871212 bytes, Data Address: 0x80000000, Entry Point: 0x80213000, data CRC: 0x80762D51, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: &quot;Linux Kernel Image&quot;
84            0x54            LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 2282468 bytes
786432        0xC0000         Squashfs filesystem, little endian, non-standard signature, version 3.0, size: 2082392 bytes, 293 inodes, blocksize: 65536 bytes, created: 2015-03-25 02:14:33
</code></pre>
<p>CSYS Header Format (20 bytes):</p>
<pre><code>00000000  43 53 59 53 CSYS
00000004  00 00 10 01 ....
00000008  00 00 07 00 ....
0000000C  52 4e 37 31 RN71  = Model Id
00000010  ee cf 2b 00 ..+.  = image length without csys header
</code></pre>
<p>Last 4 bytes: Checksum:</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Edimax Smart Plug - Enable Telnet Access]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>The Edimax Smart Plug SP-2101W is a wifi-based smart plug to switch electric devices on and off. It also measures the power and energy consumption of the plugged in device.</p>
<p>Some smart developers have reversed engineered the REST protocol a while ago and we now have apis for a various</p>]]></description><link>https://www.jochen-scheib.de/edimax-smart-plug-enable-telnet-access/</link><guid isPermaLink="false">602c38d86b3671000130c79c</guid><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Tue, 19 Jul 2016 15:57:10 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>The Edimax Smart Plug SP-2101W is a wifi-based smart plug to switch electric devices on and off. It also measures the power and energy consumption of the plugged in device.</p>
<p>Some smart developers have reversed engineered the REST protocol a while ago and we now have apis for a various of programming languages and of course for node-RED. I noticed that after some time the smart plug is no longer reachable and you have to reset it (plug out and in again). My first assumption was, that the wifi connection is not stable and the plug is not reconnecting, but this assumption was not confirmed.</p>
<p>So I did some more research an found out that it is related to the frequence and number of http requests to the smart plug. Maybe the web server logs?</p>
<p>I recently found out, that you can access the plug by telnet and I was able to confirm, that there is a log file <code>/var/access.log</code> which logs every request.</p>
<p>To enable telnet you have to do the following steps:</p>
<ol>
<li>Reset your smart plug to factory settings</li>
<li>Connect your PC with the <code>EdiPlug.Setup</code> wifi</li>
<li>Call the <code>http://192.168.20.3:10000/tnb2</code>, it should confirm with &quot;OK&quot;</li>
<li>Now connect with a telnet client on <code>192.168.20.3</code> port <code>1355</code></li>
<li>To enable telnet after the initial setup, call <code>nvc set Device.Test.HiddenPage.Enable ON</code></li>
<li>Now you can configure the device via the EdiPlug App</li>
<li>After this call <code>http://192.168.20.3:10000/tnb2</code> and connect over telnet <code>192.168.20.3</code> port <code>1355</code> and have some fun.</li>
</ol>
<p>Interesting tools:</p>
<pre><code>Usage: nvc [command] [NAME] [VALUE]
command:
        set &lt;NAME&gt; &lt;VALUE&gt;      Set VALUE to NAME
        get &lt;NAME&gt;              Get value by NAME
        unset &lt;NAME&gt;            Unset value by NAME
        ms &lt;NAME&gt; &lt;VALUE 1&gt; &lt;VALUE 2&gt; ... &lt;VALUE n&gt;     Set column
        mg &lt;NAME&gt;               Get row
        mu &lt;NAME&gt;               Unset table
        all                     Show all values
        default [default file]  Restore default values
</code></pre>
<pre><code>Usage: elecc [command] [NAME] [VALUE]
command:
        get_now
        notify
        read_budget
        get_history &lt;TYPE&gt; &lt;START_TIME&gt; &lt;END_TIME&gt;
        read_budget &lt;CLEAR_CONTROL&gt; &lt;CLEAR_NOTIFY&gt;
                get &lt;TYPE&gt; history energy from &lt;START_TIME&gt; to &lt;END_TIME&gt;
                where: &lt;TYPE&gt; can be HOUR/DAY/MONTH
</code></pre>
<pre><code>usage: ledctl LED &lt;led_id&gt; &lt;action&gt; [args]
  where: &lt;led_id&gt; can be POWER|2G|RESET
         &lt;action&gt; can be ON|OFF|BLINK
         [args] MUST BE specified for BLINK
         ex. ledctl POWER BLINK &lt;times on&gt; &lt;times off&gt;
       ledctl GPIO &lt;r|w&gt; &lt;gpio num&gt; &lt;value&gt;
       ledctl SWITCH &lt;ON|OFF&gt;
</code></pre>
<p>Volumes</p>
<pre><code>dev:    size   erasesize  name
mtd0: 00030000 00010000 &quot;Bootloader&quot;
mtd1: 00010000 00010000 &quot;Config&quot;
mtd2: 00010000 00010000 &quot;Factory&quot;
mtd3: 000c0000 00010000 &quot;Kernel&quot;
mtd4: 00220000 00010000 &quot;RootFS&quot;
mtd5: 00050000 00010000 &quot;elecdata0&quot;
mtd6: 00050000 00010000 &quot;elecdata1&quot;
mtd7: 00020000 00010000 &quot;nvram&quot;
mtd8: 00010000 00010000 &quot;hwconfig&quot;
mtd9: 002e0000 00010000 &quot;Uimage&quot;
</code></pre>
<p>A list of values:</p>
<pre><code># nvc all
Device.LAN.2G.Repeater.Band=BGN
Device.System.RemoteManagement.Enable=ON
Run.WAN.Interface=apcli0
Run.Device.System.Power.NowPower=0
Run.FW.Version=1.03
Device.WAN.Mode=DHCP
Device.LAN.2G.CTS=Auto
Device.System.Power.OverCurrent.UpperLimit=16
Device.WAN.Static.MTU=1454
Run.Device.System.Power.Schedule.Support=1
Device.System.RemoteManagement.IPAddress=
Run.Device.System.Power.NowEnergy.Week=0.000
Device.System.Power.Budget.Week.Notify=OFF
Device.System.TimeZone.Zone=23
Device.System.FwUpgrade.Enable=ON
Device.Firewall.Enable=OFF
Device.System.Power.Budget.Month.UpperLimit=0
Device.WAN.IPV6.Enable=ON
Device.System.TimeZone.Daylight.Enable=ON
Device.LAN.2G.NFixRate=Auto
Device.System.Password.Name=admin
Run.LAN.MAC.Address=801F02FA5FF2
Device.WAN.DHCPClient.MTU=1454
Device.LAN.2G.NChannelWidth=20
Device.System.FwUpgrade.Notification.Enable=ON
Device.LAN.NetMask=255.255.255.0
Device.LAN.2G.0.Security.WPAPSK.Key=11111111
Run.WAN.MAC.Address=000A8A20bd01
Run.Device.System.FwUpgrade.Support=1
HW.CountryCode=EU
Device.WAN.Static.DNS1=
Device.Configuration.HW.ModelName=SP2101W
Device.WAN.Static.DNS2=
Device.LAN.2G.0.MACAC.Num=0
Device.LAN.2G.Repeater.Security.WPAPSK.Key=wpakey
Device.System.Power.OverCurrent.MaxUpperLimit=16
Device.System.Power.Budget.Day.UpperLimit=0
Run.meth0=eth2
Device.LAN.2G.APMode=LiteRepeater
Device.System.Power.OverPower.UpperLimit=3680
Device.NAT.UPNP.Enable=ON
Device.LAN.2G.Repeater.Channel=11
Run.WAN.Gateway=192.168.80.1
Device.System.TimeZone.Server.Address.0=pool.ntp.org
Device.LAN.2G.WPS.ConfigType=Configured
Run.Device.System.Power.LastToggleTime=20160718094006
Device.System.TimeZone.Server.Address.1=europe.pool.ntp.org
Device.System.TimeZone.Server.Address.2=oceania.pool.ntp.org
Device.System.TimeZone.Server.Address.3=north-america.pool.ntp.org
Device.System.TimeZone.Server.Address.4=south-america.pool.ntp.org
Device.System.Power.Report.Energy.Month.Notify=OFF
Device.System.Internet.Check.Port=80
Device.LAN.2G.Repeater.MAC.Address=3431C4D8C8CC
Device.LAN.DHCPServer.Start=192.168.20.100
Run.Model=SP2101W
Device.LAN.2G.FragThreshold=2346
Device.NAT.VirtualServer.Enable=OFF
Run.WAN.DNS=192.168.80.1
Device.LAN.DHCPServer.End=192.168.20.200
Device.System.RemoteManagement.Port=
Device.LAN.2G.0.Security.WPAPSK.PSKFormat=Passphrase
Device.System.Power.Budget.Month.Enable=OFF
Device.System.Power.Report.Energy.Day.Notify=OFF
Device.System.Power.OverPower.MaxUpperLimit=3680
Device.System.HiddenPage.Enable=OFF
Device.LAN.2G.Repeater.Security.WPAPSK.PSKFormat=Passphrase
Run.br0=br0
Device.System.Power.Toggle.Notify=OFF
Device.System.FwUpgrade.Time=Auto
Device.System.Internet.Check.Address=www.google.com
Device.LAN.2G.0.Security.WPAPSK.CipherSuite=WPA2AES
Device.System.Power.Budget.Mode=ENERGY
Device.LAN.2G.Enable=ON
Device.LAN.DHCPClient.Enable=OFF
Device.LAN.2G.Repeater.Security.WPAPSK.CipherSuite=WPA2AES
Device.NAT.PortForward.Enable=OFF
Device.Configuration.SW.APRTSwitch=AP
Device.LAN.2G.Coexist.Enable=ON
Device.System.Power.Budget.UnitPrice=0
Device.System.Power.Budget.Day.Enable=OFF
Device.WAN.Static.IPAddress=172.1.1.1
Device.Test.HiddenPage.Enable=ON
HW.RegionDomain=1
Device.LAN.DHCPServer.Enable=ON
Run.Cus=Edimax
Device.WAN.DHCPClient.DNS.Enable=Auto
Device.WAN.Ping.Enable=OFF
Device.LAN.2G.0.Security.Mode=Disable
Device.LAN.Client.Mode=DHCP
Run.Device.System.Power.NowEnergy.Month=0.000
Device.LAN.2G.Repeater.Security.Mode=WPAPSK
Run.BackUp.MAC=000A8A796c00
Device.System.Power.Budget.Month.Notify=OFF
HW.LAN.MAC.Address=801F02FA5FF2
Device.LAN.2G.WPS.Enable=OFF
HW.LAN.2G.0.MAC.Address=801F02FA5FF3
Device.WAN.DynIP.HostName=
Run.w2c0=apcli0
Run.w2d0=wds0
Device.LAN.2G.Band=BGN
Run.w2d1=wds1
Run.w2d2=wds2
Run.w5c0=apclii0
Run.w5d0=wdsi0
Run.w2d3=wds3
Run.w2g0=ra0
HW.WAN.MAC.Address=000A8A20bd01
Run.w5d1=wdsi1
Run.w2g1=ra1
Run.w5d2=wdsi2
Run.w2g2=ra2
Run.w5d3=wdsi3
Run.w5g0=rai0
Run.w2g3=ra3
Device.LAN.2G.0.HideSSID.Enable=OFF
HW.LAN.2G.MSSID.Mode=PREVIOUS
Device.System.Power.Budget.Week.UpperLimit=0
Run.Device.System.Power.NowEnergy.Day=0.000
Device.LAN.Client.ConnTest.Enable=OFF
Device.System.Name=Pumpe
Device.System.Power.Budget.Day.Notify=OFF
Device.QoS.Download.Bandwidth=
Device.LAN.2G.BeaconInterval=100
Device.LAN.2G.0.MACAC.Enabled=OFF
Device.System.Cloud.Server.Address=www.myedimax.com
Run.LAN.Client.MAC.Address=801F02FA5FF3
Run.Device.System.Power.Budget.ControlMask=0
Device.LAN.2G.DTIMPeriod=3
Device.LAN.DHCPServer.LeaseTime=31536000
Device.LAN.2G.0.SSID=EdiPlug.Setup
Device.LAN.2G.Repeater.SSID=gallien
Run.Device.System.Power.NextToggle=-1
Run.LAN.IPAddress=192.168.20.3
Run.Device.System.Power.State=OFF
Run.Device.System.Power.Manual.Flag=ON
Run.lan0=eth2.1
Device.LAN.2G.RTSThreshold=2347
Device.LAN.2G.0.Enable=ON
Device.LAN.2G.1.Enable=OFF
Device.LAN.5G.0.Enable=OFF
Run.WAN.IPAddress=192.168.80.26
Device.System.Power.Report.Energy.Week.Notify=OFF
Device.NAT.Enable=OFF
Device.WAN.Static.NetMask=255.255.255.0
Run.wan0=eth2.2
Run.wan1=eth2.2
Run.Device.System.Power.NowCurrent=0
Device.LAN.2G.FixRate=Auto
Device.QoS.Upload.Bandwidth=
Device.LAN.IPAddress=192.168.20.3
Device.QOS.Enable=OFF
Device.LAN.2G.TXPower=100
Device.LAN.2G.Channel=Auto
Run.APMode.Enable=OFF
Device.System.Power.Budget.Week.Enable=OFF
Device.LAN.2G.0.WMM.Enable=ON
Device.LAN.2G.PreambleType=Short
Device.WAN.Static.Gateway=172.1.1.254
Device.Configuration.KernelMessage.Enabled=ON
Device.LAN.DHCPServer.NetMask=255.255.255.0
Run.Device.System.SMTP.Support=1
Device.System.Password.Password=password
Run.WAN.Mask=255.255.255.0
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Understanding the FrSky Smartport Protocol]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h3 id="datastream">Data Stream</h3>
<ol>
<li>Byte: Start Sensor Frame (0x7e)</li>
<li>Byte: Sensor Id</li>
<li>Byte: Start Data Frame (0x10)</li>
<li>Byte: Sensor Data Type[0]</li>
<li>Byte: Sensor Data Type[1]</li>
<li>Byte: Data[0]</li>
<li>Byte: Data[1]</li>
<li>Byte: Data[2]</li>
<li>Byte: Data[3]</li>
<li>Byte: CRC</li>
</ol>
<h3 id="availablesensorids">Available Sensor Ids:</h3>
<pre><code>#define ID1 0x00
#define ID2 0xA1
#define ID3</code></pre>]]></description><link>https://www.jochen-scheib.de/understanding-the-frsky-smartport-protocol/</link><guid isPermaLink="false">602c38d86b3671000130c79a</guid><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Mon, 26 Oct 2015 09:21:14 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h3 id="datastream">Data Stream</h3>
<ol>
<li>Byte: Start Sensor Frame (0x7e)</li>
<li>Byte: Sensor Id</li>
<li>Byte: Start Data Frame (0x10)</li>
<li>Byte: Sensor Data Type[0]</li>
<li>Byte: Sensor Data Type[1]</li>
<li>Byte: Data[0]</li>
<li>Byte: Data[1]</li>
<li>Byte: Data[2]</li>
<li>Byte: Data[3]</li>
<li>Byte: CRC</li>
</ol>
<h3 id="availablesensorids">Available Sensor Ids:</h3>
<pre><code>#define ID1 0x00
#define ID2 0xA1
#define ID3 0x22
#define ID4 0x83
#define ID5 0xE4
#define ID6 0x45
#define ID7 0xC6
#define ID8 0x67
#define ID9 0x48
#define ID10 0xE9
#define ID11 0x6A
#define ID12 0xCB
#define ID13 0xAC
#define ID14 0x0D
#define ID15 0x8E
#define ID16 0x2F
#define ID17 0xD0
#define ID18 0x71
#define ID19 0xF2
#define ID20 0x53
#define ID21 0x34
#define ID22 0x95
#define ID23 0x16
#define ID24 0xB7
#define ID25 0x98
#define ID26 0x39
#define ID27 0xBA
#define ID28 0x1b
</code></pre>
<h3 id="sensordatatypes">Sensor Data Types:</h3>
<pre><code>#define AccX_DATA_ID 0x0700
#define AccY_DATA_ID 0x0710
#define AccZ_DATA_ID 0x0720
#define ASS_SPEED_DATA_ID 0x0A00
#define FAS_CURR_DATA_ID 0x0200
#define FAS_VOLT_DATA_ID 0x0210
#define FLVSS_CELL_DATA_ID 0x0300
#define FUEL_DATA_ID 0x0600
#define GPS_LAT_LON_DATA_ID   0x0800
#define GPS_ALT_DATA_ID       0x0820
#define GPS_SPEED_DATA_ID     0x0830
#define GPS_COG_DATA_ID       0x0840
#define GPS_HDOP_DATA_ID      0xF103
#define RPM_T1_DATA_ID 0x0400
#define RPM_T2_DATA_ID 0x0410
#define RPM_ROT_DATA_ID 0x0500
#define SP2UARTB_ADC3_DATA_ID 0x0900
#define SP2UARTB_ADC4_DATA_ID 0x0910
#define VARIO_ALT_DATA_ID 0x0100
#define VARIO_VSI_DATA_ID 0x0110
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Integration of the Edimax Smartplug into your node-RED flow]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I decided to replace the current flow to control the edimax smartplug over node-RED with two smartplug specific nodes. The node makes use of the existing node.js module <a href="https://www.npmjs.com/package/edimax-smartplug">edimax-smartplug</a> <a href="https://github.com/mwittig/edimax-smartplug"><img src="https://assets-cdn.github.com/favicon.ico" alt="Foo" loading="lazy"></a> by mwittig. The node.js package <a href="https://www.npmjs.com/package/node-red-contrib-smartplug">node-red-contrib-smartplug</a> <a href="https://github.com/mapero/node-red-contrib-smartplug"><img src="https://assets-cdn.github.com/favicon.ico" alt="Foo" loading="lazy"></a> adds two new nodes to your node-RED palette, one input node and one</p>]]></description><link>https://www.jochen-scheib.de/integration-of-the-edimax-smartplug-into-your-node-red-flow/</link><guid isPermaLink="false">602c38d86b3671000130c798</guid><category><![CDATA[edimax]]></category><category><![CDATA[smartplug]]></category><category><![CDATA[iot]]></category><category><![CDATA[node.js]]></category><category><![CDATA[node]]></category><category><![CDATA[node-red]]></category><category><![CDATA[wifi]]></category><category><![CDATA[smart device]]></category><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Wed, 26 Aug 2015 19:51:28 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I decided to replace the current flow to control the edimax smartplug over node-RED with two smartplug specific nodes. The node makes use of the existing node.js module <a href="https://www.npmjs.com/package/edimax-smartplug">edimax-smartplug</a> <a href="https://github.com/mwittig/edimax-smartplug"><img src="https://assets-cdn.github.com/favicon.ico" alt="Foo" loading="lazy"></a> by mwittig. The node.js package <a href="https://www.npmjs.com/package/node-red-contrib-smartplug">node-red-contrib-smartplug</a> <a href="https://github.com/mapero/node-red-contrib-smartplug"><img src="https://assets-cdn.github.com/favicon.ico" alt="Foo" loading="lazy"></a> adds two new nodes to your node-RED palette, one input node and one output node.</p>
<p>The input node polls the status of your edimax smartplug in a given interval and inserts the value as json object into your flow:<br>
<img src="https://www.jochen-scheib.de/content/images/2015/08/smartplug_input.png" style="width:600px;"><br>
In the node configuration you can select which information the node should read from the smartplug. The output is a json object, e.g.:</p>
<pre><code>{ &quot;deviceinfo&quot;: { &quot;vendor&quot;: &quot;Edimax&quot;, &quot;model&quot;: &quot;SP2101W&quot;, &quot;fwVersion&quot;: &quot;1.03&quot;, &quot;mac&quot;: &quot;801F02FA5FF3&quot; }, &quot;schedule&quot;: { &quot;0&quot;: &quot;i0iu0&quot;, &quot;1&quot;: &quot;i0iu0&quot;, &quot;2&quot;: &quot;i0iu0&quot;, &quot;3&quot;: &quot;i0iu0&quot;, &quot;4&quot;: &quot;i0iu0&quot;, &quot;5&quot;: &quot;i0iu0&quot;, &quot;6&quot;: &quot;i0iu0&quot; }, &quot;status&quot;: { &quot;state&quot;: false, &quot;nowPower&quot;: 0, &quot;nowCurrent&quot;: 0, &quot;day&quot;: 0, &quot;week&quot;: 0, &quot;month&quot;: 0.089, &quot;lastToggleTime&quot;: &quot;2015-08-25T15:14:07.000Z&quot; } }
</code></pre>
<p>The with the output node you can change the state of the plug and switch it on or off. It will only accept a boolean as input payload. Sending <code>true</code> will switch the smartplug on, sending <code>false</code> will switch it off. You can configure the node to send the new state after toggle as output:<br>
<img src="https://www.jochen-scheib.de/content/images/2015/08/smartplug_output.png" style="width:400px;"><br>
Feedback an suggestions are welcome. Try it out by install the package over npm:</p>
<pre><code>npm install -g node-red-contrib-smartplug
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[SAMBA4 AD ON SYNOLOGY DS211J]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Install debian-chroot spk from SynoCommunity</p>
<p>Mount partitions with user_xattr therefore add this to <code>/etc/rc.local</code></p>
<pre><code class="language-bash">mount -o remount,user_xattr /  
mount -o remount,user_xattr /volume1 
</code></pre>
<p>Chroot:</p>
<pre><code>chroot /volume1/@appstore/debian-chroot/var/chroottarget/ /bin/bash  
</code></pre>
<p>Install git and dependencies (see <a href="https://wiki.samba.org/index.php/Samba_4/OS_Requirements">here</a>):</p>
<pre><code>apt-get install build-essential libacl1-dev libattr1-dev  
   libblkid-dev libgnutls-dev</code></pre>]]></description><link>https://www.jochen-scheib.de/samba4-ad-on-synology-ds211j/</link><guid isPermaLink="false">602c38d86b3671000130c797</guid><dc:creator><![CDATA[Jochen Scheib]]></dc:creator><pubDate>Sun, 26 Aug 2012 21:04:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Install debian-chroot spk from SynoCommunity</p>
<p>Mount partitions with user_xattr therefore add this to <code>/etc/rc.local</code></p>
<pre><code class="language-bash">mount -o remount,user_xattr /  
mount -o remount,user_xattr /volume1 
</code></pre>
<p>Chroot:</p>
<pre><code>chroot /volume1/@appstore/debian-chroot/var/chroottarget/ /bin/bash  
</code></pre>
<p>Install git and dependencies (see <a href="https://wiki.samba.org/index.php/Samba_4/OS_Requirements">here</a>):</p>
<pre><code>apt-get install build-essential libacl1-dev libattr1-dev  
   libblkid-dev libgnutls-dev libreadline-dev python-dev 
   python-dnspython gdb pkg-config libpopt-dev libldap2-dev 
   dnsutils libbsd-dev attr krb5-user git
</code></pre>
<p>Install Samba (takes some time) (<a href="https://wiki.samba.org/index.php/Samba4/HOWTO">more</a>):</p>
<pre><code>cd  
git clone git://git.samba.org/samba.git samba-master  
cd samba-master  
./configure
make  
make install  
</code></pre>
<p>Konfigure bind9</p>
<p>Provision Samba4</p>
<pre><code>/usr/local/samba/bin/samba-tool domain provision --host-name=majestix --realm=gallien.jochen-scheib.de --domain=GALLIEN --adminpass=&apos;testtest1234!&apos; --server-role=dc --use-ntvfs --host-ip=192.168.80.201 --dns-backend=BIND9_FLATFILE
</code></pre>
<p>Edit the <code>/usr/local/samba/etc/smb.conf</code></p>
<pre><code># Global parameters

[global]
    workgroup = GALLIEN
    realm = gallien.jochen-scheib.de
    netbios name = MAJESTIX
    server role = active directory domain controller
    interfaces = 192.168.80.201
    bind interfaces only = yes
    server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, smb
    dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver, winreg, srvsvc
    posix:eadb = /usr/local/samba/private/eadb.tdb



[netlogon]
    path = /usr/local/samba/var/locks/sysvol/gallien.jochen-scheib.de/scripts
    read only = No

[sysvol]
    path = /usr/local/samba/var/locks/sysvol
    read only = No
</code></pre>
<p>Copy Kerberos config to <code>/etc</code></p>
<pre><code>cp /usr/local/samba/private/krb5.conf /etc/  
</code></pre>
<p>Make sure to configure DNS on Router:</p>
<p>hostname gallien.jochen-scheib.de 192.168.80.200<br>
dns forwarding /gallien.jochen-scheib.de/192.168.80.200</p>
<h3 id="todo">TODO:</h3>
<p>Roaming<br>
Check which services are really needed<br>
Add samba4 AD to synology directory client| working more or less</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>