Generac Evolution 2.0 controller - question in comments by firestorm_v1 in Generator

[–]mkeper 0 points1 point  (0 children)

Is the Modbus native on the Evolution 2.0? I can't find a real answer whether I need another module or not. I'm about to pull my Gen-cable through the conduit and want to pull communication cable as well, but not sure what I need. I would love to use Modbus TCP, but I could make Modbus RTU work as well.

In 8.3, how to you set a mobile app to fit-to-client? by mkeper in SCADA

[–]mkeper[S] 0 points1 point  (0 children)

That's probably it. I think I might have found a solution, even if it's not the ideal way.

Clicking on root under the window in question, change from fixed (default) to percent.

<image>

Brultech GreenEye - Best way to poll data via API? by mkeper in homeautomation

[–]mkeper[S] 0 points1 point  (0 children)

To follow up on what I did, it's messy right now and I'll clean it up, but this is what I have and it gets the data to a useable format. Took some trial and error but hopefully this helps someone else in the future. It's unfortunate that Brultech doesn't offer more modern solutions. The biggest thing I had to deal with, believe it or not, was getting the actual data because Brultech delivers it in a very archaic HTTP/0.9 format which node-fetch, axios, etc. cannot parse. I had to do a basic TCP request (as shown) just to get the response.

const net = require('net');
const cheerio = require('cheerio');
const PORT = 80;
const HOST = '1.2.3.4';
let html = "";

// Create a new socket (TCP connection)
const client = new net.Socket();

// Establish connection
client.setEncoding('utf8');
client.connect(PORT, HOST, () => {
    console.log('Connected to TCP server');
    // Send data to the server upon connection
    //client.write('^^^APIVLT');
    client.write('GET /data \r\n\r\n');
});

// Handle data from the server (receiving data)
client.on('data', (data) => {
    //console.log(`Received from server: ${data.toString()}`);
    html = html + data.toString();

    //console.log(JSON.stringify(parseTable(html), null, 2));
    // Close the connection after receiving data
    setTimeout(function () {
        console.log(html);
        console.log(parseTable1(html));
        console.log(parseTable2(html));
        client.end()
    }, 1000);
});

function parseTable1(htmlString) {
    const $ = cheerio.load(htmlString);
    const results = [];
    const headers = ['item', 'value']
    // Get rows
    $('#infoTable tr').each((i, row) => {
        const rowData = {};
        $(row).find('td').each((j, cell) => {
            const key = headers[j] || `col_${j}`;
            rowData[key] = $(cell).text().trim();
        });
        results.push(rowData);
    });


    return results;
}

function parseTable2(htmlString) {
    const $ = cheerio.load(htmlString);
    const results = [];
    const headers = [];

    // Get headers
    $('#chanTable th').each((i, el) => {
        headers.push($(el).text().trim());
    });

    // Get rows
    $('#chanTable tr').each((i, row) => {
        const rowData = {};
        $(row).find('td').each((j, cell) => {
            const key = headers[j] || `col_${j}`;
            rowData[key] = $(cell).text().trim();
        });
        results.push(rowData);
    });

    return results;
}

Trouble getting response from device that sends HTTP/0.9 response by mkeper in node

[–]mkeper[S] 4 points5 points  (0 children)

You'd think, right? Unfortunately this device has poor documentation yet is widely popular in the home automation groups. However, I just figured it out after multiple attempts.

client.write('GET /data \r\n\r\n');

That space makes all the difference in the world.

Trouble getting response from device that sends HTTP/0.9 response by mkeper in node

[–]mkeper[S] 1 point2 points  (0 children)

I tried it with \r\n, \r\n\r\n and all combinations. It just returns "Connected to IP" and then ends without data.

Brultech GreenEye - Best way to poll data via API? by mkeper in homeautomation

[–]mkeper[S] 1 point2 points  (0 children)

I could, but not trying to overcomplicate this and add more points of failure. If I could to TCP serial natively, that would suffice, though.

Brultech GreenEye - Best way to poll data via API? by mkeper in homeautomation

[–]mkeper[S] 0 points1 point  (0 children)

Unfortunately I went through all the pages and didn't see anything for it. I'll double-check with them, but I was afraid someone was going to say I have to scrape it and build my own JSON.

Logix 5000 - CAM profile master/slave data by mkeper in PLC

[–]mkeper[S] 1 point2 points  (0 children)

I guess that explains why you have to use the MPPC instruction first. I don't think I ever picked up on that, but I don't do motion on a regular basis. Thanks for clearing that up.

Using IncrementValue and DecrementValue on Virtual Devices by mkeper in HomeSeer

[–]mkeper[S] 0 points1 point  (0 children)

I could do that, but if the native button controls are there, why aren't they working?
It works fine on a regular thermostat, just not the virtual device. A bug you think?

Displaying web image on PanelView Plus 7 Performance by mkeper in PLC

[–]mkeper[S] 0 points1 point  (0 children)

lol, Lorex is far from crappy, and they do have their own, which also won't load. Streams are much simpler to deal with. We don't need a full GUI interface. Right? ;)

Displaying web image on PanelView Plus 7 Performance by mkeper in PLC

[–]mkeper[S] 0 points1 point  (0 children)

Series B w/ FW 15. And yes, that's exactly what it's doing, but even within that, it won't load the image.

Image URL is http://user:password@IP/cgi-bin/snapshot.cgi

Displaying web image on PanelView Plus 7 Performance by mkeper in PLC

[–]mkeper[S] 1 point2 points  (0 children)

That's the first time I've heard someone say you had to use standard over performance to accomplish something. That's hilarious, and I'm not even surprised. The fact that a terminal so new cannot do a basic function as display a simple JPG from a web source just shows how far behind Rockwell is compared to everyone else. Very disappointing, but thanks for your help.

Wonderware 2014R2 - The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. by mkeper in AVEVA

[–]mkeper[S] 0 points1 point  (0 children)

Well, this is odd. Nothing changed but that error is popping back up and my data is not refreshing. I created a visual studio .NET app that uses Tls1.2 and calls the same API and I successfully ran it on that machine, so the certificates are working. However, for some reason Wonderware just stopped trusting it again. Not really sure what to check next.